/* ==================== KID-FRIENDLY THEME ==================== */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Fredoka+One&display=swap');

:root {
    /* Fun, bright color palette for kids */
    --kid-pink: #FF6B9D;
    --kid-purple: #C56CF0;
    --kid-blue: #54A0FF;
    --kid-cyan: #00D2D3;
    --kid-green: #5CD85A;
    --kid-yellow: #FECA57;
    --kid-orange: #FF9F43;
    --kid-red: #FF6B6B;

    /* UI Colors */
    --bg-gradient-1: #667eea;
    --bg-gradient-2: #764ba2;
    --bg-gradient-3: #f093fb;
    --card-bg: rgba(255,255,255,0.2);
    --card-border: rgba(255,255,255,0.3);

    /* Sizes - BIGGER for kids */
    --btn-padding: 18px 35px;
    --btn-font-size: 1.4rem;
    --input-padding: 15px 20px;
    --input-font-size: 1.2rem;
    --border-radius: 20px;
    --border-radius-lg: 30px;
}

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

body {
    font-family: 'Nunito', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 50%, var(--bg-gradient-3) 100%);
    min-height: 100vh;
    overflow: hidden;
    color: white;
    font-weight: 600;
}

/* Animated background for fun */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255,107,157,0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(84,160,255,0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(254,202,87,0.2) 0%, transparent 40%);
    pointer-events: none;
    z-index: -1;
}

