:root {
    --primary: #FF6B6B;
    --secondary: #4ECDC4;
    --accent: #FFE66D;
    --background: #F7FFF7;
    --text: #2F2E41;
    --white: #FFFFFF;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --font-main: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.app-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    width: 100%;
}

.back-link {
    position: absolute;
    top: -10px;
    left: 0;
    text-decoration: none;
    color: var(--secondary);
    font-weight: 700;
    font-size: 1rem;
    padding: 8px 16px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.back-link:hover {
    transform: translateX(-5px);
    background: var(--secondary);
    color: var(--white);
}

header h1 {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    text-shadow: 2px 2px 0px var(--accent);
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    color: #666;
}

main {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* Wheel Styles */
.wheel-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.wheel-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1 / 1;
    background: var(--white);
    border-radius: 50%;
    box-shadow: var(--shadow);
    padding: 10px;
    border: 10px solid var(--white);
}

#wheel-canvas {
    width: 100%;
    height: 100%;
}

.spin-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: var(--white);
    font-family: var(--font-main);
    font-weight: 900;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 0 0 10px rgba(255, 107, 107, 0.2), 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.spin-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: #ff5252;
}

.spin-btn:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.spin-btn:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

.result-display {
    font-size: 2rem;
    font-weight: 700;
    padding: 15px 40px;
    background: var(--white);
    border-radius: 50px;
    box-shadow: var(--shadow);
    color: var(--primary);
    min-width: 200px;
    text-align: center;
    transition: all 0.5s ease;
}

.result-display.winner {
    animation: bounce 0.6s ease infinite alternate;
    background: var(--accent);
    color: var(--text);
}

@keyframes bounce {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.1);
    }
}

/* Builder Section */
.builder-section {
    background: var(--white);
    padding: 40px;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.builder-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--secondary);
}

.selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 20px;
}

.animal-card {
    position: relative;
    padding: 20px;
    border-radius: 20px;
    background: #f9f9f9;
    border: 3px solid transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.animal-card:hover {
    transform: translateY(-5px);
    background: #fff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.animal-card.selected {
    border-color: var(--secondary);
    background: var(--white);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.animal-card .emoji {
    font-size: 3rem;
}

.animal-card .name {
    font-weight: 700;
    font-size: 0.9rem;
}

.animal-card input[type="checkbox"] {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    accent-color: var(--secondary);
}

.color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: absolute;
    top: 10px;
    left: 10px;
    border: 2px solid white;
}

/* SEO Content Styles */
.seo-content {
    background: var(--white);
    padding: 40px;
    border-radius: 30px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.seo-content h2 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.seo-content p {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.8;
}

.seo-content strong {
    color: var(--secondary);
}

footer {
    margin-top: auto;
    padding: 40px 0;
    text-align: center;
    color: #888;
}

/* Responsive */
@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }

    .wheel-wrapper {
        max-width: 320px;
    }

    .selector-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}