/* ========================================
   Phrasal Verbs Lab - Video Challenge
   Travel & Navigation Theme
   Â© Cool English 2026
   CINEMA EDITION - REDESIGNED
   ======================================== */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    
    --rose-400: #fb7185;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    
    --violet-400: #a78bfa;
    --violet-500: #8b5cf6;
    --violet-600: #7c3aed;
    
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    
    --emerald-400: #34d399;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    
    --teal-400: #2dd4bf;
    --teal-500: #14b8a6;
}

html, body {
    min-height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: 
        radial-gradient(ellipse at 15% 25%, rgba(6, 182, 212, 0.25) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 20%, rgba(249, 115, 22, 0.22) 0%, transparent 45%),
        radial-gradient(ellipse at 80% 75%, rgba(16, 185, 129, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 45%),
        linear-gradient(145deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    background-attachment: fixed;
    color: white;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Ambient glow effects - more colorful */
.app::before {
    content: '';
    position: fixed;
    top: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(ellipse, rgba(249, 115, 22, 0.3) 0%, rgba(234, 88, 12, 0.15) 40%, transparent 70%);
    z-index: 0;
    pointer-events: none;
    animation: ambientFloat 8s ease-in-out infinite;
}

.app::after {
    content: '';
    position: fixed;
    bottom: -10%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(ellipse, rgba(6, 182, 212, 0.28) 0%, rgba(16, 185, 129, 0.15) 40%, transparent 70%);
    z-index: 0;
    pointer-events: none;
    animation: ambientFloat 10s ease-in-out infinite reverse;
}

@keyframes ambientFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, 20px) scale(1.1); }
}

/* ========================================
   Header
   ======================================== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.5rem;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 4px solid transparent;
    border-image: linear-gradient(90deg, #FF6B35, #F59E0B, #22C55E, #06B6D4, #8B5CF6, #EC4899) 1;
    position: sticky;
    top: 0;
    z-index: 10;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.625rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.back-btn:hover {
    background: #f97316;
    border-color: #f97316;
    transform: translateX(-3px);
}

.logo {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #f97316, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 25px rgba(249, 115, 22, 0.3);
}

.title-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.main-title {
    font-size: 2rem;
    font-weight: 800;
    color: white;
}

.theme-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.375rem 1rem;
    border-radius: 2rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reset-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.25);
    padding: 0.5rem 1rem;
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: rgba(249, 115, 22, 0.8);
    border-color: #f97316;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}

/* ========================================
   Game Area
   ======================================== */
.game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem 3rem 0.5rem;
    position: relative;
    z-index: 5;
    min-height: 0;
    overflow: auto;
}

/* Game Header */
.game-header {
    text-align: center;
    margin-bottom: 0.5rem;
}

.game-title {
    font-size: 2.25rem;
    font-weight: 900;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.game-title .emoji {
    font-size: 1.75rem;
}

.game-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    margin-top: 0.125rem;
}

/* ========================================
   Video Selection - PREMIUM GAME SHOW
   ======================================== */
.video-selection {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 2rem 1rem;
}

.video-buttons {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 2.5rem;
    width: 100%;
    max-width: 1800px;
}

/* ========================================
   VIDEO CARD - Premium Game Show Style
   ======================================== */
.video-btn {
    aspect-ratio: 4 / 3;
    min-height: 140px;
    border-radius: 1.25rem;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: none;
    background: linear-gradient(
        145deg, 
        color-mix(in srgb, var(--card-color-1) 15%, rgba(30, 41, 59, 0.85)),
        color-mix(in srgb, var(--card-color-2) 10%, rgba(15, 23, 42, 0.9))
    );
    backdrop-filter: blur(10px);
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.3),
        0 0 60px color-mix(in srgb, var(--card-color-1) 15%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Entrance animation only - no continuous floating */
    animation: cardEntrance 0.5s ease-out backwards;
}

/* Staggered entrance */
.video-btn:nth-child(1) { animation-delay: 0.05s; }
.video-btn:nth-child(2) { animation-delay: 0.1s; }
.video-btn:nth-child(3) { animation-delay: 0.15s; }
.video-btn:nth-child(4) { animation-delay: 0.2s; }
.video-btn:nth-child(5) { animation-delay: 0.25s; }
.video-btn:nth-child(6) { animation-delay: 0.3s; }
.video-btn:nth-child(7) { animation-delay: 0.35s; }
.video-btn:nth-child(8) { animation-delay: 0.4s; }
.video-btn:nth-child(9) { animation-delay: 0.45s; }
.video-btn:nth-child(10) { animation-delay: 0.5s; }