/* Floating bubbles animation */
.floating-bubbles {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    animation: floatBubble 15s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes floatBubble {
    0%, 100% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

.screen {
    display: none;
    width: 100vw;
    height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.screen.active {
    display: flex;
}

/* ==================== SPARKLE & STAR ANIMATIONS ==================== */
@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
    50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

@keyframes wobble {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
}

@keyframes rainbowGlow {
    0% { box-shadow: 0 0 20px #FF6B9D, 0 0 40px #FF6B9D; }
    20% { box-shadow: 0 0 20px #FF9F43, 0 0 40px #FF9F43; }
    40% { box-shadow: 0 0 20px #FECA57, 0 0 40px #FECA57; }
    60% { box-shadow: 0 0 20px #5CD85A, 0 0 40px #5CD85A; }
    80% { box-shadow: 0 0 20px #54A0FF, 0 0 40px #54A0FF; }
    100% { box-shadow: 0 0 20px #C56CF0, 0 0 40px #C56CF0; }
}

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

/* Star burst for achievements */
.star-burst {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
}

.star-burst .star {
    position: absolute;
    width: 30px;
    height: 30px;
    background: #FECA57;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: starExplode 1s ease-out forwards;
}

@keyframes starExplode {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    100% { transform: scale(1.5) rotate(180deg) translateY(-100px); opacity: 0; }
}

/* ==================== LOADING SCREEN ==================== */
#loading-screen {
    background: linear-gradient(135deg, var(--kid-purple) 0%, var(--kid-blue) 100%);
}

.loader-content {
    text-align: center;
    animation: bounceIn 0.6s ease;
}

/* Fun animated rainbow spinner for kids */
.spinner {
    width: 120px;
    height: 120px;
    border: 8px solid transparent;
    border-top-color: var(--kid-pink);
    border-right-color: var(--kid-yellow);
    border-bottom-color: var(--kid-green);
    border-left-color: var(--kid-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 30px;
    box-shadow: 0 0 30px rgba(255,255,255,0.3);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-content h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2.8rem;
    margin-bottom: 20px;
    text-shadow: 4px 4px 0 rgba(0,0,0,0.2);
    animation: wobble 2s ease-in-out infinite;
}

#loading-status {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 25px;
}

.progress-bar {
    width: 350px;
    height: 20px;
    background: rgba(255,255,255,0.2);
    border-radius: 15px;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,0.4);
    margin: 0 auto;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--kid-pink), var(--kid-yellow), var(--kid-green), var(--kid-blue));
    background-size: 300% 100%;
    animation: progressRainbow 2s linear infinite;
    transition: width 0.3s ease;
    border-radius: 12px;
}

@keyframes progressRainbow {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* ==================== CUTE MASCOT CHARACTER ==================== */
.mascot {
    position: relative;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.mascot-body {
    font-size: 6rem;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
    animation: wiggle 2s ease-in-out infinite;
}

.mascot-speech {
    position: absolute;
    top: -20px;
    left: 100%;
    transform: translateX(-30%);
    background: white;
    color: #333;
    padding: 15px 25px;
    border-radius: 25px;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    animation: speechBounce 3s ease-in-out infinite;
}

.mascot-speech::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    border: 12px solid transparent;
    border-right-color: white;
}

@keyframes speechBounce {
    0%, 100% { transform: translateX(-30%) translateY(0); }
    50% { transform: translateX(-30%) translateY(-5px); }
}

/* ==================== START SCREEN ==================== */
#start-screen {
    overflow-y: auto;
    padding: 40px 40px 60px 40px;
    justify-content: flex-start;
    height: 100vh;
    box-sizing: border-box;
}

#start-screen h1 {
    font-family: 'Fredoka One', cursive;
    font-size: 4.5rem;
    text-shadow: -2px -2px 0 var(--kid-pink),
                 2px -2px 0 var(--kid-yellow),
                 -2px 2px 0 var(--kid-blue),
                 2px 2px 0 var(--kid-green);
    margin-bottom: 10px;
    animation: wobble 3s ease-in-out infinite, float 4s ease-in-out infinite;
    background: linear-gradient(135deg, #fff 0%, #ffe4ec 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.6rem;
    opacity: 0.95;
    margin-bottom: 30px;
    font-weight: 700;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

.player-inputs {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
}

/* Colorful player cards */
.player-input {
    background: linear-gradient(145deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.1) 100%);
    padding: 30px;
    border-radius: 30px;
    backdrop-filter: blur(15px);
    border: 4px solid rgba(255,255,255,0.4);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2),
                inset 0 1px 0 rgba(255,255,255,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: bounceIn 0.6s ease;
}

.player-input:nth-child(1) {
    border-color: var(--kid-pink);
    animation-delay: 0.1s;
}

.player-input:nth-child(2) {
    border-color: var(--kid-blue);
    animation-delay: 0.2s;
}

.player-input:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.player-input h2 {
    font-family: 'Fredoka One', cursive;
    margin-bottom: 18px;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

.player-input h2 i {
    font-size: 1.8rem;
    animation: wiggle 2s ease-in-out infinite;
}

.player-input:nth-child(1) h2 i { color: var(--kid-pink); }
.player-input:nth-child(2) h2 i { color: var(--kid-blue); }

/* BIG, friendly input fields for little fingers */
.player-input input {
    display: block;
    width: 280px;
    padding: 18px 22px;
    margin: 12px 0;
    border: 4px solid rgba(100,100,100,0.2);
    border-radius: 20px;
    font-size: 1.3rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    background: rgba(255,255,255,0.95);
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1),
                inset 0 2px 4px rgba(0,0,0,0.05);
}

.player-input input::placeholder {
    color: #999;
    font-weight: 500;
}

.player-input input:focus {
    outline: none;
    border-color: var(--kid-yellow);
    box-shadow: 0 5px 25px rgba(254,202,87,0.4),
                0 0 0 6px rgba(254,202,87,0.2);
    transform: scale(1.02);
}

/* Settings Panel - Fun and colorful for kids */
.settings-panel {
    background: linear-gradient(145deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.08) 100%);
    padding: 30px 40px;
    border-radius: 30px;
    margin-bottom: 25px;
    width: 100%;
    max-width: 700px;
    border: 4px solid var(--kid-purple);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    animation: bounceIn 0.6s ease 0.3s both;
}

.settings-panel h3 {
    font-family: 'Fredoka One', cursive;
    margin-bottom: 20px;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--kid-yellow);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

.settings-panel h3 i {
    animation: spin 4s linear infinite;
}

.settings-row {
    display: flex;
    align-items: center;
    margin: 18px 0;
    gap: 20px;
}

.settings-row label {
    width: 140px;
    font-weight: 700;
    font-size: 1.2rem;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

.timer-options, .control-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* BIG colorful buttons for timer and controls */
.timer-btn, .control-btn {
    padding: 15px 25px;
    border: 4px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.15);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.timer-btn:hover, .control-btn:hover {
    transform: translateY(-4px) scale(1.05);
    border-color: var(--kid-yellow);
    background: rgba(254,202,87,0.3);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.timer-btn:active, .control-btn:active {
    transform: translateY(-2px) scale(1.02);
}

.timer-btn.active, .control-btn.active {
    background: linear-gradient(135deg, var(--kid-green) 0%, var(--kid-cyan) 100%);
    border-color: white;
    animation: rainbowGlow 3s linear infinite;
}

.prompt-display {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

#current-prompt {
    background: linear-gradient(135deg, var(--kid-orange) 0%, var(--kid-pink) 100%);
    padding: 15px 25px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.2rem;
    min-width: 180px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(255,159,67,0.4);
    animation: float 3s ease-in-out infinite;
}

/* Fun action buttons */
.small-btn {
    padding: 14px 20px;
    border: 3px solid rgba(255,255,255,0.3);
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
    color: white;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.small-btn:hover {
    transform: translateY(-3px) scale(1.05);
    background: linear-gradient(135deg, var(--kid-purple) 0%, var(--kid-pink) 100%);
    border-color: white;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.small-btn i {
    animation: wiggle 2s ease-in-out infinite;
}

/* Instructions - ANIMATED VISUAL TUTORIALS FOR KIDS! */
.instructions {
    background: linear-gradient(145deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.08) 100%);
    padding: 30px;
    border-radius: 30px;
    margin-bottom: 30px;
    width: 100%;
    max-width: 850px;
    border: 4px solid var(--kid-cyan);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    animation: bounceIn 0.6s ease 0.4s both;
}

.instructions h3 {
    font-family: 'Fredoka One', cursive;
    margin-bottom: 20px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--kid-yellow);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

.instructions h3 i {
    animation: wiggle 2s ease-in-out infinite;
}

/* Visual Tutorial Cards */
.visual-tutorials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tutorial-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0.1) 100%);
    border-radius: 25px;
    padding: 25px 20px;
    text-align: center;
    border: 4px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tutorial-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%) rotate(45deg); }
    50% { transform: translateX(100%) rotate(45deg); }
}

.tutorial-card:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: var(--kid-yellow);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.tutorial-card:nth-child(1) { border-color: var(--kid-pink); animation-delay: 0s; }
.tutorial-card:nth-child(2) { border-color: var(--kid-green); animation-delay: 0.1s; }
.tutorial-card:nth-child(3) { border-color: var(--kid-blue); animation-delay: 0.2s; }
.tutorial-card:nth-child(4) { border-color: var(--kid-orange); animation-delay: 0.3s; }

/* Giant Animated Hand Demo */
.tutorial-demo {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tutorial-hand {
    font-size: 4rem;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.3));
    position: relative;
    z-index: 2;
}

/* Pinch animation for drawing */
.tutorial-card.pinch .tutorial-hand {
    animation: pinchGesture 2s ease-in-out infinite;
}

@keyframes pinchGesture {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(0.85); }
    50% { transform: scale(0.75); }
    70% { transform: scale(0.85); }
}

