/**
 * Goal Rush - Football Math Game
 * Improved Stylesheet - Best of Both!
 */

/* ===================================
   CSS RESET & BASE
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*::before,
*::after {
    box-sizing: border-box;
}

/* ===================================
   CSS VARIABLES
   =================================== */
:root {
    /* Colors - Teams */
    --color-blue-team: #2196F3;
    --color-blue-light: #64B5F6;
    --color-blue-dark: #1976D2;
    --color-red-team: #F44336;
    --color-red-light: #EF5350;
    --color-red-dark: #D32F2F;
    --color-green-team: #4CAF50;
    --color-green-light: #66BB6A;
    --color-green-dark: #388E3C;
    --color-opponent: #9C27B0;

    /* Colors - UI */
    --color-primary: #FF6B35;
    --color-secondary: #004E89;
    --color-success: #4CAF50;
    --color-warning: #FFC107;
    --color-error: #F44336;
    --color-info: #2196F3;

    /* Colors - Neutrals */
    --color-white: #FFFFFF;
    --color-black: #212121;
    --color-grey-light: #F5F5F5;
    --color-grey-medium: #BDBDBD;
    --color-grey-dark: #424242;
    
    /* Colors - Field */
    --color-field-green: #4CAF50;
    --color-field-light: #66BB6A;
    --color-field-dark: #2E7D32;
    --color-sky: #87CEEB;

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;
    --font-size-xxl: 2rem;
    --font-size-huge: 3rem;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-round: 50%;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===================================
   GLOBAL STYLES
   =================================== */
body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-black);
    background: linear-gradient(180deg, var(--color-sky) 0%, #E3F2FD 100%);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ===================================
   STADIUM BACKGROUND - NIEUWE ANIMATIES!
   =================================== */
.stadium-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--color-sky) 0%, #E3F2FD 100%);
    z-index: -1;
    overflow: hidden;
}

/* Grote vrolijke zon */
.sun {
    position: absolute;
    top: 50px;
    right: 80px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, #FFD700 0%, #FFA500 100%);
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
    animation: sunPulse 4s ease-in-out infinite;
}

.sun::before {
    content: '☀️';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 60px;
    animation: sunRotate 20s linear infinite;
}

@keyframes sunPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.6);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 0 60px rgba(255, 215, 0, 0.8);
    }
}

@keyframes sunRotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Vrolijke wolken */
.cloud {
    position: absolute;
    background: white;
    border-radius: 100px;
    opacity: 0.8;
    animation: floatCloud 40s linear infinite;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 100px;
}

.cloud-1 {
    width: 100px;
    height: 40px;
    top: 100px;
    left: -120px;
    animation-duration: 35s;
}

.cloud-1::before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 15px;
}

.cloud-1::after {
    width: 60px;
    height: 40px;
    top: -15px;
    right: 10px;
}

.cloud-2 {
    width: 80px;
    height: 35px;
    top: 160px;
    left: -100px;
    animation-duration: 45s;
    animation-delay: 5s;
}

.cloud-2::before {
    width: 40px;
    height: 40px;
    top: -20px;
    left: 12px;
}

.cloud-2::after {
    width: 50px;
    height: 35px;
    top: -12px;
    right: 8px;
}

.cloud-3 {
    width: 120px;
    height: 45px;
    top: 220px;
    left: -140px;
    animation-duration: 50s;
    animation-delay: 10s;
}

.cloud-3::before {
    width: 60px;
    height: 60px;
    top: -30px;
    left: 20px;
}

.cloud-3::after {
    width: 70px;
    height: 45px;
    top: -20px;
    right: 12px;
}

.cloud-4 {
    width: 90px;
    height: 38px;
    top: 140px;
    left: -110px;
    animation-duration: 42s;
    animation-delay: 15s;
}

.cloud-4::before {
    width: 45px;
    height: 45px;
    top: -22px;
    left: 13px;
}

.cloud-4::after {
    width: 55px;
    height: 38px;
    top: -14px;
    right: 9px;
}

@keyframes floatCloud {
    from { 
        transform: translateX(0);
    }
    to { 
        transform: translateX(calc(100vw + 200px));
    }
}