/* Card index for gradient colors */
.video-btn:nth-child(1) { --card-index: 0; }
.video-btn:nth-child(2) { --card-index: 1; }
.video-btn:nth-child(3) { --card-index: 2; }
.video-btn:nth-child(4) { --card-index: 3; }
.video-btn:nth-child(5) { --card-index: 4; }
.video-btn:nth-child(6) { --card-index: 5; }
.video-btn:nth-child(7) { --card-index: 6; }
.video-btn:nth-child(8) { --card-index: 7; }
.video-btn:nth-child(9) { --card-index: 8; }
.video-btn:nth-child(10) { --card-index: 9; }

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

/* ========================================
   UNIFIED COLOR THEME - Cinema Teal/Cyan
   Cohesive, professional look with subtle variations
   ======================================== */
.video-btn:nth-child(1) { --card-color-1: #0d9488; --card-color-2: #14b8a6; }
.video-btn:nth-child(2) { --card-color-1: #0891b2; --card-color-2: #06b6d4; }
.video-btn:nth-child(3) { --card-color-1: #0e7490; --card-color-2: #0891b2; }
.video-btn:nth-child(4) { --card-color-1: #0f766e; --card-color-2: #14b8a6; }
.video-btn:nth-child(5) { --card-color-1: #0284c7; --card-color-2: #0ea5e9; }
.video-btn:nth-child(6) { --card-color-1: #0d9488; --card-color-2: #2dd4bf; }
.video-btn:nth-child(7) { --card-color-1: #0891b2; --card-color-2: #22d3ee; }
.video-btn:nth-child(8) { --card-color-1: #0e7490; --card-color-2: #06b6d4; }
.video-btn:nth-child(9) { --card-color-1: #0f766e; --card-color-2: #0d9488; }
.video-btn:nth-child(10) { --card-color-1: #0284c7; --card-color-2: #38bdf8; }

/* ========================================
   ANIMATED GRADIENT BORDER
   ======================================== */
.video-btn::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 1.4rem;
    background: linear-gradient(
        135deg, 
        var(--card-color-1) 0%, 
        var(--card-color-2) 50%,
        var(--card-color-1) 100%
    );
    background-size: 200% 200%;
    z-index: -1;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

/* ========================================
   HOVER STATE
   ======================================== */
.video-btn:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.35),
        0 0 80px color-mix(in srgb, var(--card-color-1) 25%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.video-btn:hover::before {
    opacity: 1;
}

.video-btn:active {
    transform: translateY(-4px) scale(1.02);
}

/* ========================================
   INNER GLOW EFFECT
   ======================================== */
.video-btn .card-glow {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(
            ellipse at 50% 0%,
            color-mix(in srgb, var(--card-color-2) 25%, transparent) 0%,
            transparent 60%
        ),
        radial-gradient(
            ellipse at 50% 100%,
            var(--card-color-1) -20%,
            transparent 65%
        );
    opacity: 0.35;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.video-btn:hover .card-glow {
    opacity: 0.5;
}

/* ========================================
   CARD NUMBER - Bold & Clear
   ======================================== */
.video-btn .btn-number {
    position: absolute;
    top: 1rem;
    left: 1.25rem;
    font-size: 3rem;
    font-weight: 900;
    color: white;
    line-height: 1;
    text-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.5),
        0 0 40px color-mix(in srgb, var(--card-color-1) 40%, transparent);
    z-index: 2;
    transition: transform 0.3s ease;
}

.video-btn:hover .btn-number {
    transform: scale(1.08);
}

/* ========================================
   PLAY BUTTON - Pulsing Glow + Ring
   ======================================== */
.video-btn .btn-play {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--card-color-1) 70%, transparent),
        color-mix(in srgb, var(--card-color-2) 60%, transparent)
    );
    border: 3px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 8px 30px color-mix(in srgb, var(--card-color-1) 50%, transparent),
        0 0 20px color-mix(in srgb, var(--card-color-2) 20%, transparent),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: all 0.3s ease;
    z-index: 2;
    animation: playPulse 2s ease-in-out infinite;
    position: relative;
}

/* Pulsing ring effect */
.video-btn .btn-play::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--card-color-1);
    opacity: 0;
    animation: ringPulse 2s ease-out infinite;
}

@keyframes ringPulse {
    0% {
        transform: scale(0.8);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

@keyframes playPulse {
    0%, 100% { 
        box-shadow: 
            0 8px 25px color-mix(in srgb, var(--card-color-1) 40%, transparent),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% { 
        box-shadow: 
            0 8px 35px color-mix(in srgb, var(--card-color-1) 60%, transparent),
            0 0 20px color-mix(in srgb, var(--card-color-2) 30%, transparent),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

.video-btn:hover .btn-play {
    transform: scale(1.15);
    animation: none;
    background: linear-gradient(135deg, 
        color-mix(in srgb, var(--card-color-1) 80%, white),
        color-mix(in srgb, var(--card-color-2) 70%, white)
    );
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 10px 40px color-mix(in srgb, var(--card-color-1) 60%, transparent),
        0 0 30px color-mix(in srgb, var(--card-color-2) 40%, transparent);
}

.video-btn:hover .btn-play::before {
    animation: none;
    opacity: 0;
}

.video-btn .btn-play svg {
    color: white;
    width: 2.25rem;
    height: 2.25rem;
    margin-left: 5px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.video-btn:hover .btn-play svg {
    transform: scale(1.15);
}

/* ========================================
   COMPLETED STATE - Gold/Amber Success
   ======================================== */
.video-btn.completed {
    --card-color-1: #d97706;
    --card-color-2: #fbbf24;
}

.video-btn.completed::before {
    background: linear-gradient(135deg, #b45309, #d97706, #f59e0b) !important;
    opacity: 1;
}

.video-btn.completed .btn-play {
    background: linear-gradient(135deg, rgba(180, 83, 9, 0.9), rgba(217, 119, 6, 0.8));
}

/* Completed Badge - High Contrast */
.video-btn .check-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: white;
    border-radius: 0.5rem;
    padding: 0.4rem 0.75rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    z-index: 3;
    animation: badgePop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes badgePop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.video-btn .check-badge svg {
    width: 1.125rem;
    height: 1.125rem;
    color: #b45309;
    stroke-width: 3;
}

.video-btn .check-badge span {
    font-size: 0.75rem;
    font-weight: 800;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========================================
   Teams Section
   ======================================== */
.teams-section {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    border-top: 2px solid rgba(6, 182, 212, 0.25);
    padding: 0.625rem 2rem 0.75rem;
    position: relative;
    z-index: 10;
}

.teams-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.teams-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.teams-header {
    display: flex;
    align-items: center;
}

.teams-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
}

.add-team-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--emerald-500), var(--teal-500));
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 0.625rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.add-team-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* Teams Grid */
.teams-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Individual Team Card */
.team-card {
    background: rgba(15, 23, 42, 0.95);
    border-radius: 0.875rem;
    padding: 0.75rem 1rem 1rem;
    min-width: 180px;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--team-color);
    border-radius: 0.875rem 0.875rem 0 0;
}

/* Team Card Header */
.team-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.625rem;
}

.team-name-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.team-color-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
}

.team-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
}

.delete-team-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 0.25rem;
    transition: all 0.2s ease;
    border-radius: 0.25rem;
    line-height: 0;
}

.delete-team-btn:hover {
    color: var(--rose-500);
    background: rgba(244, 63, 94, 0.15);
}

/* Score Section - HORIZONTAL ROW with larger score */
.team-score-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.score-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    border: none;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.score-btn.minus {
    background: rgba(244, 63, 94, 0.2);
    color: var(--rose-400);
}

.score-btn.minus:hover {
    background: var(--rose-500);
    color: white;
    transform: scale(1.1);
}

.score-btn.plus {
    background: rgba(16, 185, 129, 0.2);
    color: var(--emerald-400);
}

.score-btn.plus:hover {
    background: var(--emerald-500);
    color: white;
    transform: scale(1.1);
}

/* Score Display - Larger score number */
.team-score {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 2rem;
    font-weight: 900;
    color: white;
    min-width: 5rem;
    justify-content: center;
}

.team-score span {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 0.25rem;
}

/* ========================================
   Video Player View
   ======================================== */
.video-player-view {
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse at 80% 20%, rgba(249, 115, 22, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(6, 182, 212, 0.12) 0%, transparent 50%),
        linear-gradient(145deg, #0f172a 0%, #1e293b 30%, #0f172a 70%, #1e293b 100%);
    z-index: 100;
    display: none;
    flex-direction: column;
}

.video-player-view.visible {
    display: flex;
}

/* Player Header */
.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 4px solid transparent;
    border-image: linear-gradient(90deg, #FF6B35, #F59E0B, #22C55E, #06B6D4, #8B5CF6, #EC4899) 1;
}

.back-btn-player {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn-player:hover {
    background: #f97316;
    border-color: #f97316;
}

.player-title-group {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.player-video-number {
    font-size: 1.75rem;
    font-weight: 900;
    color: #f97316;
    text-shadow: 0 0 20px rgba(249, 115, 22, 0.5);
}

.player-logo {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #f97316, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 0 25px rgba(249, 115, 22, 0.3);
}

.player-title-text {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.player-main-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
}

.player-theme-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.375rem 1rem;
    border-radius: 2rem;
}

.header-spacer {
    width: 120px;
}

/* Player Layout */
.player-layout {
    flex: 1;
    display: flex;
    gap: 3rem;
    padding: 2.5rem 3rem;
    overflow: hidden;
}

/* Video Section */
.video-section {
    flex: 1.3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.video-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--slate-900);
    border-radius: 1.5rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 100px rgba(6, 182, 212, 0.12);
    border: 4px solid rgba(6, 182, 212, 0.4);
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.4);
}

.placeholder-content svg {
    color: #06b6d4;
    opacity: 0.5;
}

.placeholder-text {
    font-size: 1.5rem;
    font-weight: 600;
}

/* ========================================
   Replay Video Button
   ======================================== */
.replay-video-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    background: rgba(6, 182, 212, 0.15);
    border: 2px solid rgba(6, 182, 212, 0.4);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 0.875rem;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.replay-video-btn:hover {
    background: rgba(6, 182, 212, 0.3);
    border-color: #06b6d4;
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
}

.replay-video-btn svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* ========================================
   Hint text
   ======================================== */
.hint-text {
    display: none;
    font-size: 1.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(139, 92, 246, 0.25);
    border: 2px solid rgba(139, 92, 246, 0.55);
    border-radius: 1rem;
    padding: 1.25rem 1.75rem;
    margin-top: 0.5rem;
    text-align: center;
    animation: fadeInHint 0.3s ease;
    width: 100%;
    line-height: 1.4;
}

.hint-text.visible {
    display: block;
}

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

.video-filename {
    font-family: monospace;
    font-size: 1rem;
    color: var(--rose-400);
    background: rgba(244, 63, 94, 0.1);
    padding: 0.375rem 1rem;
    border-radius: 0.5rem;
}

/* ========================================
   Answer Section - RIGHT SIDE
   ======================================== */
.answer-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
}

/* Before Reveal - Mystery Card */
.reveal-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.reveal-container.hidden {
    display: none;
}

.mystery-card {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(139, 92, 246, 0.4);
    border-radius: 2rem;
    padding: 3rem;
    text-align: center;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mystery-icon {
    width: 6rem;
    height: 6rem;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, var(--violet-500), var(--rose-500));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: 900;
    color: white;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.35);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 30px rgba(139, 92, 246, 0.35); transform: scale(1); }
    50% { box-shadow: 0 0 40px rgba(139, 92, 246, 0.45); transform: scale(1.03); }
}

.mystery-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.mystery-text {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

/* Divider between text and hint/reveal */
.mystery-divider {
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.4), transparent);
    margin: 2rem 0;
}

/* Hint section */
.hint-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    width: 100%;
}

