/* ... (Początek pliku bez zmian) ... */
:root {
    --bg: #181f2a;
    --card-bg: #232b3a;
    --accent: #4fd1c5;
    --accent-hover: #38b2ac;
    --text: #e2e8f0;
    --text-muted: #a0aec0;
    --shadow: 0 4px 24px rgba(0,0,0,0.25);
    --radius: 18px;
}

/* FIX SCROLLA NA MOBILE */
html, body {
    height: 100%;
    height: 100dvh;
    width: 100%;
    overflow: hidden;
    position: fixed;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.hidden { display: none !important; }

.container {
    width: 90vw;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.noselect {
  -webkit-touch-callout: none; 
    -webkit-user-select: none; 
    user-select: none; 
}

/* --- ADMIN & HIGHSCORES (LAYOUT FIX) --- */
.admin-container { 
    display: flex !important;           /* Układ elastyczny */
    flex-direction: column !important;  /* Pionowy */
    height: 100dvh !important;          /* Sztywna wysokość ekranu */
    overflow: hidden !important;        /* Kontener się NIE przewija */
    padding: 20px !important;
    align-items: center;
    justify-content: flex-start;
}

.admin-container h1 {
    flex-shrink: 0;                     /* Nagłówek ma stałą wysokość */
    margin-bottom: 20px;
}

/* KARTA TO JEDYNE OKNO DO SCROLLOWANIA */
.admin-container .card {
    flex-grow: 1;                       /* Zajmij całe wolne miejsce! */
    width: 100%;
    max-width: 1000px;
    overflow-y: auto !important;        /* Przewijanie W ŚRODKU karty */
    min-height: 0;                      /* Fix dla Firefoxa */
    margin: 0 0 20px 0 !important;      /* Odstęp od przycisku na dole */
    padding: 0 !important;
    display: block !important;
}

/* Stopka z przyciskiem (zawsze widoczna na dole) */
.admin-container > div:last-child {
    flex-shrink: 0;
    margin-top: 0 !important;
    padding-bottom: 10px;
}

/* --- Reszta stylów (Tabele, Modale itp.) --- */
.admin-table { width: 100%; border-collapse: collapse; background: var(--card-bg); }
.admin-table th, .admin-table td { padding: 16px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.05); }
.admin-table th { background: rgba(79,209,197,0.1); color: var(--accent); position: sticky; top: 0; background-color: var(--card-bg); z-index: 1; box-shadow: 0 2px 5px rgba(0,0,0,0.2); } /* Sticky Header w tabeli */
.admin-table tr.highlight td { background: rgba(255, 215, 0, 0.1); color: #ffd700; }

/* Pozostałe style bez zmian... */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 24px;
    text-align: center;
    max-height: 90dvh; 
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.progress-wrapper { margin-bottom: 20px; width: 100%; }
.progress-labels { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; }
.progress-track { width: 100%; height: 12px; background-color: rgba(255,255,255,0.1); border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background-color: var(--accent); border-radius: 10px; transition: width 0.3s ease-out; }

.mobile-controls { display: flex; gap: 20px; justify-content: center; margin-top: 20px; }
.btn-big { flex: 1; background: var(--card-bg); border: 2px solid var(--accent); color: var(--accent); border-radius: var(--radius); padding: 30px 0; font-size: 2.5rem; font-weight: 700; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: transform 0.05s ease-in-out; outline: none; }
.btn-big:active { transform: scale(0.96); background: var(--card-bg); color: var(--accent); }
.btn-active-js { background: var(--accent) !important; color: var(--bg) !important; border-color: var(--accent) !important; transform: scale(0.96) !important; box-shadow: 0 0 15px var(--accent); }
#nickname-input:focus { outline: none; box-shadow: 0 0 0 2px var(--accent); }
#status { margin-top: 16px; font-size: 0.9rem; color: var(--text-muted); }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); display: flex; align-items: center; justify-content: center; z-index: 9999; backdrop-filter: blur(5px); }
.modal-content { background: var(--card-bg); padding: 30px; border-radius: var(--radius); max-width: 90%; width: 400px; text-align: center; box-shadow: 0 0 30px rgba(79, 209, 197, 0.2); border: 1px solid var(--accent); transform: translateY(-25%); }
.modal-btn { background: var(--accent); color: var(--bg); border: none; padding: 15px 30px; font-size: 1.2rem; font-weight: bold; border-radius: var(--radius); cursor: pointer; margin-top: 20px; width: 100%; }
@keyframes safety-lock { 0% { opacity: 0.2; pointer-events: none; } 80% { opacity: 0.5; pointer-events: none; } 100% { opacity: 1; pointer-events: auto; } }
.modal-actions { display: flex; flex-direction: row; gap: 15px; margin-top: 25px; }
.modal-actions .modal-btn { margin: 0 !important; width: 100%; padding: 20px; animation: safety-lock 1.5s ease-out forwards; }
@keyframes celebrate-bg { 0% { background-color: var(--card-bg); } 50% { background-color: #2d3748; box-shadow: 0 0 50px #ffd700; } 100% { background-color: var(--card-bg); } }
@keyframes pulse-gold { 0% { transform: scale(1); } 50% { transform: scale(1.02); color: #ffd700; text-shadow: 0 0 10px #ffd700; } 100% { transform: scale(1); } }
.celebration-effect { animation: celebrate-bg 0.5s ease-in-out; border-color: #ffd700 !important; }
.text-glow { animation: pulse-gold 0.5s ease-in-out; }
@media (max-width: 800px) { .container { height: 100dvh; width: 100%; display: flex; justify-content: center; align-items: center; padding: 0; } .card { width: 95vw; height: 90dvh; max-height: none; display: flex; flex-direction: column; padding: 20px; box-sizing: border-box; } .progress-wrapper { flex-shrink: 0; margin-bottom: 0; } #quote-display, .card > p:nth-of-type(1) { flex-grow: 1; display: flex; align-items: center; justify-content: center; margin: 0; padding: 10px; height: auto; } .mobile-controls { flex-shrink: 0; flex-direction: column; gap: 15px; width: 100%; margin-top: 0; } .desktop-instruction { display: none !important; } }
@keyframes score-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.score-anim {
    animation: score-pulse 0.15s ease-out;
}