/* Stadium Lights - Knipperend! */
.stadium-lights {
    position: absolute;
    top: 0;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: space-around;
    padding: var(--spacing-md);
}

.light {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    animation: lightBlink 2s ease-in-out infinite;
    box-shadow: 0 0 20px currentColor;
}

.light-1 {
    background: radial-gradient(circle, #FF6B6B, #FF4757);
    animation-delay: 0s;
}

.light-2 {
    background: radial-gradient(circle, #4ECDC4, #1B9AAA);
    animation-delay: 0.5s;
}

.light-3 {
    background: radial-gradient(circle, #FFD93D, #F9CA24);
    animation-delay: 1s;
}

.light-4 {
    background: radial-gradient(circle, #95E1D3, #38C29D);
    animation-delay: 1.5s;
}

@keyframes lightBlink {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
        box-shadow: 0 0 20px currentColor;
    }
    50% { 
        opacity: 0.5; 
        transform: scale(0.9);
        box-shadow: 0 0 10px currentColor;
    }
}

/* Publiek - Wave animatie! */
.crowd-section {
    position: absolute;
    bottom: 0;
    width: 20%;
    height: 120px;
    background: repeating-linear-gradient(
        90deg,
        #FF6B6B 0px,
        #4ECDC4 8px,
        #FFD93D 16px,
        #95E1D3 24px
    );
    animation: crowdWave 2s ease-in-out infinite;
}

.crowd-left {
    left: 0;
    border-radius: 0 40% 0 0;
}

.crowd-right {
    right: 0;
    border-radius: 40% 0 0 0;
    animation-delay: 1s;
}

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

/* ===================================
   GAME CONTAINER
   =================================== */
.game-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-lg);
    min-height: 100vh;
}

/* ===================================
   SCREEN SYSTEM
   =================================== */
.screen {
    display: none;
    animation: fadeIn 0.4s ease;
    width: 100%;
    max-width: 100%;
}

.screen.active {
    display: block;
    width: 100%;
    max-width: 100%;
}

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

/* ===================================
   WELCOME SCREEN
   =================================== */
.welcome-content {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xxl);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.game-title {
    font-size: var(--font-size-huge);
    font-weight: 900;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
    animation: titleBounce 2s ease-in-out infinite;
}

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

.game-subtitle {
    font-size: var(--font-size-xl);
    color: var(--color-grey-dark);
    margin-bottom: var(--spacing-xl);
}

/* ===================================
   SELECTION SECTIONS
   =================================== */
.selection-section {
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: var(--spacing-md);
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-md);
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Team Buttons */
.team-selection {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.btn-team {
    flex: 1;
    min-width: 120px;
    flex-direction: column;
    background: var(--color-white);
    color: var(--color-grey-dark);
    border-color: var(--color-grey-medium);
}

.btn-team:hover {
    border-color: var(--color-grey-dark);
}

.btn-team.active[data-team="blue"] {
    background: var(--color-blue-team);
    color: var(--color-white);
    border-color: var(--color-blue-dark);
    animation: teamPulse 1s ease-in-out infinite;
}

.btn-team.active[data-team="red"] {
    background: var(--color-red-team);
    color: var(--color-white);
    border-color: var(--color-red-dark);
    animation: teamPulse 1s ease-in-out infinite;
}

.btn-team.active[data-team="green"] {
    background: var(--color-green-team);
    color: var(--color-white);
    border-color: var(--color-green-dark);
    animation: teamPulse 1s ease-in-out infinite;
}

@keyframes teamPulse {
    0%, 100% { box-shadow: var(--shadow-sm); }
    50% { box-shadow: var(--shadow-md); }
}

.team-emoji {
    font-size: 3rem;
    animation: teamBounce 1.5s ease-in-out infinite;
}

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

.team-name {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-top: var(--spacing-sm);
}

/* Operation Buttons */
.operation-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--spacing-md);
}

.btn-operation {
    flex: 1;
    min-width: 150px;
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--color-white), var(--color-grey-light));
    color: var(--color-grey-dark);
    border-color: var(--color-grey-medium);
}

.btn-operation:hover {
    border-color: var(--color-grey-dark);
}

.btn-operation.active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    animation: wiggle 0.5s ease;
}

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