/* Peace sign animation */
.tutorial-card.peace .tutorial-hand {
    animation: peaceWiggle 1.5s ease-in-out infinite;
}

@keyframes peaceWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    75% { transform: rotate(-15deg); }
}

/* Thumbs up animation */
.tutorial-card.thumbsup .tutorial-hand {
    animation: thumbsBounce 1s ease-in-out infinite;
}

@keyframes thumbsBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.1); }
}

/* Voice wave animation */
.tutorial-card.voice .tutorial-hand {
    animation: voicePulse 1.2s ease-in-out infinite;
}

@keyframes voicePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.8; }
}

/* Glowing ring effect around demos */
.tutorial-ring {
    position: absolute;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 4px dashed rgba(255,255,255,0.5);
    animation: ringRotate 4s linear infinite;
}

@keyframes ringRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Arrow indicator for gesture */
.tutorial-arrow {
    position: absolute;
    font-size: 1.5rem;
    color: var(--kid-yellow);
    animation: arrowBounce 1s ease-in-out infinite;
}

.tutorial-arrow.down { bottom: -5px; }
.tutorial-arrow.up { top: -5px; }

@keyframes arrowBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

/* Tutorial label */
.tutorial-label {
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    color: white;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
    margin-bottom: 8px;
}

/* Tutorial description with icons */
.tutorial-desc {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tutorial-desc .result-icon {
    font-size: 1.5rem;
    animation: float 2s ease-in-out infinite;
}

/* Animated drawing line for pinch demo */
.draw-line {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--kid-pink), var(--kid-purple), var(--kid-blue));
    border-radius: 2px;
    animation: drawLine 2s ease-in-out infinite;
}

@keyframes drawLine {
    0%, 100% { width: 0; opacity: 0; }
    20% { opacity: 1; }
    50% { width: 80px; opacity: 1; }
    80% { opacity: 0; }
}

/* Voice sound waves */
.sound-waves {
    position: absolute;
    display: flex;
    gap: 4px;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
}

.sound-wave {
    width: 6px;
    background: var(--kid-green);
    border-radius: 3px;
    animation: soundWave 1s ease-in-out infinite;
}

.sound-wave:nth-child(1) { height: 15px; animation-delay: 0s; }
.sound-wave:nth-child(2) { height: 25px; animation-delay: 0.1s; }
.sound-wave:nth-child(3) { height: 35px; animation-delay: 0.2s; }
.sound-wave:nth-child(4) { height: 25px; animation-delay: 0.3s; }
.sound-wave:nth-child(5) { height: 15px; animation-delay: 0.4s; }

