/* =========================================================================
   ASTEROID BLASTER - W PEŁNI RESPONSYWNY CSS + SHATTER EFEKT (NAPRAWIONY)
   ========================================================================= */

/* 1. RESET & COMPATIBILITY */
body, html { margin: 0 !important; padding: 0 !important; overflow: hidden !important; }
/* Usuwamy reset .container oraz CAŁĄ NAWIGACJĘ w tym DOLNY PASEK MOBILNY */
footer, .site-footer, #main-footer, .footer,
.admin-analytics-panel, .public-analytics-counter,
.mobile-bottom-nav, #mobile-floating-bell, .floating-bell-wrapper { 
    display: none !important; 
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#game-wrapper {
    position: fixed; 
    top: 0; /* Header is hidden globally, this removes the gap */
    left: 0; right: 0; bottom: 0; z-index: 50;
    background: #0f172a; overflow: hidden; color: white; 
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none; /* Blokuje domyślne pop-upy iOS (np. Zapisz Obraz) przy przytrzymaniu */
    touch-action: none; /* Całkowicie blokuje zoom, scroll i pinch w obrębie kontenera */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex; flex-direction: column;
}

/* --- KOSMICZNE TŁO (GWIAZDY, GALAKTYKI I MGŁAWICE - FULL VIEWPORT) --- */
#stars-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: #050810;
    
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(56, 189, 248, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(244, 63, 94, 0.05) 0%, transparent 50%),
        radial-gradient(2px 2px at 15% 15%, #fff 100%, transparent),
        radial-gradient(3px 3px at 85% 25%, rgba(56, 189, 248, 0.8) 100%, transparent),
        radial-gradient(2px 2px at 40% 80%, rgba(253, 224, 71, 0.8) 100%, transparent),
        radial-gradient(1px 1px at 10% 10%, #fff, transparent),
        radial-gradient(1px 1px at 30% 50%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 70% 30%, #fff, transparent),
        radial-gradient(1px 1px at 90% 90%, #fff, transparent),
        radial-gradient(2px 2px at 80% 40%, rgba(56, 189, 248, 0.4), transparent),
        radial-gradient(1.5px 1.5px at 15% 70%, #fff, transparent);

    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-attachment: fixed;
    animation: space-subtle-pulse 20s ease-in-out infinite alternate;
}

@keyframes space-subtle-pulse {
    0% { transform: scale(1); filter: brightness(1); }
    100% { transform: scale(1.05); filter: brightness(1.2); }
}

#stars-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(5, 8, 16, 0.4) 100%);
    pointer-events: none;
}

/* --- MENU I EKRANY OVERLAY --- */
.overlay-screen { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.9); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 15px; backdrop-filter: blur(5px); }
.menu-card { background: #1e293b; border-radius: 20px; border: 2px solid #334155; box-shadow: 0 0 50px rgba(0,0,0,0.8); display: flex; flex-direction: column; max-width: 600px; width: 100%; overflow: hidden; z-index: 10; max-height: 95vh; }
.card-controls-bar { width: 100%; display: flex; justify-content: space-between; padding: 10px 20px; background: #0f172a; border-bottom: 1px solid #334155; align-items: center; flex-shrink: 0;}
.control-btn { background: #334155; border: none; color: white; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; display: flex; justify-content: center; align-items: center; font-size: 1.2rem; transition: 0.2s; flex-shrink: 0;}
.control-btn:hover { background: #475569; transform: scale(1.1); }
.card-content { padding: 30px; display: flex; flex-direction: column; align-items: center; text-align: center; overflow-y: auto; }

.mode-selector { display: flex; gap: 10px; margin-bottom: 20px; width: 100%; background: #0f172a; padding: 5px; border-radius: 12px; }
.mode-btn { flex: 1; padding: 10px; font-weight: bold; border-radius: 8px; border: none; background: transparent; color: #94a3b8; cursor: pointer; transition: 0.3s;}
.mode-btn.active { background: #38bdf8; color: #0f172a; }

.time-selector { margin-bottom: 20px; width: 100%; }
.time-btns { display: flex; gap: 8px; justify-content: center; }
.t-btn { flex: 1; padding: 10px; font-weight: bold; border-radius: 8px; background: #334155; color: #cbd5e1; border: none; cursor: pointer;}
.t-btn.active { background: #f59e0b; color: #0f172a; }

.player-profile-wrapper, .group-naming-area { display: flex; align-items: center; background: #0f172a; border: 2px solid #334155; border-radius: 50px; padding: 5px 15px; width: 100%; margin-bottom: 20px; gap: 10px;}
.group-naming-area { flex-direction: column; background: transparent; border: none; padding: 0;}
.group-input-wrapper { display: flex; width: 100%; background: #0f172a; border: 2px solid #334155; border-radius: 50px; padding: 10px 15px;}
.name-input, .group-name-input { border: none; background: transparent; color: white; outline: none; font-size: 1rem; font-weight: bold; width: 100%; text-align: center;}
.btn-start { background: linear-gradient(135deg, #10b981, #059669); border: none; color: white; padding: 15px 40px; font-size: 1.2rem; font-weight: 900; border-radius: 50px; cursor: pointer; box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4); transition: 0.2s; width: 100%; text-transform: uppercase; letter-spacing: 1px; flex-shrink: 0;}
.btn-start:hover { transform: translateY(-3px) scale(1.05); }
.volume-group { display: flex; align-items: center; gap: 10px; }
.vol-slider { width: 80px; accent-color: #38bdf8; cursor: pointer; }

/* ODLICZANIE & VS */
#countdown-screen { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 20px; }
#count-name-info { text-align: center; }
.vs-title { font-size: clamp(1.2rem, 3vh, 1.5rem); color: #94a3b8; font-weight: bold; margin-bottom: 10px; }
.vs-teams-container { display: flex; align-items: center; justify-content: center; gap: 20px; }
.team-anim { font-size: clamp(1.5rem, 4vh, 2.5rem); font-weight: 900; text-transform: uppercase; color: white; text-shadow: 2px 2px 0 #000; }
.vs-badge { font-size: clamp(2rem, 6vh, 4rem); color: #ef4444; font-style: italic; font-weight: 900; }
#count-number { 
    font-size: clamp(3.5rem, 15vw, 10rem); 
    margin: 0; 
    text-shadow: 0 0 20px currentColor; 
    font-weight: 900; 
    line-height: 1; 
    text-align: center;
}
@keyframes popScale { 0% { transform: scale(0.5); opacity: 0; } 50% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }

/* --- HUD GÓRNY I PASEK CZASU --- */
.game-header-hud { 
    position: absolute; /* KLUCZ: Odrywamy HUD i wieszamy w powietrzu! */
    top: 5px;
    left: 0;
    right: 0;
    margin: 0 auto; /* Centrujemy na ekranie */
    
    display: flex; flex-direction: column; 
    width: 95%; max-width: 800px; 
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.25); /* Przezroczystość */
    z-index: 100; 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.hud-top-row { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 4px 15px; 
    width: 100%; box-sizing: border-box;
}
.game-header-hud .control-btn {
    width: 32px; height: 32px; font-size: 1rem;
}
.stat-box { font-size: clamp(1rem, 2vh, 1.2rem); font-weight: 900; color: #cbd5e1; display: flex; align-items: center; gap: 10px;}
.time-glow span { color: #38bdf8; text-shadow: 0 0 10px #38bdf8; font-size: clamp(1.2rem, 3vh, 1.5rem);}

.time-bar-container { width: 100%; height: 4px; background: rgba(30, 41, 59, 0.5); position: relative; border-radius: 0 0 12px 12px; overflow: hidden;}
.time-bar-fill { height: 100%; background: #10b981; width: 100%; transition: width 1s linear, background-color 0.3s; }/* --- PRZESTRZEŃ GRY I PUNKTY --- */
.game-boards-wrapper { display: flex; flex: 1; width: 100%; position: relative; z-index: 10;}
.player-zone { flex: 1; display: flex; flex-direction: column; position: relative; overflow: hidden; }

.score-hud { 
    position: absolute; 
    top: 60px; /* Przesuwamy w dół, by ominąć lewitujący HUD */
    left: 15px; 
    font-size: clamp(1rem, 2vh, 1.2rem); 
    font-weight: bold; color: #94a3b8; 
    z-index: 20; display: flex; align-items: center; gap: 8px; pointer-events: none;
}.score-hud span { font-size: clamp(1.5rem, 3vh, 2rem); color: white; }
.combo-text { color: #f59e0b; font-size: clamp(1rem, 2vh, 1.2rem); font-style: italic; }

.space-play-area { flex: 1; position: relative; overflow: hidden; touch-action: none; cursor: crosshair; }

/* --- KOKPIT NA DOLE --- */
.cockpit-panel { 
    height: auto; min-height: clamp(80px, 15vh, 140px); 
    background: linear-gradient(to top, rgba(15, 23, 42, 1), rgba(30, 41, 59, 0.8)); 
    border-top: 4px solid; padding: 15px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.8); position: relative; z-index: 20;
}
.cockpit-blue { border-top-color: #38bdf8; }
.cockpit-red { border-top-color: #f43f5e; }

.target-label { font-size: clamp(0.7rem, 1.2vw, 1rem); color: #94a3b8; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 5px; }
.target-word { 
    /* GIGANTYCZNY SKOK ROZMIARU DLA DESKTOPU: Rośnie płynnie do 3.5rem! */
    font-size: clamp(1.8rem, 4vw, 3.5rem) !important; 
    line-height: 1.1 !important; 
    margin: 0 !important; 
    font-weight: 900 !important;
    text-shadow: 2px 2px 0 #000;
    white-space: normal !important; /* Zezwala na łamanie wierszy, gdy sztuczna inteligencja wygeneruje dłuższe zdanie */
    text-align: center;
}
.team-header { display: none; font-size: clamp(0.85rem, 2vh, 1rem); margin-bottom: 5px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px;}
#header-a { color: #38bdf8; }
#header-b { color: #f43f5e; }
/* --- ASTEROIDY --- */
/* Optymalizacja klatkowania: GPU przejmuje renderowanie asteroidy */
/* Optymalizacja: Bezwzględne wymuszenie kwadratu */
.asteroid {
    position: absolute; 
    display: flex; align-items: center; justify-content: center; text-align: center;
    padding: 10px;
    
    /* MAGIA: Używamy IDENTYCZNEGO wzoru clamp dla szerokości i wysokości.
       Dzięki temu asteroida to ZAWSZE twardy kwadrat (od 110px do 150px).
       Wirujący kwadrat nigdy nie zmieni swoich zewnętrznych granic, 
       więc tekst nigdy z niego nie "wypadnie"! */
    width: clamp(110px, 20vw, 150px);
    height: clamp(110px, 20vw, 150px);
    
    cursor: crosshair; touch-action: none;
    transform-origin: center center;
    will-change: transform;
}

/* Animacja prawdziwego obrotu na zablokowanym kwadracie */
@keyframes spinAst {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.asteroid-bg {
    position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 30%, #64748b, #334155 70%, #0f172a 100%);
    /* Asymetryczne zaokrąglenia tworzą kształt nieregularnej skały wpisanej w kwadrat */
    border-radius: 45% 55% 40% 60% / 55% 45% 60% 40%;
    box-shadow: inset -10px -10px 20px rgba(0,0,0,0.8), inset 5px 5px 10px rgba(255,255,255,0.2), 0 10px 20px rgba(0,0,0,0.5);
    z-index: 1;
}

.asteroid-text { 
    position: relative; z-index: 2; 
    font-weight: 900; color: white; text-shadow: 2px 2px 2px black; 
    pointer-events: none; 
    word-wrap: break-word; hyphens: auto; line-height: 1.15;
    /* Czcionka też jest responsywna, by zmieścić się w wymiarach 110-150px */
    font-size: clamp(0.85rem, 2vw, 1.1rem); 
}
/* --- FRAGMENTY ASTEROIDY (SHATTER) --- */
.asteroid-fragment {
    position: absolute;
    width: 60px; height: 60px;
    background: radial-gradient(circle at 30% 30%, #64748b, #334155);
    border-radius: 30% 70% 50% 40%;
    pointer-events: none;
    z-index: 17;
    box-shadow: inset -2px -2px 5px rgba(0,0,0,0.5);
    animation: shatterFly 1.2s cubic-bezier(0.1, 0.8, 0.2, 1) forwards; 
}
@keyframes shatterFly {
    0% { transform: translate(-50%, -50%) scale(var(--s)) rotate(0deg); opacity: 1; }
    80% { opacity: 0.8; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0) rotate(var(--rot)); opacity: 0; }
}

/* --- LASERY I EFEKTY WIZUALNE (ZALEŻNE OD COMBO) --- */
.laser-beam { 
    position: absolute; 
    transform-origin: 0 50%; 
    background: #fff; 
    pointer-events: none; 
    z-index: 18;
    border-radius: 50px;
    animation: beamFade var(--dur, 150ms) ease-out forwards;
}

@keyframes beamFade {
    0% { opacity: 1; filter: brightness(1.5) drop-shadow(0 0 10px currentColor); }
    100% { opacity: 0; }
}

.laser-t1 { height: 4px; box-shadow: 0 0 10px 4px currentColor; }
.laser-t2 { height: 8px; box-shadow: 0 0 15px 6px currentColor, inset 0 0 4px 2px #fff; }
.laser-t3 { height: 16px; box-shadow: 0 0 25px 10px currentColor, inset 0 0 8px 4px #fff; }

/* 4 POZIOM LASERA (MAX COMBO) */
.laser-max { 
    height: 28px; 
    box-shadow: 0 0 40px 15px currentColor, 0 0 80px 20px currentColor, inset 0 0 15px 5px #fff; 
    border-top: 4px dashed currentColor; 
    border-bottom: 4px dashed currentColor;
    background: linear-gradient(to bottom, #fff 20%, transparent 50%, #fff 80%);
}

/* WSTRZĄS EKRANU (MAX COMBO RECOIL) */
.shoot-shake { animation: weaponKick 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
@keyframes weaponKick {
    0% { transform: translateY(15px); }
    100% { transform: translateY(0); }
}

/* EKSPLOZJE */
.explosion { 
    position: absolute; border-radius: 50%; pointer-events: none; 
    transform: translate(-50%, -50%); z-index: 16; 
    animation: explodeAnim 0.3s ease-out forwards;
}
@keyframes explodeAnim { 
    0% { width: 0; height: 0; background: white; opacity: 1; } 
    50% { background: #f59e0b; opacity: 0.8; } 
    100% { width: 100px; height: 100px; background: #ef4444; opacity: 0; } 
}

.alien-explosion {
    position: absolute; width: 10px; height: 10px;
    background: #fff; border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 30; pointer-events: none;
    box-shadow: 0 0 30px 15px #38bdf8, 0 0 60px 30px #f43f5e;
    animation: alienNova 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes alienNova {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(25); opacity: 0.9; }
    100% { transform: translate(-50%, -50%) scale(45); opacity: 0; }
}

/* PŁYWAJĄCE PUNKTY */
.floating-pts { 
    position: absolute; font-size: 3rem; font-weight: 900; pointer-events: none; 
    animation: floatUp 0.8s ease-out forwards; z-index: 100; text-shadow: 2px 2px 0 #000; 
}
@keyframes floatUp { 
    0% { opacity: 1; transform: translateY(0) scale(1); } 
    100% { opacity: 0; transform: translateY(-60px) scale(1.5); } 
}

/* ZŁOŚLIWY KOSMITA (TROLL) i TRACTOR BEAM */
.alien-ship {
    position: absolute; 
    z-index: 25; 
    pointer-events: auto; 
    cursor: crosshair;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.6));
}
.gravity-wave { 
    position: absolute; width: 100%; height: 100%; 
    background: linear-gradient(to bottom, rgba(56,189,248,0.2), rgba(56,189,248,0)); 
    z-index: 24; pointer-events: none; animation: waveFlash 0.6s ease-out forwards;
}
@keyframes waveFlash { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }

#broken-screen-overlay { 
    position: fixed; inset: 0; z-index: 9999; pointer-events: none; display: none; 
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><path d="M50% 50% L30% 10% M50% 50% L80% 20% M50% 50% L10% 60% M50% 50% L70% 90% M50% 50% L40% 95%" stroke="white" stroke-width="2" opacity="0.5"/></svg>'); 
}
.shatter-anim { display: block !important; animation: shatterEffect 0.5s forwards; }
@keyframes shatterEffect { 
    0%, 100% { transform: translate(0,0); opacity:0;} 
    10%, 30%, 50%, 70%, 90% { transform: translate(-10px, 5px); opacity:1;} 
    20%, 40%, 60%, 80% { transform: translate(10px, -5px); opacity:1;} 
}

/* =========================================================================
   BLOKADA OBROTU - TYLKO W TRYBIE DRUŻYNOWYM ORAZ TYLKO W TRAKCIE GRY
   ========================================================================= */

/* Podstawowy wygląd nakładki (ukryty domyślnie) */
#ios-rotate-warning {
    display: none; 
    position: fixed; inset: 0; background: rgba(15, 23, 42, 0.98); color: white;
    z-index: 999999; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 20px; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Wymuszenie obrotu - pokazuje się TYLKO gdy na tagu body wiszą OBIE klasy naraz */
@media screen and (orientation: portrait) and (max-width: 768px) {
    body.team-mode-active.game-playing #ios-rotate-warning { 
        display: flex !important; 
    }
}

/* =========================================================================
   🛠️ KOMPRESJA MENU NA NISKICH EKRANACH (np. 1280x800)
   ========================================================================= */
@media (max-height: 850px) {
    .menu-left h1 { font-size: 1.6rem !important; margin-bottom: 5px !important; }
    .menu-left p { font-size: 0.85rem !important; margin-bottom: 10px !important; }
    .mode-selector, .time-selector, .player-profile-wrapper { margin-bottom: 10px !important; }
    .card-content { padding: 15px 20px !important; }
    .btn-start { padding: 10px 20px !important; font-size: 1.1rem !important; }
    
    #end-title { font-size: 2.2rem !important; margin-bottom: 5px !important; }
    #final-score { font-size: 4rem !important; margin: 5px 0 !important; }
}
@media (max-height: 500px) and (orientation: landscape) {
    /* Góra: Jeszcze cieńszy HUD */
    .hud-top-row { padding: 0px 10px !important; min-height: 28px !important; }
    .control-btn { width: 24px !important; height: 24px !important; font-size: 0.8rem !important; }
    
    /* Dół: Większy tekst pytania (Target Word) */
    .cockpit-panel { 
        height: 38px !important; 
        padding: 0 10px !important; 
        flex-direction: row !important; 
        justify-content: center !important; 
        gap: 8px !important; 
    }
    .target-label { display: none !important; }
    .team-header { 
        font-size: 0.7rem !important; 
        max-width: 100px; 
        overflow: hidden; 
        text-overflow: ellipsis; 
        white-space: nowrap;
        border-right: 1px solid rgba(255,255,255,0.3);
        padding-right: 8px;
    }
    /* Drastycznie zwiększona czcionka pytania */
    .target-word { 
        font-size: clamp(1.1rem, 4vh, 1.4rem) !important; 
        line-height: 1 !important; 
        font-weight: 800 !important;
        white-space: nowrap;
    }
    
    /* Wyniki - mniejsze, by nie przeszkadzały */
    .score-hud { top: 32px !important; left: 5px !important; font-size: 0.7rem !important; }
    .score-hud span { font-size: 1rem !important; }
    /* SCALE DOWN ASTEROIDS IN TEAM MODE (LANDSCAPE) */
    body.team-mode-active .asteroid,
    body.is-playing-team .asteroid {
        width: clamp(55px, 15vh, 75px) !important;
        height: clamp(55px, 15vh, 75px) !important;
        padding: 4px !important;
    }
    
    body.team-mode-active .asteroid-text,
    body.is-playing-team .asteroid-text {
        font-size: clamp(0.5rem, 3vh, 0.7rem) !important;
    }
}
/* Optymalizacja ekranu końcowego dla niskich wyświetlaczy */
@media (max-height: 500px) {
    #end-screen .menu-card { 
        max-height: 98vh !important; 
        width: 90vw !important; 
    }
    #end-screen .card-content { 
        padding: 10px 20px !important; 
        flex-direction: row !important; /* Rozbijamy wynik i przycisk na boki */
        gap: 20px;
    }
    #end-title { 
        font-size: 1.5rem !important; 
        margin-bottom: 5px !important; 
    }
    #final-score { 
        font-size: 3rem !important; 
        margin: 0 !important; 
        flex: 1;
    }
    #end-screen .btn-start { 
        width: auto !important; 
        padding: 10px 30px !important; 
        font-size: 1rem !important; 
    }
    #end-screen p { display: none; } /* Ukrywamy "Oto Twój gwiezdny wynik" dla miejsca */
}
/* =========================================================================
   LEADERBOARD / HALL OF FAME STYLES
   ========================================================================= */
.menu-right { 
    flex: 0.8; 
    padding: 30px; 
    background: rgba(15, 23, 42, 0.6); 
    border-left: 2px solid #334155; 
    display: flex; 
    flex-direction: column; 
}
.hof-title { 
    font-size: 1.2rem; 
    color: #fde047; 
    text-align: center; 
    margin-top: 0; 
    margin-bottom: 15px; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}
.hof-list { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
    overflow-y: auto; 
    flex-grow: 1; 
    max-height: 280px; 
    scroll-behavior: smooth; 
    padding-right: 5px;
}
/* Scrollbar stylingu dla ciemnego motywu */
.hof-list::-webkit-scrollbar { width: 6px; }
.hof-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 4px; }
.hof-list::-webkit-scrollbar-thumb { background: #475569; border-radius: 4px; }

.hof-item { 
    display: flex; 
    justify-content: space-between; 
    padding: 10px; 
    background: #1e293b; 
    border-radius: 8px; 
    margin-bottom: 8px; 
    font-weight: bold; 
    color: #cbd5e1; 
    border: 1px solid #334155; 
    transition: all 0.3s;
}
.hof-item span:nth-child(2) { 
    color: #38bdf8; 
    background: rgba(56, 189, 248, 0.1); 
    padding: 2px 8px; 
    border-radius: 6px; 
}
.hof-item.rank-0 { background: linear-gradient(135deg, rgba(234,179,8,0.15), rgba(15, 23, 42, 1)); border-color: #eab308; color: #fef08a; }
.hof-item.rank-1 { background: linear-gradient(135deg, rgba(148,163,184,0.15), rgba(15, 23, 42, 1)); border-color: #94a3b8; }
.hof-item.rank-2 { background: linear-gradient(135deg, rgba(180,83,9,0.15), rgba(15, 23, 42, 1)); border-color: #b45309; }
.hof-item.current-player-score { border-color: #10b981; background: rgba(16, 185, 129, 0.15); color: white; transform: scale(1.02); box-shadow: 0 0 10px rgba(16,185,129,0.3); z-index: 5;}
.hof-empty { text-align: center; color: #64748b; font-style: italic; padding: 10px; }

.menu-instructions { 
    background: rgba(15, 23, 42, 0.8); 
    padding: 15px; 
    border-radius: 12px; 
    border: 1px solid #334155; 
    text-align: left; 
}
.menu-instructions h3 { color: #f43f5e; margin-top: 0; margin-bottom: 10px; font-size: 1.1rem; }
.menu-instructions ul { padding-left: 20px; margin: 0; color: #cbd5e1; font-size: 0.9rem; }
.menu-instructions li { margin-bottom: 5px; }

@media (max-width: 768px) {
    .card-content { flex-direction: column !important; }
    .menu-left { padding: 20px !important; border-right: none !important; }
    .menu-right { border-left: none; border-top: 2px dashed #334155; padding: 20px !important; width: 100%; box-sizing: border-box;}
    #end-screen .menu-left { border-right: none !important; border-bottom: 2px dashed #334155; }
    #end-screen .menu-right { border-top: none; }

    /* 1. ULTIMATE COCKPIT COMPRESSION */
    .cockpit-panel {
        height: 55px !important; 
        min-height: 55px !important;
        padding: 5px 10px !important;
        flex-direction: row !important; /* Stacks the team name and word side-by-side */
        gap: 10px !important;
    }
    .target-label {
        display: none !important; /* Nukes the subtitle to save vertical space */
    }
    .target-word {
        font-size: clamp(1rem, 4vw, 1.4rem) !important;
        line-height: 1 !important;
    }
    .team-header {
        font-size: 0.8rem !important;
        margin: 0 !important;
    }

    /* 2. ULTIMATE ASTEROID SCALING */
    /* I added a fallback body class just in case your JS uses a different team mode trigger */
    body.team-mode-active .asteroid,
    body.is-playing-team .asteroid {
        width: clamp(65px, 15vw, 85px) !important;
        height: clamp(65px, 15vw, 85px) !important;
        padding: 5px !important;
    }
    
    body.team-mode-active .asteroid-text,
    body.is-playing-team .asteroid-text {
        font-size: clamp(0.55rem, 1.5vw, 0.75rem) !important;
    } 
}