/* Difficulty Buttons */
.difficulty-selection {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.btn-difficulty {
    flex: 1;
    min-width: 120px;
    background: var(--color-white);
    color: var(--color-grey-dark);
    border-color: var(--color-grey-medium);
}

.btn-difficulty:hover {
    border-color: var(--color-grey-dark);
}

.btn-difficulty[data-difficulty="easy"].active {
    background: var(--color-success);
    color: var(--color-white);
    border-color: var(--color-success);
}

.btn-difficulty[data-difficulty="medium"].active {
    background: var(--color-warning);
    color: var(--color-black);
    border-color: var(--color-warning);
}

.btn-difficulty[data-difficulty="hard"].active {
    background: var(--color-error);
    color: var(--color-white);
    border-color: var(--color-error);
}

/* Primary Button */
.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
    font-size: var(--font-size-xl);
    padding: var(--spacing-lg) var(--spacing-xxl);
    margin-top: var(--spacing-xl);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        box-shadow: var(--shadow-sm), 0 0 0 0 rgba(255, 107, 53, 0.7);
    }
    50% { 
        box-shadow: var(--shadow-md), 0 0 0 10px rgba(255, 107, 53, 0);
    }
}

.btn-primary:hover {
    background: var(--color-secondary);
}

.btn-large {
    font-size: var(--font-size-lg);
    padding: var(--spacing-lg) var(--spacing-xl);
}

.btn-secondary {
    background: var(--color-secondary);
    color: var(--color-white);
}

/* ===================================
   GAME RULES
   =================================== */
.game-rules {
    margin-top: var(--spacing-xl);
    background: var(--color-grey-light);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: left;
}

.game-rules h3 {
    font-size: var(--font-size-xl);
    color: var(--color-secondary);
    margin-bottom: var(--spacing-md);
}

.game-rules ul {
    list-style: none;
    padding: 0;
}

.game-rules li {
    font-size: var(--font-size-base);
    color: var(--color-grey-dark);
    margin-bottom: var(--spacing-sm);
    padding-left: var(--spacing-lg);
    position: relative;
}

.game-rules li::before {
    content: attr(data-icon);
    position: absolute;
    left: 0;
    font-size: var(--font-size-lg);
}

/* ===================================
   GAME SCREEN
   =================================== */

/* Game Header */
.game-header {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    max-width: 100%;
    width: 100%;
}

/* Scoreboard */
.scoreboard {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.score-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.team-badge {
    font-size: 4rem;
    animation: badgeBounce 2s ease-in-out infinite;
}

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

.team-label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-grey-dark);
    text-transform: uppercase;
}

.score {
    font-size: var(--font-size-huge);
    font-weight: 900;
    color: var(--color-primary);
}

.match-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

.match-time {
    font-size: var(--font-size-xxl);
    font-weight: 700;
    color: var(--color-error);
    font-family: 'Courier New', monospace;
}

.half-indicator {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-grey-dark);
    text-transform: uppercase;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    gap: var(--spacing-md);
    justify-content: space-around;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-sm);
}

.stat-label {
    color: var(--color-grey-dark);
}

.stat-value {
    font-weight: 700;
    color: var(--color-primary);
}

.stamina-stat {
    flex-direction: column;
    align-items: stretch;
    min-width: 120px;
}

.stamina-bar {
    width: 100%;
    height: 12px;
    background: var(--color-grey-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.stamina-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--color-success), var(--color-green-light));
    transition: width var(--transition-normal);
    animation: stamina-pulse 2s ease-in-out infinite;
}

@keyframes stamina-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ===================================
   FOOTBALL FIELD
   =================================== */
.football-field {
    position: relative;
    width: 100%;
    height: 450px;
    background: linear-gradient(180deg, var(--color-field-green) 0%, var(--color-field-light) 50%, var(--color-field-green) 100%);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* Field stripes */
.football-field::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 40px,
        rgba(255, 255, 255, 0.05) 40px,
        rgba(255, 255, 255, 0.05) 80px
    );
}

.field-line {
    position: absolute;
    background: white;
}