@keyframes soundWave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}

/* Eraser sparkle effect */
.eraser-sparkles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.eraser-sparkle {
    position: absolute;
    font-size: 1rem;
    animation: sparkleFloat 1.5s ease-out infinite;
}

.eraser-sparkle:nth-child(1) { left: 20%; top: 30%; animation-delay: 0s; }
.eraser-sparkle:nth-child(2) { left: 70%; top: 20%; animation-delay: 0.3s; }
.eraser-sparkle:nth-child(3) { left: 50%; top: 60%; animation-delay: 0.6s; }

@keyframes sparkleFloat {
    0% { transform: scale(0) translateY(0); opacity: 1; }
    50% { transform: scale(1) translateY(-10px); opacity: 1; }
    100% { transform: scale(0) translateY(-20px); opacity: 0; }
}

/* Undo arrow animation */
.undo-arrow {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 4px solid var(--kid-yellow);
    border-radius: 50%;
    border-right-color: transparent;
    animation: undoSpin 2s ease-in-out infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes undoSpin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    50% { transform: translate(-50%, -50%) rotate(-180deg); }
    100% { transform: translate(-50%, -50%) rotate(-360deg); }
}

/* Interactive tutorial hint */
.tutorial-hint {
    text-align: center;
    margin-top: 20px;
    padding: 15px 25px;
    background: linear-gradient(135deg, var(--kid-purple) 0%, var(--kid-pink) 100%);
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: float 3s ease-in-out infinite;
}

.tutorial-hint .hint-icon {
    font-size: 1.5rem;
    animation: wiggle 2s ease-in-out infinite;
}

/* Legacy tab support - hidden but functional */
.instruction-tabs {
    display: none;
}

.tab-btn {
    padding: 14px 24px;
    border: 3px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.15);
    color: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.tab-btn:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.25);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--kid-blue) 0%, var(--kid-purple) 100%);
    border-color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(84,160,255,0.4);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: none; /* Hide text instructions in favor of visual */
}

.tab-content ul {
    list-style: none;
}

.tab-content li {
    padding: 14px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.15rem;
    font-weight: 600;
    border-bottom: 2px dashed rgba(255,255,255,0.1);
}

.tab-content li:last-child {
    border-bottom: none;
}

.tab-content li i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--kid-pink) 0%, var(--kid-orange) 100%);
    border-radius: 12px;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(255,107,157,0.4);
}

/* SUPER BIG START BUTTON for kids! */
.big-btn {
    background: linear-gradient(135deg, var(--kid-green) 0%, var(--kid-cyan) 100%);
    color: white;
    border: 5px solid rgba(255,255,255,0.5);
    padding: 25px 70px;
    font-size: 2rem;
    font-family: 'Fredoka One', cursive;
    border-radius: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(92,216,90,0.5),
                0 0 0 0 rgba(92,216,90,0.4);
    display: flex;
    align-items: center;
    gap: 15px;
    text-shadow: 3px 3px 0 rgba(0,0,0,0.2);
    animation: bounceIn 0.6s ease 0.5s both, pulse 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

/* Sparkle effect on button */
.big-btn::before {
    content: '✨';
    position: absolute;
    left: 20px;
    animation: sparkle 2s ease-in-out infinite;
}

.big-btn::after {
    content: '✨';
    position: absolute;
    right: 20px;
    animation: sparkle 2s ease-in-out infinite 1s;
}

.big-btn i {
    font-size: 2rem;
    animation: wiggle 1s ease-in-out infinite;
}

.big-btn:hover:not(:disabled) {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 20px 60px rgba(92,216,90,0.6),
                0 0 50px rgba(92,216,90,0.4);
    animation: rainbowGlow 1s linear infinite;
}

.big-btn:active:not(:disabled) {
    transform: scale(1.05) translateY(-2px);
}

.big-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    animation: none;
    background: linear-gradient(135deg, #888 0%, #666 100%);
}

/* ==================== SETUP SCREEN ==================== */
#setup-screen {
    overflow-y: auto;
    justify-content: flex-start;
    height: 100vh;
    box-sizing: border-box;
    padding: 30px 20px 60px 20px;
}

#setup-screen h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#setup-screen > p {
    margin-bottom: 20px;
}

.hand-status {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.hand-status.detecting {
    background: rgba(255,193,7,0.3);
    color: #ffc107;
}

.hand-status.found {
    background: rgba(76,175,80,0.3);
    color: #4caf50;
}

.camera-preview-container {
    position: relative;
    width: 70%;
    max-width: 700px;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

#setup-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.hand-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Player zone divider line */
.player-zone-divider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.8) 10%,
        rgba(255,255,255,0.8) 90%,
        rgba(255,255,255,0) 100%);
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 0 15px rgba(255,255,255,0.5);
}