.hint-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: 2px solid rgba(251, 191, 36, 0.5);
    color: #fbbf24;
    padding: 0.875rem 1.75rem;
    border-radius: 2rem;
    font-size: 1.375rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hint-toggle-btn:hover {
    background: rgba(251, 191, 36, 0.15);
    border-color: #fbbf24;
}

/* Reveal Button */
.reveal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    background: linear-gradient(135deg, var(--rose-500), var(--violet-500));
    color: white;
    border: none;
    padding: 1.5rem 2rem;
    border-radius: 1.25rem;
    font-size: 1.75rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(244, 63, 94, 0.3);
}

.reveal-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 12px 35px rgba(244, 63, 94, 0.4);
}

.reveal-btn svg {
    width: 2rem;
    height: 2rem;
}

/* ========================================
   After Reveal - Answer Display
   ======================================== */
.answer-container {
    display: none;
    flex-direction: column;
    gap: 2rem;
    animation: revealAnswer 0.6s ease;
}

.answer-container.visible {
    display: flex;
}

@keyframes revealAnswer {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Sentence Card - THE MAIN PHRASE */
.sentence-card {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(6, 182, 212, 0.4);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.sentence-label {
    display: block;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--teal-400);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.25rem;
}

.full-sentence {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.highlighted-verb {
    background: linear-gradient(135deg, var(--rose-500), var(--violet-500));
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 0.5rem;
    font-weight: 900;
    box-shadow: 0 0 30px rgba(244, 63, 94, 0.5);
}

/* Listen Button */
.listen-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(139, 92, 246, 0.3);
    border: 2px solid rgba(139, 92, 246, 0.5);
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.listen-btn:hover {
    background: var(--violet-500);
    border-color: var(--violet-500);
    transform: scale(1.05);
}

.listen-btn svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Definition Card */
.definition-card {
    background: linear-gradient(135deg, var(--emerald-500), var(--teal-500));
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 15px 50px rgba(16, 185, 129, 0.3);
}

.definition-label {
    display: block;
    font-size: 1.375rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
}

/* Verb - Large and prominent */
.verb-text {
    font-size: 4rem;
    font-weight: 900;
    color: white;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    margin-bottom: 0.75rem;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
}

.definition-text {
    font-size: 1.5rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    font-style: italic;
    margin: 0;
}

.synonym-text {
    font-size: 3.5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.02em;
    line-height: 1.1;
    margin-bottom: 0.75rem;
}

.synonym-text::before {
    content: '= ';
    font-size: 2.5rem;
    font-weight: 600;
    opacity: 0.7;
}

/* ========================================
   Done Button - Appears when all videos completed
   ======================================== */
.done-btn-container {
    display: none;
    justify-content: center;
    padding: 1rem 2rem;
    animation: fadeSlideUp 0.5s ease;
}

.done-btn-container.visible {
    display: flex;
}

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

.done-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 3rem;
    background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
    color: white;
    border: none;
    border-radius: 1rem;
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4), 0 0 0 3px rgba(16, 185, 129, 0.15);
    animation: doneGlow 2s ease-in-out infinite;
}