.center-line {
    width: 3px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.field-circle {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 3px solid white;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.field-circle::after {
    content: '⚽';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
}

.penalty-box {
    position: absolute;
    width: 120px;
    height: 160px;
    border: 3px solid white;
    top: 50%;
    transform: translateY(-50%);
}

.penalty-box-left {
    left: 0;
    border-left: none;
}

.penalty-box-right {
    right: 0;
    border-right: none;
}

.goal {
    position: absolute;
    width: 20px;
    height: 80px;
    background: repeating-linear-gradient(
        0deg,
        white 0px,
        white 2px,
        transparent 2px,
        transparent 10px
    ),
    repeating-linear-gradient(
        90deg,
        white 0px,
        white 2px,
        transparent 2px,
        transparent 10px
    );
    top: 50%;
    transform: translateY(-50%);
}

.goal-left {
    left: 0;
    border-right: 3px solid white;
}

.goal-right {
    right: 0;
    border-left: 3px solid white;
}

/* Ball - Betere animatie! */
.ball {
    position: absolute;
    font-size: 2rem;
    z-index: 10;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.ball.moving {
    animation: ballRoll 0.6s ease-out;
}

@keyframes ballRoll {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(720deg); }
}

/* Goalkeeper - Betere animatie! */
.goalkeeper {
    position: absolute;
    font-size: 3rem;
    z-index: 5;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
    transition: all 0.4s ease-out;
}

.goalkeeper.diving {
    animation: keeperDive 0.8s ease-out;
}

@keyframes keeperDive {
    0% { transform: translateX(0) rotate(0deg); }
    50% { transform: translateX(30px) rotate(-20deg) scale(1.2); }
    100% { transform: translateX(0) rotate(0deg); }
}

/* Goal Animation - Nieuwe! */
.goal-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
}

.goal-animation.show {
    animation: goalCelebration 2s ease-out forwards;
}

@keyframes goalCelebration {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.5) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(2) rotate(360deg);
    }
}

/* Miss Animation - Nieuwe! */
.miss-animation {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
}

.miss-animation.show {
    animation: missFade 2s ease-out forwards;
}

@keyframes missFade {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(0) scale(0);
    }
    30% {
        opacity: 1;
        transform: translateX(-50%) translateY(-20px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-40px) scale(0.8);
    }
}

/* Commentary Box - Nieuwe animatie! */
.commentary-box {
    position: absolute;
    bottom: var(--spacing-md);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-width: 80%;
    z-index: 20;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.commentary-box.show {
    opacity: 1;
    animation: commentarySlide 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes commentarySlide {
    0% { 
        transform: translateX(-50%) translateY(20px) scale(0.8);
    }
    100% { 
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

#commentary-text {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-secondary);
    margin: 0;
}

/* ===================================
   QUESTION PANEL
   =================================== */
.question-panel {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--spacing-lg);
    max-width: 100%;
    width: 100%;
}

.question-section {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.question-label {
    font-size: var(--font-size-lg);
    color: var(--color-secondary);
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

.question-text {
    font-size: var(--font-size-xxl);
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
    animation: questionPulse 2s ease-in-out infinite;
}

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

.answer-section {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    align-items: stretch;
    margin-bottom: var(--spacing-md);
}

.answer-input {
    flex: 1;
    max-width: 200px;
    font-family: var(--font-family);
    font-size: var(--font-size-xl);
    font-weight: 700;
    text-align: center;
    padding: var(--spacing-md);
    border: 2px solid var(--color-grey-medium);
    border-radius: var(--radius-md);
    background: var(--color-white);
    color: var(--color-black);
    transition: all var(--transition-normal);
}

.answer-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.answer-input::placeholder {
    color: var(--color-grey-medium);
}

.btn-submit {
    min-width: 120px;
    background: var(--color-success);
    color: var(--color-white);
}

.btn-submit:hover {
    background: var(--color-green-dark);
}

.feedback-message {
    font-size: var(--font-size-lg);
    font-weight: 600;
    text-align: center;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-md);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.feedback-message.show {
    opacity: 1;
    transform: scale(1);
}

.feedback-message.correct {
    background: var(--color-success);
    color: var(--color-white);
}

.feedback-message.incorrect {
    background: var(--color-error);
    color: var(--color-white);
}

/* ===================================
   CONTROLS PANEL
   =================================== */
.controls-panel {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    max-width: 100%;
    width: 100%;
}

.tactics-section,
.powerups-section {
    margin-bottom: var(--spacing-lg);
}

.tactics-section:last-child,
.powerups-section:last-child {
    margin-bottom: 0;
}

.control-label {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-secondary);
    margin-bottom: var(--spacing-md);
    display: block;
}

.tactic-select {
    width: 100%;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    padding: var(--spacing-md);
    border: 2px solid var(--color-grey-medium);
    border-radius: var(--radius-md);
    background: var(--color-white);
    color: var(--color-black);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.tactic-select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

.powerups-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.btn-powerup {
    flex-direction: column;
    padding: var(--spacing-md);
    background: var(--color-grey-light);
    color: var(--color-grey-dark);
    border-color: var(--color-grey-medium);
    position: relative;
}

.btn-powerup:hover:not(:disabled) {
    background: var(--color-grey-medium);
}

.btn-powerup:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-powerup.active {
    background: var(--color-warning);
    border-color: var(--color-warning);
    animation: powerupActive 1s ease-in-out infinite;
}

@keyframes powerupActive {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 193, 7, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 193, 7, 0.8); }
}

.powerup-icon {
    font-size: 2rem;
}

.powerup-name {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-top: var(--spacing-xs);
}

.powerup-count {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--color-primary);
    color: var(--color-white);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: 700;
}

/* ===================================
   HALFTIME SCREEN
   =================================== */
.halftime-content {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xxl);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.halftime-title {
    font-size: var(--font-size-huge);
    font-weight: 900;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xl);
    animation: titleBounce 2s ease-in-out infinite;
}