/* Animated dashed effect */
.player-zone-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: repeating-linear-gradient(
        180deg,
        transparent 0px,
        transparent 10px,
        rgba(255,255,0,0.8) 10px,
        rgba(255,255,0,0.8) 20px
    );
    transform: translateX(-50%);
    animation: dashMove 1s linear infinite;
}

@keyframes dashMove {
    0% { background-position: 0 0; }
    100% { background-position: 0 40px; }
}

/* Player zone labels */
.player-zone-label {
    position: absolute;
    top: 10px;
    padding: 8px 16px;
    background: rgba(0,0,0,0.7);
    border-radius: 20px;
    font-size: 1rem;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 11;
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255,255,255,0.3);
}

.player-zone-label.left {
    left: 15px;
    background: rgba(0, 200, 100, 0.7);
    border-color: rgba(0, 255, 100, 0.5);
}

.player-zone-label.right {
    right: 15px;
    background: rgba(0, 150, 255, 0.7);
    border-color: rgba(0, 200, 255, 0.5);
}

.player-zone-icon {
    font-size: 1.2rem;
}

.hand-indicators {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.hand-indicator {
    padding: 8px 15px;
    background: rgba(0,0,0,0.6);
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.5;
    transition: all 0.3s;
}

.hand-indicator.detected {
    opacity: 1;
}

.hand-indicator.left.detected {
    background: rgba(0, 200, 100, 0.9);
    box-shadow: 0 0 15px rgba(0, 255, 100, 0.5);
}

.hand-indicator.right.detected {
    background: rgba(0, 150, 255, 0.9);
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.5);
}

.practice-area {
    text-align: center;
    margin-bottom: 20px;
}

.practice-area p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#practice-canvas {
    width: 400px;
    height: 150px;
    background: white;
    border-radius: 10px;
    display: block;
    margin: 0 auto 10px;
}

.ready-hint {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 10px;
}

/* ==================== GAME SCREEN ==================== */
#game-screen {
    padding: 10px;
    background: #0a0a1a;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    padding: 5px 20px;
}

.player-info {
    display: flex;
    flex-direction: column;
    min-width: 180px;
}

.player-info.left {
    align-items: flex-start;
}

.player-info.right {
    align-items: flex-end;
}

.player-name {
    font-size: 1.3rem;
    font-weight: bold;
}

.painting-title {
    font-style: italic;
    opacity: 0.7;
    font-size: 0.9rem;
}

.player-color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid white;
    margin-top: 8px;
    box-shadow: 0 0 15px currentColor;
    transition: all 0.3s;
}

.brush-size-indicator {
    margin-top: 5px;
    opacity: 0.7;
    font-size: 0.8rem;
}

.center-info {
    text-align: center;
}

.prompt-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 8px 25px;
    border-radius: 25px;
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timer-container {
    display: flex;
    justify-content: center;
}

.timer-ring {
    position: relative;
    width: 90px;
    height: 90px;
}

.timer-ring svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.timer-bg {
    fill: none;
    stroke: rgba(255,255,255,0.1);
    stroke-width: 8;
}

.timer-progress {
    fill: none;
    stroke: #4caf50;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.timer-ring #timer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: bold;
}

.canvas-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    gap: 0;
    padding: 10px;
}

.canvas-wrapper {
    position: relative;
    display: inline-block;
}

.game-canvas {
    background: white;
    border-radius: 10px;
    height: calc(100vh - 220px);
    width: calc(50vw - 40px);
    max-width: 550px;
    cursor: crosshair;
}

.cursor-canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    border-radius: 10px;
}