@keyframes doneGlow {
    0%, 100% { box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4), 0 0 0 3px rgba(16, 185, 129, 0.15); }
    50% { box-shadow: 0 8px 35px rgba(16, 185, 129, 0.6), 0 0 0 6px rgba(16, 185, 129, 0.1); }
}

.done-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(16, 185, 129, 0.5);
}

.done-btn:active {
    transform: scale(0.98);
}

/* ========================================
   Completion Overlay
   ======================================== */
.completion-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.completion-overlay.visible {
    display: flex;
    opacity: 1;
}

.completion-content {
    background: white;
    border-radius: 2rem;
    padding: 3rem 4rem;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    max-width: 90%;
}

.completion-overlay.visible .completion-content {
    transform: scale(1);
    animation: completionBounceIn 0.5s ease;
}

@keyframes completionBounceIn {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.completion-emoji {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.completion-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 1rem;
}

.completion-message {
    font-size: 1.5rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 2rem;
}

.completion-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.completion-buttons .retry-btn,
.completion-buttons .home-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.completion-buttons .retry-btn {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    border: none;
    box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.3);
}

.completion-buttons .retry-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(249, 115, 22, 0.4);
}

.completion-buttons .home-btn {
    background: white;
    color: #334155;
    border: 3px solid #cbd5e1;
}