.halftime-score {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xxl);
}

.halftime-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.team-badge-large {
    font-size: 5rem;
    animation: badgeBounce 2s ease-in-out infinite;
}

.score-large {
    font-size: var(--font-size-huge);
    font-weight: 900;
    color: var(--color-primary);
}

.score-separator {
    font-size: var(--font-size-huge);
    font-weight: 900;
    color: var(--color-grey-dark);
}

.halftime-stats {
    margin-bottom: var(--spacing-xxl);
}

.stats-title {
    font-size: var(--font-size-xl);
    color: var(--color-secondary);
    margin-bottom: var(--spacing-lg);
    font-weight: 700;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
}

.stat-box {
    background: var(--color-grey-light);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.stat-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--color-grey-dark);
    margin-bottom: var(--spacing-xs);
}

.stat-number {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-primary);
}

.coach-message-box {
    background: var(--color-info);
    color: var(--color-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-xl);
}

.coach-label {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.coach-message {
    font-size: var(--font-size-base);
    line-height: 1.6;
}

/* ===================================
   PENALTY SCREEN
   =================================== */
.penalty-content {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xxl);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.penalty-title {
    font-size: var(--font-size-huge);
    font-weight: 900;
    color: var(--color-error);
    margin-bottom: var(--spacing-md);
    animation: titleBounce 1s ease-in-out infinite;
}

.penalty-subtitle {
    font-size: var(--font-size-xl);
    color: var(--color-grey-dark);
    margin-bottom: var(--spacing-xl);
}

.penalty-score {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.penalty-score-value {
    font-size: var(--font-size-huge);
    font-weight: 900;
    color: var(--color-primary);
}

.penalty-round {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: var(--spacing-lg);
}

/* Penalty Goal */
.penalty-goal {
    position: relative;
    width: 100%;
    height: 300px;
    background: linear-gradient(180deg, var(--color-field-green) 0%, var(--color-field-light) 100%);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-xl);
    overflow: hidden;
}

.penalty-net {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 60%;
    border: 4px solid white;
    border-radius: var(--radius-md);
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 15px,
        rgba(255, 255, 255, 0.2) 15px,
        rgba(255, 255, 255, 0.2) 17px
    ),
    repeating-linear-gradient(
        90deg,
        transparent,
        transparent 15px,
        rgba(255, 255, 255, 0.2) 15px,
        rgba(255, 255, 255, 0.2) 17px
    );
}