/* BIG FRIENDLY TOOL BUTTONS */
.canvas-tools {
    position: absolute;
    top: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.left-tools {
    left: 15px;
}

.right-tools {
    right: 15px;
}

.tool-btn {
    width: 55px;
    height: 55px;
    border: 3px solid rgba(255,255,255,0.3);
    background: linear-gradient(135deg, rgba(60,60,80,0.9) 0%, rgba(40,40,60,0.9) 100%);
    color: white;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.tool-btn:hover {
    transform: translateY(-4px) scale(1.15);
    background: linear-gradient(135deg, var(--kid-blue) 0%, var(--kid-purple) 100%);
    border-color: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.tool-btn:active {
    transform: translateY(-2px) scale(1.1);
}

.tool-btn.active {
    background: linear-gradient(135deg, var(--kid-pink) 0%, var(--kid-red) 100%);
    border-color: white;
    box-shadow: 0 0 20px rgba(255,107,157,0.6);
    animation: pulse 1.5s ease-in-out infinite;
}

.divider {
    width: 8px;
    height: calc(100vh - 220px);
    background: linear-gradient(180deg, #ff8800, #ff6600);
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(255, 136, 0, 0.6);
    margin: 0 5px;
}

/* SUPER KID-FRIENDLY BOTTOM BAR */
.bottom-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 18px 30px;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: 30px;
    margin-top: 10px;
    border: 3px solid rgba(255,255,255,0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* BIG COLORFUL PALETTE FOR LITTLE ARTISTS! */
.color-palette {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.color-swatch {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 4px solid rgba(255,255,255,0.5);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.25) translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    z-index: 10;
}

.color-swatch:active {
    transform: scale(1.15) translateY(-2px);
}

.color-swatch.selected {
    border-color: white;
    box-shadow: 0 0 20px currentColor, 0 0 40px currentColor;
    transform: scale(1.2);
    animation: rainbowGlow 2s linear infinite;
}

/* Fun tooltip showing color name */
.color-swatch::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    font-family: 'Nunito', sans-serif;
}

.color-swatch:hover::after {
    opacity: 1;
}

/* SUPER BIG BRUSH SIZES */
.brush-sizes {
    display: flex;
    gap: 12px;
    align-items: center;
}

.size-btn {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.1);
    border-radius: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.size-btn:hover {
    transform: translateY(-4px) scale(1.1);
    border-color: var(--kid-yellow);
    background: rgba(254,202,87,0.3);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.size-btn.active {
    background: linear-gradient(135deg, var(--kid-pink) 0%, var(--kid-purple) 100%);
    border-color: white;
    box-shadow: 0 0 20px rgba(255,107,157,0.5);
}

.size-dot {
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.voice-indicator {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    padding: 10px 25px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 100;
}

.mic-icon {
    color: #f5576c;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.help-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #f093fb;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.help-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
    color: #fff;
}

#game-video {
    position: fixed;
    bottom: 70px;
    right: 15px;
    width: 180px;
    height: 135px;
    border-radius: 12px;
    border: 3px solid rgba(255,255,255,0.3);
    transform: scaleX(-1);
    z-index: 100;
    opacity: 0.9;
}

/* ==================== WINNER SCREEN - SUPER EXCITING! ==================== */
#winner-screen {
    text-align: center;
    background: linear-gradient(135deg, var(--kid-purple) 0%, var(--kid-blue) 50%, var(--kid-pink) 100%);
}

#winner-screen h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 3.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-shadow: 4px 4px 0 rgba(0,0,0,0.2);
    animation: bounceIn 0.6s ease, wobble 3s ease-in-out infinite;
}

#winner-screen h2 i {
    color: var(--kid-yellow);
    animation: float 2s ease-in-out infinite;
}

.prompt-reminder {
    background: linear-gradient(135deg, var(--kid-orange) 0%, var(--kid-yellow) 100%);
    padding: 15px 35px;
    border-radius: 30px;
    margin-bottom: 25px;
    font-size: 1.3rem;
    font-weight: 700;
    box-shadow: 0 8px 25px rgba(255,159,67,0.4);
    animation: bounceIn 0.6s ease 0.1s both;
}

.paintings-display {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 30px;
    animation: bounceIn 0.6s ease 0.2s both;
}

/* Fun colorful frames for paintings */
.painting-frame {
    background: linear-gradient(145deg, #ffffff 0%, #f0f0f0 100%);
    padding: 20px;
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3),
                inset 0 2px 0 rgba(255,255,255,0.8);
    transition: all 0.4s ease;
    border: 5px solid var(--kid-cyan);
}

.painting-frame:nth-child(1) {
    border-color: var(--kid-pink);
}

.painting-frame:nth-child(3) {
    border-color: var(--kid-blue);
}

.painting-frame:hover {
    transform: scale(1.05) rotate(-2deg);
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
}

.painting-frame canvas {
    width: 360px;
    height: 290px;
    border-radius: 15px;
    display: block;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.final-title {
    color: #333;
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    margin-top: 15px;
}

.final-artist {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Bigger download buttons */
.download-btn {
    background: linear-gradient(135deg, var(--kid-green) 0%, var(--kid-cyan) 100%);
    color: white;
    border: 3px solid rgba(255,255,255,0.5);
    padding: 14px 28px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(92,216,90,0.4);
}

.download-btn:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 10px 30px rgba(92,216,90,0.5);
}

/* Big exciting VS text */
.vs-text {
    font-family: 'Fredoka One', cursive;
    font-size: 4rem;
    font-weight: bold;
    text-shadow: 4px 4px 0 rgba(0,0,0,0.3);
    color: var(--kid-yellow);
    animation: wobble 2s ease-in-out infinite;
}

#winner-screen h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    margin-bottom: 25px;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
    animation: bounceIn 0.6s ease 0.3s both;
}

/* SUPER BIG VOTE BUTTONS! */
.vote-buttons {
    display: flex;
    gap: 35px;
    animation: bounceIn 0.6s ease 0.4s both;
}

.vote-btn {
    background: linear-gradient(135deg, var(--kid-pink) 0%, var(--kid-purple) 100%);
    color: white;
    border: 5px solid rgba(255,255,255,0.5);
    padding: 22px 50px;
    font-size: 1.5rem;
    font-family: 'Fredoka One', cursive;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 35px rgba(255,107,157,0.5);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

.vote-btn i {
    font-size: 1.8rem;
    color: var(--kid-yellow);
    animation: wiggle 1.5s ease-in-out infinite;
}

.vote-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 45px rgba(255,107,157,0.6),
                0 0 40px rgba(255,107,157,0.3);
}

.vote-btn:active {
    transform: scale(1.05) translateY(-2px);
}

/* ==================== CELEBRATION SCREEN - PARTY TIME! ==================== */
#celebration-screen {
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    background: linear-gradient(135deg, var(--kid-yellow) 0%, var(--kid-orange) 50%, var(--kid-pink) 100%);
}

.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Bigger, more colorful confetti */
.confetti {
    position: absolute;
    width: 20px;
    height: 20px;
    animation: fall 4s ease-out forwards;
}

@keyframes fall {
    0% {
        transform: translateY(-100vh) rotate(0deg) scale(0);
        opacity: 1;
    }
    20% {
        transform: translateY(-50vh) rotate(180deg) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(1080deg) scale(0.8);
        opacity: 0;
    }
}

.winner-display {
    text-align: center;
    z-index: 10;
    position: relative;
    animation: bounceIn 0.8s ease;
}

/* Big bouncing party hat */
.party-hat-container {
    margin-bottom: -30px;
}

.party-hat {
    width: 150px;
    height: 150px;
    animation: partyBounce 0.5s ease-in-out infinite alternate;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

@keyframes partyBounce {
    from { transform: translateY(0) rotate(-8deg) scale(1); }
    to { transform: translateY(-25px) rotate(8deg) scale(1.1); }
}

/* GIANT WINNER TEXT! */
#winner-announcement {
    font-family: 'Fredoka One', cursive;
    font-size: 4rem;
    margin: 25px 0;
    text-shadow: 5px 5px 0 rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #fff 0%, var(--kid-yellow) 50%, var(--kid-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: wobble 2s ease-in-out infinite;
}

/* Big golden frame for winner */
#winner-canvas {
    width: 420px;
    height: 340px;
    background: white;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4),
                0 0 0 8px gold,
                0 0 40px rgba(255,215,0,0.5);
    border: 6px solid var(--kid-yellow);
    display: block;
    margin: 0 auto;
    animation: float 3s ease-in-out infinite;
}

