/* --- MODERN FONTOK IMPORTÁLÁSA --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Space+Grotesk:wght@500;700;900&display=swap');

:root {
    /* Színpaletta: Neon & Sötét */
    --brand: #ff9d00;
    --brand-dark: #e65100;
    --brand-glow: rgba(255, 157, 0, 0.5);
    
    --bg-dark: #050505;
    --bg-panel: #121214;
    
    --glass-bg: rgba(30, 30, 35, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    
    --neon-green: #00e676;
    --neon-red: #ff1744;
    --neon-blue: #2979ff;
    --neon-purple: #d500f9;
}

body {
    font-family: 'Inter', sans-serif; /* Szövegekhez olvasmányos */
    background-color: var(--bg-dark);
    /* Finom, mély háttér gradiens */
    background-image: radial-gradient(circle at top center, #1a1a2e 0%, #000000 100%);
    background-attachment: fixed;
    color: var(--text-main);
    margin: 0;
    padding-bottom: 110px; /* Hely a lebegő menünek */
    overscroll-behavior-y: none;
    -webkit-tap-highlight-color: transparent;
}

/* --- TIPO & CÍMSOROK --- */
h1, h2, h3, h4, 
.brand-logo, 
.tomeg-big-score, 
.score-badge, 
#totalScore {
    font-family: 'Space Grotesk', sans-serif; /* Sportos, modern font */
    letter-spacing: -0.5px;
}

/* --- NEON LOGÓ STÍLUS (Egységes) --- */
.brand-logo { 
    /* Ez a fő szín (Narancs) */
    color: var(--brand);
    
    /* Ez a neon ragyogás effekt */
    text-shadow: 
        0 0 10px var(--brand-glow), 
        0 0 20px var(--brand-glow), 
        0 0 40px var(--brand);
}

.brand-highlight { 
    /* A MENTOR szót is ugyanúgy színezzük, mint a többit */
    color: var(--brand) !important; 
    
    /* Örökölje a fenti ragyogást */
    text-shadow: inherit;
}

/* --- FEJLÉC --- */
.app-header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* A logó kép beállítása (hogy ne legyen torz) */
.header-logo-img {
    max-height: 50px;
    width: auto;
    display: block;
    margin: 0 auto 5px auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--brand-glow)); /* Kis ragyogás a logónak */
}

