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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
}

.container {
    max-width: 500px;
    width: 100%;
    text-align: center;
}

header {
    margin-bottom: 30px;
    animation: fadeInDown 0.6s ease-out;
}

h1 {
    font-size: clamp(2rem, 8vw, 3rem);
    color: white;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    font-weight: 900;
}

.subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 4vw, 1.2rem);
    font-weight: 600;
}

.wheel-container {
    position: relative;
    margin: 40px auto;
    width: 320px;
    height: 320px;
    animation: fadeInUp 0.6s ease-out;
}

.wheel-pointer {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 30px;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    animation: bounce 2s ease-in-out infinite;
}

#wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.spin-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 5;
}

.spin-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

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

.spin-button:disabled {
    background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
    cursor: not-allowed;
    transform: translate(-50%, -50%);
}

.challenge-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin: 30px auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideInUp 0.5s ease-out;
    max-width: 400px;
}

.challenge-card.hidden {
    display: none;
}

.challenge-category {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.challenge-text {
    font-size: clamp(1.2rem, 5vw, 1.6rem);
    font-weight: 700;
    color: #1f2937;
    line-height: 1.5;
    margin-bottom: 25px;
}

.done-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.done-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.done-button:active {
    transform: translateY(0);
}

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
    animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

.stat {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    margin-top: 5px;
}

footer {
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 600;
    animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

#confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #f00;
    top: -10px;
    opacity: 0;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 1;
    }
}

/* Mobile optimizations */
@media (max-width: 400px) {
    .wheel-container {
        width: 280px;
        height: 280px;
    }
    
    .spin-button {
        width: 80px;
        height: 80px;
        font-size: 16px;
    }
    
    .stats {
        gap: 20px;
    }
    
    .stat {
        padding: 15px 20px;
    }
}

/* Prevent zoom on double-tap */
button {
    touch-action: manipulation;
}