.winner-painting-name {
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    margin-top: 25px;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

.winner-artist {
    font-size: 1.3rem;
    opacity: 0.95;
    margin-bottom: 20px;
    font-weight: 700;
}

.winner-download {
    margin-bottom: 30px;
    font-size: 1.3rem !important;
    padding: 18px 35px !important;
}

/* SUPER FUN PLAY AGAIN BUTTON */
#play-again-btn {
    background: linear-gradient(135deg, var(--kid-cyan) 0%, var(--kid-green) 100%);
    font-size: 2.2rem;
    padding: 28px 80px;
    animation: pulse 2s ease-in-out infinite, bounceIn 0.6s ease 0.3s both;
    box-shadow: 0 15px 50px rgba(78,205,196,0.6);
}

#play-again-btn:hover {
    background: linear-gradient(135deg, var(--kid-green) 0%, var(--kid-cyan) 100%);
    animation: rainbowGlow 1s linear infinite;
}

/* ==================== VOICE HELP OVERLAY ==================== */
#voice-help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

#voice-help-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.help-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    padding: 30px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.help-content h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 25px;
    color: #f5576c;
}

.help-content h2 i {
    margin-right: 10px;
}

.close-help {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.close-help:hover {
    background: #f5576c;
    transform: scale(1.1);
}

.help-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.help-column h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.help-column p {
    font-size: 0.9rem;
    margin-bottom: 8px;
    opacity: 0.9;
    line-height: 1.4;
}

.help-tip {
    text-align: center;
    margin-top: 25px;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    font-size: 0.95rem;
}

/* ==================== MODE INDICATORS ==================== */
.mode-indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    background: rgba(0,0,0,0.7);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.mode-badge {
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.65rem;
}

.mode-badge.rainbow {
    background: linear-gradient(90deg, red, orange, yellow, green, blue, violet);
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.mode-badge.spray {
    background: #9c27b0;
    color: white;
}

.mode-badge.dotted {
    background: #ff9800;
    color: white;
}

.mode-badge.mirror {
    background: #00bcd4;
    color: white;
}

/* ==================== ENHANCED VOICE INDICATOR ==================== */
.voice-indicator {
    position: relative;
    transition: all 0.3s ease;
}

.voice-indicator.speaking {
    background: rgba(76, 175, 80, 0.3) !important;
    border-color: #4caf50 !important;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

.voice-indicator.recognized {
    animation: recognizedFlash 0.5s ease;
}

@keyframes recognizedFlash {
    0%, 100% { background: rgba(0,0,0,0.8); }
    50% { background: rgba(76, 175, 80, 0.5); }
}

.voice-indicator .mic-icon {
    transition: all 0.2s ease;
}

.voice-indicator .mic-icon.active {
    color: #4caf50;
    animation: micPulse 1s ease infinite;
}

@keyframes micPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Mic level bar */
#mic-level-bar {
    width: 40px;
    height: 8px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-right: 10px;
}

#mic-level-bar .mic-level-fill {
    height: 100%;
    width: 0%;
    background: #9e9e9e;
    transition: width 0.05s ease, background-color 0.1s ease;
    border-radius: 4px;
}

/* Voice text feedback */
#voice-text {
    transition: all 0.2s ease;
}