.brand-slogan {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

/* --- GLASSMORPHISM KÁRTYÁK --- */
.container {
    padding: 20px;
    display: none;
    opacity: 0;
    animation: fadeIn 0.4s ease-out forwards;
}
.active-view { display: block; }

.card, .module-card, .plan-day, .settings-content {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px; /* Modernebb, kerekebb sarkok */
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    overflow: hidden;
}

/* --- FŐOLDAL RÁCS --- */
.module-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.module-card {
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
}

.module-card:active { transform: scale(0.95); }

.module-icon {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

.module-title {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.module-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.locked { opacity: 0.4; filter: grayscale(1); }

/* --- LEBEGŐ NAVIGÁCIÓ (Mint az iPhone-on) --- */
.nav-tabs {
    position: fixed;
    bottom: 20px;
    left: 5%;
    width: 90%;
    background: rgba(20, 20, 20, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    border-radius: 50px; /* Kapszula forma */
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    z-index: 1000;
    box-sizing: border-box;
}

.nav-item {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nav-item.active {
    color: var(--brand);
    transform: translateY(-2px);
    text-shadow: 0 0 10px var(--brand-glow);
}

.nav-icon {
    font-size: 1.3rem;
    margin-bottom: 2px;
    display: block;
}

/* --- GOMBOK & INPUTOK --- */
.form-group { margin-bottom: 15px; }

.form-input {
    width: 100%;
    padding: 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 10px var(--brand-glow);
}

.action-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    color: black; /* Kontraszt miatt fekete szöveg a színes gombon */
    margin-top: 15px;
    transition: transform 0.1s, box-shadow 0.3s;
    
    /* Alapértelmezett Brand Gradiens */
    background: linear-gradient(135deg, var(--brand) 0%, #ff6d00 100%);
    box-shadow: 0 4px 15px var(--brand-glow);
}

.action-btn:active { transform: scale(0.98); }

/* Különböző színű gombok felülírása */
button[style*="var(--green)"] {
    background: linear-gradient(135deg, var(--neon-green) 0%, #00bfa5 100%) !important;
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.4) !important;
    color: black !important;
}
button[style*="var(--red)"], button[onclick="deleteAccount()"] {
    background: linear-gradient(135deg, var(--neon-red) 0%, #d50000 100%) !important;
    box-shadow: 0 4px 15px rgba(255, 23, 68, 0.4) !important;
    color: white !important;
}
button[style*="var(--blue)"] {
    background: linear-gradient(135deg, var(--neon-blue) 0%, #2962ff 100%) !important;
    box-shadow: 0 4px 15px rgba(41, 121, 255, 0.4) !important;
    color: white !important;
}
button[style*="var(--purple)"] {
    background: linear-gradient(135deg, var(--neon-purple) 0%, #aa00ff 100%) !important;
    box-shadow: 0 4px 15px rgba(213, 0, 249, 0.4) !important;
    color: white !important;
}
button[style*="#444"], .btn-outline {
    background: rgba(255,255,255,0.1) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-main) !important;
    box-shadow: none !important;
}

.auth-link { color: var(--brand); text-align: center; margin-top: 15px; cursor: pointer; font-size: 0.9rem; }
.auth-link.small { font-size: 0.8rem; color: var(--text-muted); }

/* --- JÁTÉK FELÜLET (Kör alakú gombok) --- */
.row-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
}

.btn-group { display: flex; gap: 8px; }

.btn-select {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.4);
    color: var(--text-muted);
    display: flex; justify-content: center; align-items: center;
    font-size: 0.9rem; font-weight: bold;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    transition: all 0.2s;
}

.btn-select.active {
    background: var(--brand);
    color: black;
    border-color: var(--brand);
    box-shadow: 0 0 15px var(--brand-glow);
    transform: scale(1.1);
}

.btn-select.miss { border-color: var(--neon-red); color: var(--neon-red); }
.btn-select.miss.active {
    background: var(--neon-red);
    color: white;
    box-shadow: 0 0 15px rgba(255, 23, 68, 0.6);
}

/* --- TÖMEG & SCOREBOARD --- */
.score-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 15px;
}
.score-badge {
    background: rgba(255, 157, 0, 0.1);
    padding: 5px 15px; border-radius: 20px;
    font-weight: bold; color: var(--brand);
    border: 1px solid var(--brand);
    box-shadow: 0 0 10px rgba(255, 157, 0, 0.2);
}

.tomeg-dashboard {
    text-align: center; margin-bottom: 20px;
    background: rgba(0,0,0,0.4);
    padding: 20px; border-radius: 16px;
    border: 1px solid var(--glass-border);
}

.tomeg-big-score {
    font-size: 4rem;
    font-weight: 700;
    background: -webkit-linear-gradient(#fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.3));
    line-height: 1;
}

.progress-bar {
    height: 8px; background: rgba(255,255,255,0.1); border-radius: 4px;
    margin: 15px 0; overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand), #ffea00);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--brand-glow);
}

.counter-controls {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px;
}
.btn-game {
    border: none; border-radius: 12px; padding: 20px 0;
    color: white; font-weight: bold; cursor: pointer;
    background: rgba(255,255,255,0.05);
    font-size: 1rem; border: 1px solid var(--glass-border);
    display: flex; flex-direction: column; align-items: center;
    transition: all 0.1s;
}
.btn-game:active { transform: scale(0.95); }

.btn-single { border-color: var(--neon-green); color: var(--neon-green); }
.btn-single:active { background: rgba(0, 230, 118, 0.2); }

.btn-triple { border-color: var(--brand); color: var(--brand); }
.btn-triple:active { background: rgba(255, 157, 0, 0.2); }

.btn-miss { border-color: var(--neon-red); color: var(--neon-red); }
.btn-miss:active { background: rgba(255, 23, 68, 0.2); }

.btn-undo { grid-column: 1 / -1; background: transparent; color: var(--text-muted); margin-top: 10px; border:none; }

/* --- RANGLISTA (Dinamikus) --- */
.stat-toggle-container {
    display: flex; justify-content: center; gap: 10px; margin-bottom: 20px;
    background: rgba(0,0,0,0.3); padding: 5px; border-radius: 30px; width: fit-content; margin: 0 auto 20px auto;
}
.stat-toggle-container .btn-select {
    width: auto; padding: 8px 20px; border-radius: 20px; border: none; height: auto;
}

.leaderboard-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px; border-bottom: 1px solid var(--glass-border);
}
.leaderboard-row:last-child { border-bottom: none; }

/* DOBOGÓ STÍLUSOK (CSS TRÜKK) */
.leaderboard-row:nth-child(1) .lb-rank { font-size: 1.5rem; text-shadow: 0 0 10px gold; }
.leaderboard-row:nth-child(2) .lb-rank { font-size: 1.3rem; text-shadow: 0 0 10px silver; }
.leaderboard-row:nth-child(3) .lb-rank { font-size: 1.2rem; text-shadow: 0 0 10px #cd7f32; }

.lb-left { display: flex; align-items: center; gap: 12px; }
.lb-rank { font-weight: 900; width: 30px; text-align: center; color: var(--text-muted); font-family: 'Space Grotesk'; }
.user-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-weight: bold; color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    font-family: 'Space Grotesk';
}
.lb-info { display: flex; flex-direction: column; }
.lb-name { font-weight: 700; font-size: 1rem; color: white; }
.lb-date { font-size: 0.7rem; color: var(--text-muted); }
.lb-score { font-weight: 900; color: var(--brand); font-size: 1.2rem; text-shadow: 0 0 10px rgba(255, 157, 0, 0.3); }

/* --- INFÓ & BEÁLLÍTÁSOK --- */
.info-p { line-height: 1.7; color: #ccc; margin-bottom: 15px; font-weight: 300; }
.info-list { padding-left: 20px; line-height: 1.7; color: #ccc; }
.info-list li { margin-bottom: 8px; }
.info-title { color: var(--brand); font-weight: 700; display: block; margin-top: 20px; margin-bottom: 8px; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; }

/* PROFIL ÉS MODAL */
.profile-card {
    display: flex; align-items: center; gap: 15px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
    padding: 20px; border-radius: 20px;
    border: 1px solid var(--glass-border); margin-bottom: 25px;
    position: relative;
}
.profile-details { flex: 1; }
.profile-name { font-size: 1.3rem; font-weight: 800; color: white; margin-bottom: 5px; font-family: 'Space Grotesk'; }
.rank-badge { 
    font-size: 0.7rem; background: var(--brand); color: black; 
    padding: 2px 8px; border-radius: 6px; vertical-align: middle; font-weight: 700;
    text-transform: uppercase;
}
.stat-pill { font-size: 0.85rem; color: #ddd; background: rgba(0,0,0,0.3); padding: 4px 10px; border-radius: 8px; margin-right: 5px; }

.settings-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85); z-index: 2000;
    display: flex; justify-content: center; align-items: center;
    backdrop-filter: blur(5px);
}
.settings-content {
    width: 85%; max-width: 350px; text-align: center;
    border: 1px solid var(--brand);
    background: #1a1a1a;
}

.gear-icon {
    position: absolute; top: 15px; right: 15px;
    font-size: 1.4rem; color: var(--text-muted); cursor: pointer; padding: 5px;
    transition: color 0.3s;
}
.gear-icon:hover { color: white; }

.admin-btn {
    background: rgba(255, 255, 255, 0.05); color: var(--text-muted); border: 1px dashed var(--glass-border);
    width: 100%; padding: 12px; margin-bottom: 20px;
    cursor: pointer; border-radius: 12px; font-size: 0.8rem;
    
}

/* --- ACCORDION (Edzésterv) --- */
.day-summary {
    padding: 18px; background: transparent; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    list-style: none;
    font-weight: 600;
}
.day-summary:hover { background: rgba(255,255,255,0.02); }
.day-badge {
    background: var(--brand); color: black;
    padding: 3px 8px; border-radius: 6px;
    font-size: 0.75rem; font-weight: 800; margin-right: 10px;
}
.plan-content {
    padding: 20px; background: rgba(0,0,0,0.2); border-top: 1px solid var(--glass-border);
    animation: fadeIn 0.3s ease;
}
.drill-name {
    font-size: 1.2rem; color: var(--brand);
    font-weight: 700; margin-bottom: 12px;
}
.plan-why {
    font-style: italic; color: #ccc; border-left: 3px solid var(--brand);
    padding-left: 15px; margin-bottom: 15px; font-size: 0.95rem;
    background: linear-gradient(90deg, rgba(255, 157, 0, 0.1), transparent);
    padding: 10px; border-radius: 0 8px 8px 0;
}

/* ANIMÁCIÓK */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- MENTÁLIS TRÉNING (JAVÍTVA: Lassú 12mp + Nagy hely) --- */
.breathing-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: transparent;
    border: 4px solid var(--brand);
    
    /* MARGÓ: Helyet hagyunk neki, hogy ne lógjon a szövegbe */
    margin: 60px auto;
    
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 900;
    color: white;
    box-shadow: 0 0 20px var(--brand-glow);
    
    /* IDŐZÍTÉS: 12 másodperc (Nagyon lassú és nyugodt) */
    animation: breathe-animation 12s infinite ease-in-out; 
    position: relative;
}

.breathing-circle::after {
    content: '';
    position: absolute;
    width: 100%; height: 100%;
    border-radius: 50%;
    background: var(--brand);
    opacity: 0.2;
    z-index: -1;
    animation: pulse-fill 12s infinite ease-in-out;
}

@keyframes breathe-animation {
    0%   { transform: scale(1); border-color: var(--brand); }   /* Kifújva (Kicsi) */
    50%  { transform: scale(1.5); border-color: var(--neon-green); } /* Beszívva (Nagy) */
    100% { transform: scale(1); border-color: var(--brand); }   /* Kifújva (Kicsi) */
}

@keyframes pulse-fill {
    0%   { transform: scale(1); opacity: 0.2; }
    50%  { transform: scale(1.7); opacity: 0.05; }
    100% { transform: scale(1); opacity: 0.2; }
}