.penalty-keeper {
    position: absolute;
    font-size: 4rem;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
    z-index: 10;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.penalty-keeper.diving-left {
    animation: keeperDiveLeft 0.6s ease-out;
}

.penalty-keeper.diving-right {
    animation: keeperDiveRight 0.6s ease-out;
}

@keyframes keeperDiveLeft {
    0% { transform: translateX(-50%); }
    50% { transform: translateX(-120%) rotate(-25deg) scale(1.1); }
    100% { transform: translateX(-50%); }
}

@keyframes keeperDiveRight {
    0% { transform: translateX(-50%); }
    50% { transform: translateX(20%) rotate(25deg) scale(1.1); }
    100% { transform: translateX(-50%); }
}

.penalty-targets {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    padding: 12%;
    pointer-events: none;
}

.penalty-target {
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    pointer-events: auto;
}

.penalty-target:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    transform: scale(1.05);
}

.penalty-target:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Penalty Question */
.penalty-question-panel {
    background: var(--color-grey-light);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
}

.penalty-question {
    font-size: var(--font-size-xxl);
    font-weight: 700;
    color: var(--color-primary);
    margin: var(--spacing-md) 0;
}

.penalty-answer-section {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    align-items: stretch;
    margin-bottom: var(--spacing-md);
}

.penalty-instruction {
    font-size: var(--font-size-base);
    color: var(--color-grey-dark);
    margin-bottom: var(--spacing-md);
}

.penalty-feedback {
    font-size: var(--font-size-lg);
    font-weight: 600;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-md);
}

/* ===================================
   RESULTS SCREEN
   =================================== */
.results-content {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xxl);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.result-header {
    margin-bottom: var(--spacing-xxl);
}

.result-title {
    font-size: var(--font-size-huge);
    font-weight: 900;
    margin-bottom: var(--spacing-md);
    animation: titleBounce 1.5s ease-in-out infinite;
}

.result-title.win {
    color: var(--color-success);
}

.result-title.loss {
    color: var(--color-error);
}

.result-title.draw {
    color: var(--color-info);
}

.result-trophy {
    font-size: 6rem;
    margin-bottom: var(--spacing-md);
    animation: trophySpin 3s ease-in-out infinite;
}

@keyframes trophySpin {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(15deg); }
}

.result-message {
    font-size: var(--font-size-xl);
    color: var(--color-grey-dark);
}

.final-scoreboard {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xxl);
}

.final-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
}

.final-team-badge {
    font-size: 5rem;
    animation: badgeBounce 2s ease-in-out infinite;
}

.final-team-name {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--color-secondary);
}

.final-score-value {
    font-size: var(--font-size-huge);
    font-weight: 900;
    color: var(--color-primary);
}

.final-separator {
    font-size: var(--font-size-huge);
    font-weight: 900;
    color: var(--color-grey-dark);
}

.final-statistics {
    margin-bottom: var(--spacing-xxl);
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-lg);
}

.stat-card {
    background: var(--color-grey-light);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-card-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.stat-card-value {
    font-size: var(--font-size-xl);
    font-weight: 900;
    color: var(--color-primary);
    margin-bottom: var(--spacing-xs);
}

.stat-card-label {
    font-size: var(--font-size-sm);
    color: var(--color-grey-dark);
}

.result-actions {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
    .scoreboard {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .stats-bar {
        flex-direction: column;
    }

    .football-field {
        height: 300px;
    }

    .answer-section {
        flex-direction: column;
    }

    .answer-input {
        max-width: 100%;
    }

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

    .halftime-score,
    .penalty-score,
    .final-scoreboard {
        flex-direction: column;
        gap: var(--spacing-md);
    }

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

    .result-actions {
        flex-direction: column;
    }

    .btn-large {
        width: 100%;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

*:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* ===================================
   PRINT STYLES
   =================================== */
@media print {
    .stadium-background,
    .btn,
    .controls-panel {
        display: none !important;
    }

    body {
        background: white;
    }

    .game-container {
        max-width: 100%;
    }
}

/* ===================================
   FOOTER
   =================================== */
.game-footer {
    text-align: center;
    padding: var(--spacing-md);
    color: white;
    font-size: var(--font-size-sm);
}
.game-footer p { color: white; }
.game-footer a { color: white; text-decoration: none; font-weight: bold; }
.game-footer a:hover { color: #ffd166; text-decoration: underline; }