#voice-text.interim {
    color: #ffeb3b;
    font-style: italic;
}

.voice-confidence-high {
    color: #4caf50 !important;
}

.voice-confidence-medium {
    color: #ffeb3b !important;
}

.voice-confidence-low {
    color: #ff9800 !important;
}

/* ==================== HAND TRACKING OVERLAY ==================== */
.game-hand-overlay {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 200px;
    height: 150px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(0,0,0,0.5);
    z-index: 100;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.game-hand-overlay:hover {
    opacity: 1;
}

.game-hand-overlay canvas {
    width: 100%;
    height: 100%;
}

.game-hand-overlay .toggle-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.7rem;
    cursor: pointer;
}

/* ==================== GESTURE FEEDBACK ==================== */
.gesture-indicator {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    padding: 15px 25px;
    background: rgba(0,0,0,0.8);
    border-radius: 15px;
    color: white;
    font-size: 1.2rem;
    z-index: 200;
    animation: gesturePopIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gesture-indicator.left {
    left: 50px;
}

.gesture-indicator.right {
    right: 50px;
}

.gesture-indicator .gesture-emoji {
    font-size: 2rem;
}

@keyframes gesturePopIn {
    0% { transform: translateY(-50%) scale(0.5); opacity: 0; }
    50% { transform: translateY(-50%) scale(1.1); }
    100% { transform: translateY(-50%) scale(1); opacity: 1; }
}

/* ==================== PINCH PROGRESS OVERLAY ==================== */
.pinch-hint {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    padding: 10px 20px;
    border-radius: 20px;
    color: white;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 150;
}

.pinch-hint .hand-icon {
    font-size: 1.5rem;
    animation: pinchDemo 2s ease infinite;
}

@keyframes pinchDemo {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.8); }
}

/* ==================== CONTEXT MENU (for mouse fallback) ==================== */
.context-menu {
    position: fixed;
    background: rgba(30, 30, 40, 0.95);
    border-radius: 10px;
    padding: 8px 0;
    min-width: 180px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    z-index: 1000;
    border: 1px solid rgba(255,255,255,0.1);
}

.context-menu-header {
    padding: 8px 15px;
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.context-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 15px;
    background: none;
    border: none;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
}

.context-menu button:hover {
    background: rgba(255,255,255,0.1);
}

.context-menu button i {
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

.context-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 5px 0;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
    .player-inputs {
        flex-direction: column;
    }

    .paintings-display {
        flex-direction: column;
    }

    .vs-text {
        font-size: 1.5rem;
    }

    .game-canvas {
        width: calc(50vw - 20px);
    }

    .help-columns {
        grid-template-columns: 1fr;
    }

    .help-content {
        padding: 20px;
    }

    .game-hand-overlay {
        width: 120px;
        height: 90px;
        bottom: 10px;
        right: 10px;
    }
}