.completion-buttons .home-btn:hover {
    border-color: #f97316;
    color: #ea580c;
    transform: scale(1.05);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 0.5rem;
    background: rgba(15, 23, 42, 0.85);
    border-top: 2px solid rgba(6, 182, 212, 0.2);
    text-align: center;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.footer p {
    font-size: 1rem;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1400px) {
    .video-buttons {
        gap: 1.25rem 1.5rem;
    }
    
    .video-btn .btn-number {
        font-size: 2.25rem;
    }
    
    .video-btn .btn-play {
        width: 3.5rem;
        height: 3.5rem;
    }
    
    .video-btn .btn-play svg {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .player-layout {
        gap: 2rem;
        padding: 2rem;
    }
    
    .full-sentence {
        font-size: 2.5rem;
    }
    
    .definition-text {
        font-size: 1.25rem;
    }
    
    .synonym-text {
        font-size: 3rem;
    }
    
    .reset-btn span {
        display: none;
    }
    
    .reset-btn {
        padding: 0.5rem;
    }
}

@media (max-width: 1200px) {
    .player-layout {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .video-section {
        flex: none;
        max-height: 50vh;
    }
    
    .video-wrapper {
        max-height: 100%;
    }
    
    .answer-section {
        flex: none;
        gap: 1.5rem;
    }
    
    .sentence-card,
    .definition-card {
        padding: 1.5rem;
    }
    
    .full-sentence {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .definition-text {
        font-size: 1.125rem;
    }
    
    .synonym-text {
        font-size: 2.5rem;
    }
}

@media (max-width: 1024px) {
    .game-area {
        padding: 0.75rem 1rem;
    }
    
    .game-title {
        font-size: 2rem;
    }
    
    .video-buttons {
        gap: 1rem 1.25rem;
    }
    
    .video-btn .btn-number {
        font-size: 2rem;
    }
    
    .video-btn .btn-play {
        width: 3rem;
        height: 3rem;
    }
    
    .video-btn .btn-play svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}

@media (max-width: 768px) {
    /* Mobile: unlock scroll so full content is reachable */
    html, body {
        height: auto;
        overflow-y: auto;
    }

    .app {
        min-height: 100dvh;
    }

    /* Header - compact single row */
    .header {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }
    
    .back-btn {
        width: 2.25rem;
        height: 2.25rem;
        border-radius: 0.5rem;
    }
    
    .back-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .logo {
        display: none;
    }
    
    .main-title {
        font-size: 1.125rem;
    }
    
    .theme-badge {
        display: none;
    }
    
    .reset-btn span {
        display: none;
    }
    
    .reset-btn {
        padding: 0.5rem;
        width: 2.25rem;
        height: 2.25rem;
        border-radius: 0.5rem;
    }
    
    .reset-btn svg {
        width: 18px;
        height: 18px;
    }
    
    /* Game Area - maximize card space */
    .game-area {
        padding: 0.5rem;
    }
    
    .game-header {
        margin-bottom: 0.5rem;
    }
    
    .game-title {
        font-size: 1.375rem;
    }
    
    .game-title .emoji {
        font-size: 1.25rem;
    }
    
    .game-subtitle {
        font-size: 0.75rem;
        margin-top: 0.125rem;
    }
    
    /* Video Selection - 5x2 grid like Name That Verb */
    .video-selection {
        padding: 0.5rem;
        justify-content: flex-start;
    }
    
    .video-buttons {
        grid-template-columns: repeat(5, 1fr);
        grid-template-rows: repeat(2, auto);
        gap: 0.5rem;
        max-width: 100%;
    }
    
    .video-btn {
        border-radius: 0.75rem;
        min-height: 0;
        aspect-ratio: 1 / 1.1;
    }
    
    .video-btn::before {
        border-radius: 0.875rem;
        inset: -2px;
    }
    
    .video-btn .btn-number {
        font-size: 1.5rem;
        top: 0.375rem;
        left: 0.5rem;
    }
    
    .video-btn .btn-play {
        width: 2.25rem;
        height: 2.25rem;
        border-width: 2px;
    }
    
    .video-btn .btn-play svg {
        width: 0.875rem;
        height: 0.875rem;
        margin-left: 2px;
    }
    
    .video-btn .check-badge {
        padding: 0.125rem 0.25rem;
        top: 0.25rem;
        right: 0.25rem;
        border-radius: 0.25rem;
    }
    
    .video-btn .check-badge svg {
        width: 0.75rem;
        height: 0.75rem;
    }
    
    .video-btn .check-badge span {
        display: none;
    }
    
    /* Teams - horizontal scroll */
    .teams-section {
        padding: 0.625rem 0.5rem;
    }
    
    .teams-header {
        margin-bottom: 0.5rem;
        padding: 0 0.25rem;
    }
    
    .teams-title {
        font-size: 0.9375rem;
    }
    
    .teams-title svg {
        width: 18px;
        height: 18px;
    }
    
    .add-team-btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.875rem;
        border-radius: 0.5rem;
    }
    
    .add-team-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .teams-grid {
        gap: 0.625rem;
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }
    
    .team-card {
        min-width: 140px;
        padding: 0.625rem 0.75rem;
        border-radius: 0.75rem;
    }
    
    .team-card-header {
        margin-bottom: 0.5rem;
    }
    
    .team-name {
        font-size: 0.9375rem;
    }
    
    .team-color-dot {
        width: 0.625rem;
        height: 0.625rem;
    }
    
    .delete-team-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .team-score-section {
        gap: 0.5rem;
    }
    
    .team-score {
        font-size: 1.375rem;
        padding: 0.375rem 0.75rem;
        min-width: 4rem;
    }
    
    .team-score span {
        font-size: 0.75rem;
    }
    
    .score-btn {
        width: 2rem;
        height: 2rem;
        border-radius: 0.375rem;
    }
    
    .score-btn svg {
        width: 14px;
        height: 14px;
    }
    
    /* Player View */
    .player-header {
        padding: 0.5rem 0.75rem;
    }
    
    .back-btn-player {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
        border-radius: 0.5rem;
    }
    
    .back-btn-player svg {
        width: 18px;
        height: 18px;
    }
    
    .player-title-group {
        gap: 0.625rem;
    }
    
    .player-video-number {
        font-size: 1.375rem;
    }
    
    .player-logo {
        width: 2.25rem;
        height: 2.25rem;
        border-radius: 0.5rem;
    }
    
    .player-logo svg {
        width: 18px;
        height: 18px;
    }
    
    .player-main-title {
        font-size: 1.375rem;
    }
    
    .player-theme-badge {
        display: none;
    }
    
    .header-spacer {
        width: 80px;
    }
    
    .player-layout {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .video-wrapper {
        border-radius: 1rem;
        border-width: 3px;
    }

    .replay-video-btn {
        font-size: 1rem;
        padding: 0.75rem 1.25rem;
        border-radius: 0.75rem;
        border-width: 2px;
    }
    
    .mystery-card {
        padding: 1.5rem;
        border-radius: 1rem;
        border-width: 2px;
    }
    
    .mystery-icon {
        width: 3.5rem;
        height: 3.5rem;
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
    
    .mystery-title {
        font-size: 1.375rem;
        margin-bottom: 0.5rem;
    }
    
    .mystery-text {
        font-size: 1rem;
    }
    
    .reveal-btn {
        font-size: 1.125rem;
        padding: 0.875rem 1.5rem;
        border-radius: 1rem;
        gap: 0.625rem;
    }
    
    .reveal-btn svg {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .reveal-container {
        gap: 1.5rem;
    }
    
    .answer-section {
        gap: 0.75rem;
    }
    
    .sentence-card,
    .definition-card {
        padding: 1rem;
        border-radius: 0.875rem;
        border-width: 2px;
    }
    
    .sentence-label,
    .definition-label {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
        letter-spacing: 0.1em;
    }
    
    .full-sentence {
        font-size: 1.25rem;
        line-height: 1.4;
        margin-bottom: 0.75rem;
    }
    
    .highlighted-verb {
        padding: 0.125rem 0.5rem;
        border-radius: 0.25rem;
    }
    
    .definition-text {
        font-size: 1rem;
        line-height: 1.35;
    }
    
    .synonym-text {
        font-size: 2rem;
    }
    
    .listen-btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }
    
    .listen-btn svg {
        width: 1rem;
        height: 1rem;
    }
    
    /* Hide ambient effects on mobile for performance */
    .app::before,
    .app::after {
        display: none;
    }
}

@media (max-width: 480px) {
    /* Even more compact header */
    .header {
        padding: 0.375rem 0.5rem;
        gap: 0.375rem;
    }
    
    .back-btn {
        width: 2rem;
        height: 2rem;
    }
    
    .back-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .main-title {
        font-size: 1rem;
    }
    
    .reset-btn {
        width: 2rem;
        height: 2rem;
    }
    
    .reset-btn svg {
        width: 16px;
        height: 16px;
    }
    
    /* Game area */
    .game-area {
        padding: 0.375rem;
    }
    
    .game-header {
        margin-bottom: 0.375rem;
    }
    
    .game-title {
        font-size: 1.125rem;
    }
    
    .game-title .emoji {
        font-size: 1rem;
    }
    
    .game-subtitle {
        font-size: 0.625rem;
    }
    
    /* Video cards - even more compact but keep 5x2 */
    .video-selection {
        padding: 0.25rem;
    }
    
    .video-buttons {
        gap: 0.375rem;
    }
    
    .video-btn {
        border-radius: 0.625rem;
    }
    
    .video-btn::before {
        border-radius: 0.75rem;
        inset: -2px;
    }
    
    .video-btn .btn-number {
        font-size: 1.25rem;
        top: 0.25rem;
        left: 0.375rem;
    }
    
    .video-btn .btn-play {
        width: 1.75rem;
        height: 1.75rem;
        border-width: 2px;
    }
    
    .video-btn .btn-play svg {
        width: 0.75rem;
        height: 0.75rem;
    }
    
    .video-btn .check-badge {
        padding: 0.0625rem 0.125rem;
        top: 0.125rem;
        right: 0.125rem;
        border-radius: 0.1875rem;
    }
    
    .video-btn .check-badge svg {
        width: 0.625rem;
        height: 0.625rem;
    }
    
    /* Teams section */
    .teams-section {
        padding: 0.5rem;
    }
    
    .teams-header {
        margin-bottom: 0.375rem;
    }
    
    .teams-title {
        font-size: 0.8125rem;
        gap: 0.375rem;
    }
    
    .teams-title svg {
        width: 16px;
        height: 16px;
    }
    
    .add-team-btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
        gap: 0.25rem;
    }
    
    .add-team-btn svg {
        width: 12px;
        height: 12px;
    }
    
    .teams-grid {
        gap: 0.5rem;
    }
    
    .team-card {
        min-width: 115px;
        padding: 0.5rem 0.625rem;
        border-radius: 0.625rem;
    }
    
    .team-card::before {
        height: 3px;
    }
    
    .team-card-header {
        margin-bottom: 0.375rem;
    }
    
    .team-name-section {
        gap: 0.375rem;
    }
    
    .team-name {
        font-size: 0.8125rem;
    }
    
    .team-color-dot {
        width: 0.5rem;
        height: 0.5rem;
    }
    
    .delete-team-btn {
        padding: 0.125rem;
    }
    
    .delete-team-btn svg {
        width: 12px;
        height: 12px;
    }
    
    .team-score-section {
        gap: 0.375rem;
    }
    
    .team-score {
        font-size: 1.125rem;
        padding: 0.25rem 0.5rem;
        min-width: 3.5rem;
    }
    
    .team-score span {
        font-size: 0.625rem;
    }
    
    .score-btn {
        width: 1.75rem;
        height: 1.75rem;
    }
    
    .score-btn svg {
        width: 12px;
        height: 12px;
    }
    
    /* Player View */
    .player-header {
        padding: 0.375rem 0.5rem;
    }
    
    .back-btn-player {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
        gap: 0.25rem;
    }
    
    .back-btn-player svg {
        width: 14px;
        height: 14px;
    }
    
    .player-title-group {
        gap: 0.5rem;
    }
    
    .player-video-number {
        font-size: 1.125rem;
    }
    
    .player-logo {
        width: 2rem;
        height: 2rem;
        border-radius: 0.375rem;
    }
    
    .player-logo svg {
        width: 14px;
        height: 14px;
    }
    
    .player-main-title {
        font-size: 1rem;
    }
    
    .player-theme-badge {
        display: none;
    }
    
    .header-spacer {
        width: 60px;
    }
    
    .player-layout {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .video-wrapper {
        border-radius: 0.75rem;
        border-width: 2px;
    }
    
    .mystery-card {
        padding: 1.25rem;
        border-radius: 0.875rem;
    }
    
    .mystery-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .mystery-title {
        font-size: 1.125rem;
        margin-bottom: 0.375rem;
    }
    
    .mystery-text {
        font-size: 0.875rem;
    }
    
    .reveal-container {
        gap: 1.25rem;
    }
    
    .reveal-btn {
        font-size: 1rem;
        padding: 0.75rem 1.25rem;
        border-radius: 0.75rem;
    }
    
    .reveal-btn svg {
        width: 1.125rem;
        height: 1.125rem;
    }
    
    .answer-section {
        gap: 0.5rem;
    }
    
    .sentence-card,
    .definition-card {
        padding: 0.875rem;
        border-radius: 0.75rem;
    }
    
    .sentence-label,
    .definition-label {
        font-size: 0.625rem;
        margin-bottom: 0.375rem;
    }
    
    .full-sentence {
        font-size: 1.0625rem;
        margin-bottom: 0.625rem;
    }
    
    .highlighted-verb {
        padding: 0.0625rem 0.375rem;
        font-size: 1rem;
    }
    
    .definition-text {
        font-size: 0.875rem;
    }
    
    .synonym-text {
        font-size: 1.75rem;
    }
    
    .listen-btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .listen-btn svg {
        width: 0.875rem;
        height: 0.875rem;
    }
}

/* ========================================
   V4 RESPONSIVE CLIP/SCROLL SAFETY PATCH
   Same principle as Definitions V4:
   shrink first, then scroll the real content area instead of clipping.
   This patch is intentionally last so it wins the cascade.
   ======================================== */
@media (min-width: 900px) {
    .game-area {
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-gutter: stable;
        overscroll-behavior: contain;
    }

    .video-selection,
    .player-layout {
        min-height: 0;
    }

    .player-layout {
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-gutter: stable;
        overscroll-behavior: contain;
    }

    .video-section,
    .answer-section,
    .sentence-card,
    .definition-card,
    .hint-section,
    .teams-section,
    .footer {
        flex-shrink: 0;
    }
}

/* Medium teacher-laptop/projector heights, including responsive test panes around 1058px tall. */
@media (min-width: 900px) and (max-height: 1100px) {
    .header,
    .player-header {
        padding-top: clamp(0.35rem, 0.75vh, 0.55rem);
        padding-bottom: clamp(0.35rem, 0.75vh, 0.55rem);
    }

    .game-area {
        padding-top: clamp(0.45rem, 0.9vh, 0.85rem);
        padding-bottom: clamp(0.3rem, 0.6vh, 0.5rem);
    }

    .game-header {
        margin-bottom: clamp(0.2rem, 0.55vh, 0.4rem);
    }

    .game-title {
        font-size: clamp(1.6rem, 3vh, 2.05rem);
        line-height: 1.05;
    }

    .game-subtitle {
        font-size: clamp(0.85rem, 1.45vh, 1rem);
    }

    .video-selection {
        justify-content: flex-start;
        padding-top: clamp(0.75rem, 1.4vh, 1.2rem);
        padding-bottom: clamp(0.5rem, 1vh, 0.8rem);
    }

    .video-buttons {
        gap: clamp(1rem, 1.75vw, 2rem);
    }

    .video-btn {
        min-height: clamp(105px, 15vh, 140px);
    }

    .player-layout {
        gap: clamp(1rem, 1.8vw, 2rem);
        padding: clamp(1rem, 2vh, 2rem) clamp(1rem, 2vw, 2.25rem);
    }

    .sentence-card,
    .definition-card {
        padding: clamp(1rem, 1.7vh, 1.8rem);
    }

    .full-sentence {
        font-size: clamp(1.45rem, 2.8vh, 2.25rem);
        line-height: 1.22;
    }

    .verb-text {
        font-size: clamp(2rem, 4.4vh, 3.4rem);
        line-height: 0.95;
    }

    .definition-text {
        font-size: clamp(1.1rem, 2.1vh, 1.55rem);
        line-height: 1.25;
    }
}

/* Short and very short desktop viewports. */
@media (min-width: 900px) and (max-height: 820px) {
    .game-area {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .video-buttons {
        gap: 1rem;
    }

    .video-btn {
        min-height: 95px;
    }

    .player-layout {
        gap: 1rem;
        padding: 0.75rem 1.25rem;
    }

    .teams-section {
        padding-top: 0.35rem;
        padding-bottom: 0.45rem;
    }

    .footer {
        padding-top: 0.2rem;
        padding-bottom: 0.2rem;
    }
}

@media (min-width: 900px) and (max-height: 720px) {
    .game-title {
        font-size: 1.45rem;
    }

    .video-btn {
        min-height: 82px;
    }

    .player-layout {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .sentence-card,
    .definition-card {
        padding: 0.85rem;
    }

    .full-sentence {
        font-size: clamp(1.2rem, 3.1vh, 1.65rem);
    }

    .verb-text {
        font-size: clamp(1.65rem, 5vh, 2.5rem);
    }
}
