:root {
    --primary: #c41e3a;
    --primary-dark: #9a1830;
    --secondary: #ffc107;
    --secondary-dark: #e5ac00;
    --bg: #1a1a2e;
    --bg-lighter: #16213e;
    --card-bg: #0f3460;
    --card-border: #e94560;
    --text: #eaeaea;
    --text-muted: #a0a0a0;
    --success: #00d26a;
    --error: #ff6b6b;
    --gold: #ffd700;
}

/* Light téma */
body[data-theme="light"] {
    --bg: #f0f2f5;
    --bg-lighter: #ffffff;
    --card-bg: #ffffff;
    --card-border: #d0d0d0;
    --text: #2c3e50;
    --text-muted: #6c757d;
    --primary: #b01030;
    --secondary: #d4a012;
}

body[data-theme="light"]::before {
    background: none;
}

body[data-theme="light"] h1 {
    background: linear-gradient(90deg, var(--primary), #444, var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body[data-theme="light"] .material-selector,
body[data-theme="light"] .section {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
    background: #fff;
}

body[data-theme="light"] .nav-btn {
    background: #fff;
    color: var(--text);
    border: 1px solid #e0e0e0;
}

body[data-theme="light"] .nav-btn:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

body[data-theme="light"] .nav-btn.active {
    background: #f0f0f0;
    color: var(--text);
    border-color: #d0d0d0;
}

body[data-theme="light"] input[type="text"],
body[data-theme="light"] select {
    background: #fff;
    border: 1px solid #ccc;
    color: var(--text);
}

body[data-theme="light"] input[type="text"]:focus,
body[data-theme="light"] select:focus {
    border-color: var(--primary);
}

body[data-theme="light"] .score-board {
    background: #fff;
    border: 2px solid var(--secondary);
}

body[data-theme="light"] .score-board .current-score,
body[data-theme="light"] .score-board .high-score {
    color: var(--text);
}

body[data-theme="light"] .conj-card,
body[data-theme="light"] .stat-card,
body[data-theme="light"] .test-progress,
body[data-theme="light"] .answer-box {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
}

body[data-theme="light"] .weekly-stats {
    background: #f8f9fa;
}

body[data-theme="light"] th {
    background: #f0f0f0;
    color: var(--text);
}

body[data-theme="light"] td {
    color: var(--text);
    border-color: #e0e0e0;
}

body[data-theme="light"] .table-container {
    border: none;
}

body[data-theme="light"] th {
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

body[data-theme="light"] tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

body[data-theme="light"] tbody tr:nth-child(even) {
    background: rgba(0,0,0,0.02);
}

body[data-theme="light"] tbody tr:hover {
    background: rgba(0,0,0,0.04);
}

body[data-theme="light"] .btn-action {
    background: var(--primary);
    color: #fff;
}

body[data-theme="light"] .btn-action:hover {
    background: #8a0c28;
}

body[data-theme="light"] .btn-action.secondary {
    background: #6c757d;
    color: #fff;
}

body[data-theme="light"] .mode-btn {
    background: #fff;
    border: 2px solid #ddd;
    color: var(--text);
}

body[data-theme="light"] .mode-btn.active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #000;
}

body[data-theme="light"] .test-prompt {
    border-color: var(--secondary);
    background: #fffbf0;
}

body[data-theme="light"] .flashcard-term,
body[data-theme="light"] .test-prompt strong {
    color: var(--text);
}

body[data-theme="light"] .theme-toggle button {
    background: #fff;
    border-color: #ddd;
}

body[data-theme="light"] .test-settings {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
}

body[data-theme="light"] .type-selector select {
    background: #fff;
    border: 1px solid #ccc;
    color: var(--text);
}

body[data-theme="light"] .feedback-msg.success {
    background: rgba(0,180,80,0.1);
    color: #0a7c42;
}

body[data-theme="light"] .feedback-msg.error {
    background: rgba(220,50,50,0.1);
    color: #c0392b;
}

body[data-theme="light"] .test-result {
    color: var(--text);
}

body[data-theme="light"] .result-title {
    color: var(--primary);
}

body[data-theme="light"] .result-score {
    color: var(--text);
}

body[data-theme="light"] .btn-speak-lg {
    background: #f0f0f0;
    color: var(--text);
    border: 1px solid #ddd;
}

body[data-theme="light"] .input-group label {
    color: var(--text-muted);
}

* { box-sizing: border-box; }

/* Globális focus stílusok - egyszerű, finom */
*:focus {
    outline: none;
}

button:focus-visible,
select:focus-visible,
input:focus-visible {
    border-color: rgba(255, 255, 255, 0.4);
}

/* Light témában */
body[data-theme="light"] button:focus-visible,
body[data-theme="light"] select:focus-visible,
body[data-theme="light"] input:focus-visible {
    border-color: rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Fira Sans', sans-serif;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-lighter) 50%, #1a1a2e 100%);
    color: var(--text);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background 0.3s, color 0.3s;
}

body[data-theme="light"] {
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-lighter) 100%);
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(196,30,58,0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255,193,7,0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Téma kapcsoló */
.theme-toggle {
    flex-shrink: 0;
}

.theme-toggle button {
    background: var(--bg-lighter);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
}

.theme-toggle button:hover {
    background: var(--card-bg);
    border-color: rgba(255,255,255,0.2);
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 25px;
    width: 100%;
    max-width: 750px;
}

h1 {
    font-family: 'Source Serif 4', serif;
    font-size: 2.2em;
    font-weight: 700;
    margin: 0;
    /*background: linear-gradient(90deg, var(--secondary), #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;*/
}

.flag-banner { display: flex; justify-content: center; gap: 8px; font-size: 1.8em; margin-bottom: 15px; }

/* Tananyag választó */
.material-selector {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    width: 100%;
    max-width: 800px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.material-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.material-selector select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    font-size: 1em;
    background: var(--bg-lighter);
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Fira Sans', sans-serif;
    height: 40px;
}

.material-selector select:hover { border-color: rgba(255,255,255,0.3); }
.material-selector select:focus { border-color: var(--secondary); }

.material-info {
    margin-top: 12px;
    padding: 10px 15px;
    background: rgba(255,193,7,0.1);
    border-radius: 6px;
    font-size: 0.9em;
    color: var(--text-muted);
    display: none;
}
.material-info.visible { display: block; }

/* Navigáció */
.nav-container { display: flex; gap: 8px; margin-bottom: 25px; flex-wrap: wrap; justify-content: center; }

.nav-btn {
    padding: 12px 20px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: var(--bg-lighter);
    color: var(--text);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95em;
    transition: all 0.2s;
    font-family: 'Fira Sans', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn.active {
    background: var(--card-bg);
    border-color: rgba(255,255,255,0.2);
    color: var(--text);
}

.nav-btn:hover:not(.active) {
    background: var(--card-bg);
    border-color: rgba(255,255,255,0.15);
}

/* Szekciók */
.section {
    display: none;
    width: 100%;
    max-width: 800px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 30px;
}

@media (max-width: 600px) {
    .section {
        padding: 15px;
        border-radius: 12px;
        margin-left: 10px;
        margin-right: 10px;
        width: calc(100% - 20px);
    }

    .material-selector {
        margin-left: 10px;
        margin-right: 10px;
        width: calc(100% - 20px);
        padding: 15px;
    }
}

.section.active { display: block; animation: slideIn 0.4s ease; }

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

.section-title {
    text-align: center;
    font-family: 'Source Serif 4', serif;
    font-size: 1.4em;
    margin-bottom: 20px;
    color: var(--secondary);
}

/* Táblázat */
.table-container {
    overflow-x: auto;
    max-height: 500px;
    border-radius: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

th, td {
    text-align: left;
    padding: 12px 10px;
    vertical-align: middle;
}

th {
    background: var(--bg-lighter);
    color: var(--secondary);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    text-transform: uppercase;
    font-size: 0.8em;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

tbody tr:nth-child(even) {
    background: rgba(255,255,255,0.02);
}

tbody tr:hover {
    background: rgba(255,193,7,0.08);
}

tr.has-errors { background: rgba(255,107,107,0.1); }
td strong { color: #fff; }

/* Státusz badge-ek - egységes vonalas stílus */
.word-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-badges {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 0.7em;
    font-weight: 700;
    line-height: 1;
}

.status-badge.error {
    background: transparent;
    border: 2px solid var(--error);
    color: var(--error);
}

.status-badge.learning {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
}

.status-badge.mastered {
    background: transparent;
    border: 2px solid var(--success);
    color: var(--success);
}

/* Gombok */
.btn-speak-sm {
    background: rgba(255,193,7,0.2);
    border: none;
    border-radius: 50%;
    width: 32px; height: 32px;
    cursor: pointer;
    color: var(--secondary);
    font-size: 1em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    transition: all 0.2s;
}
.btn-speak-sm:hover { background: var(--secondary); color: var(--bg); transform: scale(1.1); }

.btn-speak-lg {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: var(--bg);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    font-family: 'Fira Sans', sans-serif;
}
.btn-speak-lg:hover { transform: scale(1.05); box-shadow: 0 4px 20px rgba(255,193,7,0.4); }

.btn-action {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: all 0.3s;
    font-family: 'Fira Sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.btn-action:hover { transform: translateY(-2px); box-shadow: 0 6px 25px rgba(196,30,58,0.4); }
.btn-action.secondary { background: linear-gradient(135deg, #6c757d, #495057); }

/* Ragozási táblázat */
.conjugation-selector {
    margin-bottom: 20px;
    text-align: center;
}

.conjugation-selector label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.conjugation-selector select {
    padding: 12px 20px;
    border: 2px solid var(--card-border);
    border-radius: 8px;
    background: var(--bg-lighter);
    color: var(--text);
    font-size: 1em;
    cursor: pointer;
    min-width: 250px;
    font-family: 'Fira Sans', sans-serif;
}

.conjugation-selector select:focus {
    outline: none;
    border-color: var(--secondary);
}

.conj-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.conj-meaning {
    display: block;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 1.1em;
}

.conj-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.conj-card {
    background: var(--bg-lighter);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255,255,255,0.1);
}

.conj-card h4 {
    margin: 0 0 15px 0;
    color: var(--secondary);
    font-size: 1em;
    text-align: center;
}

.conj-subtitle {
    display: block;
    font-size: 0.75em;
    color: var(--text-muted);
    font-weight: normal;
}

.conj-table {
    width: 100%;
    font-size: 0.9em;
}

.conj-table td {
    padding: 6px 8px;
    border: none;
}

.conj-table td:first-child {
    color: var(--text-muted);
    width: 80px;
}

.conj-table strong {
    color: var(--success);
}

.conj-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85em;
    font-style: italic;
    padding: 15px;
    background: rgba(255,193,7,0.1);
    border-radius: 8px;
}

/* Gyakorlás */
.flashcard { text-align: center; padding: 30px 20px; }
.flashcard-term { font-family: 'Source Serif 4', serif; font-size: 2.2em; font-weight: 600; color: #fff; margin-bottom: 10px; }
.flashcard-hint { color: var(--text-muted); margin-bottom: 25px; font-style: italic; }

.answer-box {
    background: var(--bg-lighter);
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    display: none;
    border: 1px solid rgba(0,210,106,0.3);
    animation: revealAnswer 0.4s ease;
}
@keyframes revealAnswer { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

.answer-row { display: flex; justify-content: space-between; margin: 10px 0; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 1.1em; }
.answer-row:last-of-type { border-bottom: none; }
.answer-row span { color: var(--text-muted); }
.answer-row strong { color: var(--success); }

/* Teszt mód választó */
.mode-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.mode-label { color: var(--text-muted); font-weight: 600; }

.mode-btn {
    padding: 8px 16px;
    border: 2px solid var(--card-border);
    border-radius: 20px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    transition: all 0.3s;
    font-family: 'Fira Sans', sans-serif;
}

.mode-btn:hover { border-color: var(--secondary); background: rgba(255,193,7,0.1); }
.mode-btn.active { background: var(--secondary); color: var(--bg); border-color: var(--secondary); }

/* Teszt */
.test-container { display: flex; flex-direction: column; gap: 18px; }

.test-prompt {
    text-align: center;
    margin-bottom: 15px;
    padding: 20px;
    background: var(--bg-lighter);
    border-radius: 10px;
    border-left: 4px solid var(--secondary);
}
.test-prompt span { display: block; color: var(--text-muted); font-size: 0.9em; margin-bottom: 5px; }
.test-prompt strong { font-family: 'Source Serif 4', serif; font-size: 1.6em; color: #fff; }
.de-forms { font-family: 'Fira Sans', sans-serif; font-size: 1em; }

.input-group { display: flex; flex-direction: column; margin-bottom: 12px; }
.input-group:last-child { margin-bottom: 0; }
.input-group label { margin-bottom: 6px; font-weight: 600; font-size: 0.85em; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

input[type="text"] {
    padding: 14px 16px;
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    font-size: 1em;
    background: var(--bg-lighter);
    color: var(--text);
    transition: all 0.3s;
    font-family: 'Fira Sans', sans-serif;
}
input[type="text"]:focus { border-color: var(--secondary); }
input[type="text"].correct { border-color: var(--success); background: rgba(0,210,106,0.1); }
input[type="text"].incorrect { border-color: var(--error); background: rgba(255,107,107,0.1); }

/* Pontszám */
.score-board {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(135deg, var(--bg-lighter), var(--bg));
    border-radius: 12px;
    border: 2px solid #0d2e57;
}
.score-board .current-score { font-size: 2em; font-weight: 700; color: #fff; }
.score-board .high-score { font-size: 1em; color: var(--gold); margin-top: 8px; }

.feedback-msg { text-align: center; margin-top: 15px; font-weight: 600; min-height: 28px; padding: 10px; border-radius: 6px; }
.feedback-msg.success { background: rgba(0,210,106,0.15); color: var(--success); }
.feedback-msg.error { background: rgba(255,107,107,0.15); color: var(--error); }

/* Milestone üzenetek */
.feedback-msg.milestone {
    background: linear-gradient(135deg, rgba(255,215,0,0.2), rgba(255,193,7,0.3));
    color: var(--gold);
    font-size: 1.3em;
    padding: 20px;
    border: 2px solid var(--gold);
    animation: milestoneGlow 1s ease-in-out;
}

.feedback-msg.milestone .milestone-sub {
    display: block;
    font-size: 0.7em;
    margin-top: 8px;
    color: var(--secondary);
}

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

.test-speak-container { text-align: center; display: none; }

/* Statisztikák */
.stats-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 25px; }

.stat-card {
    background: var(--bg-lighter);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
}
.stat-value { font-size: 2em; font-weight: 700; color: var(--secondary); }
.stat-label { font-size: 0.85em; color: var(--text-muted); margin-top: 5px; text-transform: uppercase; }

/* Heti statisztika */
.weekly-stats {
    background: var(--bg-lighter);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(255,255,255,0.1);
}

.weekly-stats h3 {
    margin: 0 0 20px 0;
    color: var(--secondary);
    font-size: 1em;
    text-align: center;
}

.week-chart {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 150px;
    gap: 8px;
}

.day-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.bar-container {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.bar {
    width: 70%;
    max-width: 40px;
    background: linear-gradient(180deg, var(--secondary), var(--secondary-dark));
    border-radius: 4px 4px 0 0;
    transition: height 0.3s ease;
    min-height: 5px;
}

.day-bar.today .bar {
    background: linear-gradient(180deg, var(--success), #00a854);
    box-shadow: 0 0 10px rgba(0,210,106,0.5);
}

.day-label {
    font-size: 0.75em;
    color: var(--text-muted);
    margin-top: 8px;
    font-weight: 600;
}

.day-bar.today .day-label {
    color: var(--success);
}

.day-stats {
    font-size: 0.7em;
    color: var(--text-muted);
    margin-top: 4px;
}

.stats-subtitle { color: var(--error); margin: 20px 0 10px; font-size: 1.1em; }
.stats-hint { color: var(--text-muted); font-size: 0.85em; margin-bottom: 15px; font-style: italic; }

.error-list { display: flex; flex-direction: column; gap: 10px; }

.error-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255,107,107,0.1);
    border-radius: 8px;
    border-left: 3px solid var(--error);
}

.error-verb {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}
.error-verb strong { color: #fff; font-size: 1.1em; }
.error-meaning { color: var(--text-muted); font-size: 0.9em; }

.error-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85em;
    flex-shrink: 0;
}
.error-count { color: var(--error); font-weight: 600; }
.error-attempts { color: var(--text-muted); }
.error-rate { color: var(--secondary); font-weight: 600; }

/* Light mode error items */
body[data-theme="light"] .error-verb strong { color: var(--text); }
body[data-theme="light"] .error-item { background: rgba(220,50,50,0.08); }

.stats-success, .stats-empty { text-align: center; padding: 30px; color: var(--text-muted); }
.success-icon { font-size: 3em; display: block; margin-bottom: 10px; }

/* States */
.loading, .empty-state { text-align: center; color: var(--text-muted); }
.loading::after {
    content: '';
    display: inline-block;
    width: 20px; height: 20px;
    border: 2px solid var(--secondary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive */
@media (max-width: 600px) {
    .header { gap: 10px; }
    h1 { font-size: 1.4em; }
    .theme-toggle button { width: 38px; height: 38px; font-size: 1.1em; }
    .nav-btn { padding: 8px 12px; font-size: 0.75em; }
    .flashcard-term { font-size: 1.7em; }
    th, td { padding: 8px 6px; font-size: 0.8em; }
    .stats-summary { grid-template-columns: 1fr; }
    .mode-selector { flex-direction: column; }
    .conj-grid { grid-template-columns: 1fr; }
    .week-chart { height: 120px; }
    .day-label { font-size: 0.65em; }
    .problem-verbs-header { flex-direction: column; align-items: flex-start; }
    .error-item { flex-direction: column; align-items: flex-start; gap: 8px; }
    .error-stats { width: 100%; justify-content: flex-start; }
}

/* Teszt progress és eredmény */
.test-progress {
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(255,193,7,0.1);
    border-radius: 8px;
    color: var(--secondary);
    font-size: 0.95em;
}

.test-result {
    text-align: center;
    padding: 40px 20px;
    animation: slideIn 0.4s ease;
}

.result-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.result-title {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 10px;
}

.result-score {
    font-size: 2.5em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.result-percentage {
    font-size: 1.2em;
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* Teszt beállítások */
.test-settings {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
}

.test-settings .mode-selector {
    flex: 1;
    min-width: 200px;
}

.test-settings .type-selector {
    flex: 1;
    min-width: 200px;
    justify-content: flex-start;
}

body[data-theme="light"] .test-settings {
    background: rgba(0,0,0,0.03);
}

.type-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.type-selector select {
    padding: 10px 15px;
    font-size: 1em;
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text);
    border: 2px solid var(--card-border);
    cursor: pointer;
    min-width: 200px;
}

.type-selector select:focus {
    outline: none;
    border-color: var(--secondary);
}

body[data-theme="light"] .type-selector select {
    background: #fff;
    border-color: #ddd;
}

/* Konfetti animáció */
@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg) scale(0.5);
        opacity: 0;
    }
}

/* Light theme additional fixes */
body[data-theme="light"] table strong {
    color: var(--text);
}

body[data-theme="light"] .empty-state p {
    color: var(--text-muted);
}

body[data-theme="light"] .material-selector label {
    color: var(--text);
}

body[data-theme="light"] .section-title {
    color: var(--primary);
}

body[data-theme="light"] .conjugation-selector label {
    color: var(--text);
}

/* Heti navigáció */
.week-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.week-nav-btn {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    color: var(--text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.week-nav-btn:hover:not(.disabled) {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.week-nav-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.week-range {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text);
    min-width: 150px;
    text-align: center;
}

/* Makacs szavak fejléc és rendezés */
.problem-verbs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.problem-verbs-header .stats-subtitle {
    margin: 0;
}

.sort-buttons {
    display: flex;
    gap: 8px;
}

.sort-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.2s;
}

.sort-btn:hover {
    border-color: var(--secondary);
    color: var(--text);
}

.sort-btn.active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #000;
    font-weight: 600;
}

/* Light theme sort buttons */
body[data-theme="light"] .week-nav-btn {
    background: #fff;
    border-color: #ddd;
}

body[data-theme="light"] .week-nav-btn:hover:not(.disabled) {
    background: var(--primary);
    color: #fff;
}

body[data-theme="light"] .sort-btn {
    background: #fff;
    border-color: #ddd;
}

body[data-theme="light"] .sort-btn.active {
    background: var(--secondary);
    color: #000;
}

/* === FŐ STATISZTIKA KÁRTYA (Mozgóátlag) === */
.main-stat-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(196,30,58,0.3);
    position: relative;
    overflow: hidden;
}

.main-stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.main-stat-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

.main-stat-label {
    font-size: 1em;
    color: rgba(255,255,255,0.85);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.main-stat-value {
    font-size: 4em;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.main-stat-value.not-enough {
    font-size: 2.5em;
    color: rgba(255,255,255,0.5);
}

.main-stat-hint {
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
}

/* Trend badge */
.trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.trend-badge.trend-up {
    background: rgba(0,210,106,0.2);
    color: #00d26a;
}

.trend-badge.trend-down {
    background: rgba(255,107,107,0.2);
    color: #ff6b6b;
}

.trend-badge.trend-stable {
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
}

/* Másodlagos összesítő */
.stats-summary.secondary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card.mini {
    background: rgba(255,255,255,0.05);
    padding: 12px 10px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
}

.stat-card.mini .stat-value {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--text);
}

.stat-card.mini .stat-label {
    font-size: 0.7em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Light theme */
body[data-theme="light"] .main-stat-card {
    background: linear-gradient(135deg, var(--primary), #8a0c28);
}

body[data-theme="light"] .stat-card.mini {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.08);
}

body[data-theme="light"] .trend-badge.trend-up {
    background: rgba(0,180,80,0.15);
    color: #0a7c42;
}

body[data-theme="light"] .trend-badge.trend-down {
    background: rgba(220,50,50,0.15);
    color: #c0392b;
}

body[data-theme="light"] .trend-badge.trend-stable {
    background: rgba(0,0,0,0.08);
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 600px) {
    .main-stat-value {
        font-size: 3em;
    }

    .main-stat-header {
        flex-direction: column;
        gap: 8px;
    }

    .stats-summary.secondary {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .stat-card.mini {
        padding: 10px 6px;
    }

    .stat-card.mini .stat-value {
        font-size: 1.2em;
    }

    .stat-card.mini .stat-label {
        font-size: 0.65em;
    }
}

/* ===============================
   BADGE RENDSZER STÍLUSOK
   =============================== */

/* Badge Modal Overlay */
.badge-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.badge-modal-overlay.visible {
    opacity: 1;
}

.badge-modal {
    position: relative;
    animation: badgePopIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.badge-modal-overlay.visible .badge-modal {
    transform: scale(1);
}

@keyframes badgePopIn {
    0% { transform: scale(0.3) rotate(-10deg); opacity: 0; }
    50% { transform: scale(1.1) rotate(3deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.badge-modal-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.4) 0%, transparent 70%);
    animation: glowPulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glowPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.badge-modal-content {
    background: linear-gradient(145deg, var(--card-bg), var(--bg-lighter));
    border: 3px solid var(--secondary);
    border-radius: 20px;
    padding: 30px 40px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 193, 7, 0.2);
}

.badge-modal-title {
    font-size: 1.5em;
    color: var(--secondary);
    margin-bottom: 20px;
    font-weight: 700;
}

.badge-modal-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    animation: badgeFloat 3s ease-in-out infinite;
}

.badge-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(255, 193, 7, 0.4));
}

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

.badge-modal-name {
    font-size: 1.4em;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 5px;
}

.badge-modal-level {
    font-size: 1em;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.badge-modal-btn {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    border: none;
    color: #000;
    padding: 12px 40px;
    border-radius: 30px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Fira Sans', sans-serif;
}

.badge-modal-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 193, 7, 0.4);
}

/* Badge Lista Nézet */
.badge-summary {
    text-align: center;
    padding: 25px;
    margin-bottom: 25px;
    background: linear-gradient(to bottom right, #244d7c, #375e8b);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(36, 77, 124, 0.25);
}

.badge-summary-count {
    font-size: 2.5em;
    font-weight: 700;
    color: #fff;
}

.badge-summary-label {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
}

.badge-summary-progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin-top: 15px;
    overflow: hidden;
}

.badge-summary-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--gold));
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Utoljára megszerzett badge-ek */
.recent-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.recent-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 80px;
    cursor: pointer;
    transition: transform 0.2s;
}

.recent-badge-item:hover {
    transform: translateY(-3px);
}

.recent-badge-item img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.recent-badge-info {
    text-align: center;
}

.recent-badge-name {
    font-size: 0.8em;
    color: #fff;
    font-weight: 600;
}

.recent-badge-level {
    font-size: 0.7em;
    color: rgba(255,255,255,0.7);
}

.badge-category {
    margin-bottom: 25px;
}

.badge-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 8px;
}

.badge-category-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.badge-category-title {
    font-size: 1.2em;
    color: var(--text);
    margin: 0;
}

.badge-category-desc {
    font-size: 0.85em;
    color: var(--text-muted);
}

.badge-category-how {
    font-size: 0.85em;
    color: var(--text-muted);
    text-align: right;
    align-self: flex-end;
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.badge-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.badge-item.earned {
    background: rgba(255, 193, 7, 0.1);
    border-color: var(--secondary);
    cursor: pointer;
}

.badge-item.earned:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(255, 193, 7, 0.3);
}

.badge-item.locked {
    opacity: 0.7;
}

.badge-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.08);
}

.badge-image-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
    margin-bottom: 10px;
}

.badge-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: filter 0.3s;
}

/* Mystery badge (locked) */
.badge-mystery {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    color: var(--text-muted);
    font-weight: 700;
    border: 2px dashed rgba(255,255,255,0.2);
}

.badge-item.locked:hover .badge-mystery {
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.08));
    border-color: rgba(255,255,255,0.3);
}

/* Progress ring a locked badge-ekhez */
.badge-progress-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: conic-gradient(
        var(--secondary) var(--progress),
        rgba(255, 255, 255, 0.1) var(--progress)
    );
    mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #fff calc(100% - 4px));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #fff calc(100% - 4px));
    pointer-events: none;
}

.badge-label {
    font-size: 0.75em;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.3;
}

.badge-item.earned .badge-label {
    color: var(--text);
}

.badge-earned-mark {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
    color: #fff;
    font-weight: 700;
}

/* Light theme */
body[data-theme="light"] .badge-modal-content {
    background: linear-gradient(145deg, #fff, #f5f5f5);
    border-color: var(--secondary);
}

body[data-theme="light"] .badge-category-header {
    border-color: rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] .badge-item {
    background: rgba(0, 0, 0, 0.02);
}

body[data-theme="light"] .badge-item.earned {
    background: rgba(255, 193, 7, 0.15);
}

body[data-theme="light"] .badge-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

body[data-theme="light"] .badge-mystery {
    background: linear-gradient(135deg, rgba(0,0,0,0.08), rgba(0,0,0,0.04));
    border-color: rgba(0,0,0,0.15);
    color: #999;
}

body[data-theme="light"] .badge-item.locked:hover .badge-mystery {
    background: linear-gradient(135deg, rgba(0,0,0,0.12), rgba(0,0,0,0.06));
    border-color: rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 600px) {
    .badge-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .badge-image-wrapper {
        width: 50px;
        height: 50px;
    }

    .badge-label {
        font-size: 0.65em;
    }

    .badge-modal-content {
        padding: 25px 20px;
        margin: 0 15px;
    }

    .badge-modal-image {
        width: 100px;
        height: 100px;
    }

    .badge-summary-count {
        font-size: 2em;
    }

    .badge-category-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .badge-category-how {
        text-align: left;
    }

    .recent-badges {
        gap: 10px;
    }

    .recent-badge-item {
        min-width: 60px;
    }

    .recent-badge-item img {
        width: 36px;
        height: 36px;
    }

    .recent-badge-name {
        font-size: 0.7em;
    }

    .recent-badge-level {
        font-size: 0.6em;
    }
}

/* ===============================
   GYAKORLÁS - FLIP CARD
   =============================== */

.practice-wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.practice-wrapper > .flip-card-container,
.practice-wrapper > .practice-counter,
.practice-wrapper > .practice-nav,
.practice-wrapper > .practice-hints {
    align-self: center;
}

.practice-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 10px;
    margin-bottom: 20px;
}

.practice-mode-selector {
    display: flex;
    gap: 8px;
}

.practice-mode-btn {
    padding: 8px 16px;
    border: 2px solid var(--card-border);
    border-radius: 20px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s;
    font-family: 'Fira Sans', sans-serif;
}

.practice-mode-btn:hover {
    border-color: var(--secondary);
    background: rgba(255,193,7,0.1);
}

.practice-mode-btn.active {
    background: var(--secondary);
    color: var(--bg);
    border-color: var(--secondary);
}

.practice-actions {
    display: flex;
    gap: 8px;
}

.practice-icon-btn {
    width: 42px;
    height: 42px;
    border: 2px solid var(--card-border);
    border-radius: 50%;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    font-size: 1.1em;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.practice-icon-btn:hover {
    border-color: var(--secondary);
    background: rgba(255,193,7,0.15);
    transform: scale(1.1);
}

/* Flip Card */
.flip-card-container {
    perspective: 1000px;
    width: 100%;
    max-width: 500px;
    height: 320px;
    cursor: pointer;
    touch-action: pan-y pinch-zoom;
    user-select: none;
    -webkit-user-select: none;
    overflow: visible;
    margin-bottom: 20px;
}

.flip-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

.flip-card.flipped {
    transform: rotateX(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    padding: 30px;
    overflow: hidden;
    box-sizing: border-box;
}

.flip-card-front {
    background: linear-gradient(145deg, #4a69bd, #6a89cc);
}

.flip-card-back {
    background: linear-gradient(145deg, #38ada9, #78e08f);
    transform: rotateX(180deg);
}

.card-content {
    text-align: center;
    width: 100%;
}

.card-main-text {
    font-family: 'Source Serif 4', serif;
    font-size: 2.5em;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    max-width: 100%;
    padding: 0 10px;
    text-align: center;
}

.card-sub-text {
    font-size: 1.2em;
    color: rgba(255,255,255,0.85);
    margin-top: 10px;
}

.card-example {
    font-size: 1em;
    color: rgba(255,255,255,0.75);
    margin-top: 15px;
    font-style: italic;
    padding: 10px 15px;
    background: rgba(0,0,0,0.15);
    border-radius: 8px;
}

.card-verb-form {
    font-size: 2em;
    color: #fff;
    margin: 8px 0;
    font-weight: 500;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.card-verb-form.card-verb-main {
    font-size: 2.5em;
    font-weight: 700;
}

/* Counter */
.practice-counter {
    font-size: 1.1em;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.practice-counter span:first-child {
    font-weight: 700;
    color: var(--secondary);
}

/* Navigation */
.practice-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 15px;
}

.practice-nav-btn {
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.2);
    color: var(--text);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Fira Sans', sans-serif;
}

.practice-nav-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-2px);
}

.practice-nav-btn.flip-btn {
    background: rgba(255,193,7,0.15);
    border-color: rgba(255,193,7,0.4);
}

.practice-nav-btn.flip-btn:hover {
    background: rgba(255,193,7,0.25);
    border-color: rgba(255,193,7,0.6);
}

.practice-nav-btn.shuffle-btn {
    padding: 10px 12px;
    min-width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.practice-nav-btn.shuffle-btn svg {
    display: block;
}

.practice-nav-btn.shuffle-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
}

/* Fullscreen close button (mobile/tablet) */
.fullscreen-close-btn {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 1.4em;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s;
}

.fullscreen-close-btn:hover {
    background: rgba(0,0,0,0.7);
    border-color: rgba(255,255,255,0.5);
}

/* Hints */
.practice-hints {
    font-size: 0.8em;
    color: var(--text-muted);
    text-align: center;
    opacity: 0.7;
}

.hints-mobile {
    display: none;
}

/* Tablet (768px - 1024px) */
@media (min-width: 601px) and (max-width: 1024px) {
    .flip-card-container {
        max-width: 450px;
        height: 300px;
    }

    .card-main-text {
        font-size: 2.2em;
    }

    .card-verb-form {
        font-size: 1.6em;
    }

    .card-verb-form.card-verb-main {
        font-size: 2em;
    }

    body.practice-fullscreen .flip-card-container {
        max-width: 600px;
        height: 380px;
    }

    body.practice-fullscreen .card-main-text {
        font-size: 3em;
    }

    body.practice-fullscreen .card-verb-form {
        font-size: 2.2em;
    }

    body.practice-fullscreen .card-verb-form.card-verb-main {
        font-size: 2.6em;
    }

    /* Test fullscreen tablet */
    body.test-fullscreen .test-wrapper {
        max-width: 550px;
    }

    body.test-fullscreen .test-prompt strong {
        font-size: 1.8em;
    }
}

@media (hover: none) and (pointer: coarse) {
    /* Touch eszközökön (tablet, mobil) */
    .hints-desktop {
        display: none;
    }
    .hints-mobile {
        display: inline;
    }
}

/* ===============================
   FULLSCREEN MÓD
   =============================== */

body.practice-fullscreen {
    overflow: hidden;
}

body.practice-fullscreen .header,
body.practice-fullscreen .material-selector,
body.practice-fullscreen .nav-container,
body.practice-fullscreen .score-board {
    display: none !important;
}

body.practice-fullscreen #practice {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: none;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

body.practice-fullscreen .practice-wrapper {
    height: 100%;
    justify-content: center;
    padding: 20px;
}

body.practice-fullscreen .practice-toolbar {
    display: none !important;
}

/* Fullscreen close button visible on touch devices */
@media (hover: none) and (pointer: coarse) {
    body.practice-fullscreen .fullscreen-close-btn {
        display: block !important;
    }
    body.test-fullscreen .fullscreen-close-btn {
        display: block !important;
    }
}

/* ===============================
   TEST FULLSCREEN MÓD
   =============================== */

body.test-fullscreen {
    overflow: hidden;
}

body.test-fullscreen .header,
body.test-fullscreen .material-selector,
body.test-fullscreen .nav-container,
body.test-fullscreen .score-board {
    display: none !important;
}

body.test-fullscreen .test-settings {
    display: none !important;
}

body.test-fullscreen #test {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: none;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 20px;
}
body.test-fullscreen .test-container {
    width: 100%;
    max-width: 900px;
}

body.test-fullscreen .test-wrapper {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

body.test-fullscreen .test-progress {
    font-size: 1.2em;
}

body.test-fullscreen .test-prompt {
    padding: 25px;
}

body.test-fullscreen .test-prompt strong {
    font-size: 2em;
}

body.test-fullscreen .input-group,
body.test-fullscreen .btn-action {
    width: 100%;
    max-width: 100%;
}

body.test-fullscreen .test-result {
    padding: 30px 20px;
}

@media (max-width: 600px) {
    body.test-fullscreen #test {
        padding: 15px;
    }

    body.test-fullscreen .test-wrapper {
        max-width: 100%;
    }
}

/* Test fullscreen button in toolbar */
.test-fullscreen-btn {
    margin-left: auto;
}

.test-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.test-wrapper .input-group,
.test-wrapper .btn-action {
    width: 100%;
}

/* ===============================
   STUDY FULLSCREEN MÓD
   =============================== */

.study-wrapper {
    position: relative;
}

body.study-fullscreen {
    overflow: hidden;
}

body.study-fullscreen .header,
body.study-fullscreen .material-selector,
body.study-fullscreen .nav-container,
body.study-fullscreen .score-board {
    display: none !important;
}

body.study-fullscreen .study-toolbar {
    display: none !important;
}

body.study-fullscreen #study {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: none;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    z-index: 9999;
    background: var(--bg);
    padding: 20px;
    overflow-y: auto;
}

body.study-fullscreen .table-container {
    max-height: none;
}

/* Touch devices - close button for study fullscreen */
@media (hover: none) and (pointer: coarse) {
    body.study-fullscreen .fullscreen-close-btn {
        display: block !important;
    }
}

body.practice-fullscreen .flip-card-container {
    max-width: 700px;
    height: 450px;
}

body.practice-fullscreen .card-main-text {
    font-size: 3em;
    max-width: 100%;
    padding: 0 30px;
}

body.practice-fullscreen .card-verb-form {
    font-size: 2.8em;
}

body.practice-fullscreen .card-verb-form.card-verb-main {
    font-size: 3.5em;
}

/* Light theme kiegészítések */
body[data-theme="light"] .practice-mode-btn {
    background: #fff;
    border-color: #ddd;
    color: var(--text);
}

body[data-theme="light"] .practice-mode-btn.active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #000;
}

body[data-theme="light"] .practice-icon-btn {
    background: #fff;
    border-color: #ddd;
}

body[data-theme="light"] .practice-nav-btn {
    background: #fff;
    border-color: #ddd;
    color: var(--text);
}

body[data-theme="light"] .practice-nav-btn:hover {
    background: #f5f5f5;
    border-color: var(--primary);
}

body[data-theme="light"] .flip-card-container {
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.15));
}

body[data-theme="light"] .fullscreen-close-btn {
    background: rgba(255,255,255,0.9);
    border-color: rgba(0,0,0,0.2);
    color: #333;
}

body[data-theme="light"] .fullscreen-close-btn:hover {
    background: #fff;
    border-color: rgba(0,0,0,0.4);
}

/* Responsive */
@media (max-width: 600px) {
    .flip-card-container {
        height: 240px;
    }

    .card-main-text {
        font-size: 1.6em;
    }

    .card-verb-form {
        font-size: 1.3em;
    }

    .card-verb-form.card-verb-main {
        font-size: 1.5em;
    }

    .card-example {
        font-size: 0.85em;
        padding: 8px 12px;
    }

    .practice-toolbar {
        justify-content: center;
    }

    .practice-nav {
        gap: 5px;
        width: 100%;
        justify-content: center;
    }

    .practice-nav-btn {
        padding: 8px 10px;
        font-size: 0.75em;
        white-space: nowrap;
    }

    .practice-nav-btn.shuffle-btn {
        padding: 8px 10px;
    }

    .practice-nav-btn.shuffle-btn svg {
        width: 16px;
        height: 16px;
    }

    .practice-hints {
        font-size: 0.75em;
    }

    body.practice-fullscreen .flip-card-container {
        max-width: 95%;
        height: 280px;
    }

    body.practice-fullscreen .card-main-text {
        font-size: 2em;
    }

    body.practice-fullscreen .card-verb-form {
        font-size: 1.5em;
    }

    body.practice-fullscreen .card-verb-form.card-verb-main {
        font-size: 1.8em;
    }

    /* Test fullscreen mobile */
    body.test-fullscreen .test-wrapper {
        padding: 10px;
    }

    body.test-fullscreen .test-prompt strong {
        font-size: 1.5em;
    }
}

/* ===============================
   NEMESIS KÁRTYA - Legnehezebb szó
   =============================== */
.nemesis-card {
    background: linear-gradient(135deg, #6B46C1 0%, #9F7AEA 100%);
    border-radius: 16px;
    padding: 20px;
    margin: 15px 0;
    text-align: center;
    box-shadow: 0 4px 15px rgba(107, 70, 193, 0.3);
    position: relative;
    overflow: hidden;
}

.nemesis-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: nemesis-glow 3s ease-in-out infinite;
}

@keyframes nemesis-glow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10%, 10%); }
}

.nemesis-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    position: relative;
}

.nemesis-emoji {
    font-size: 1.8em;
    animation: nemesis-bounce 2s ease-in-out infinite;
}

@keyframes nemesis-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.nemesis-label {
    color: rgba(255,255,255,0.9);
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nemesis-word {
    font-size: 2em;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin: 10px 0;
    position: relative;
}

.nemesis-meaning {
    color: rgba(255,255,255,0.85);
    font-size: 1.1em;
    margin-bottom: 10px;
}

.nemesis-stats {
    color: rgba(255,255,255,0.7);
    font-size: 0.85em;
}

/* ===============================
   MAKACS SZAVAK SZÍNKÓDOLÁS
   =============================== */
.error-item.critical {
    background: rgba(220, 50, 50, 0.15);
    border-left: 4px solid #dc3232;
}

.error-item.problem {
    background: rgba(255, 152, 0, 0.15);
    border-left: 4px solid #ff9800;
}

.error-item.improving {
    background: rgba(255, 193, 7, 0.12);
    border-left: 4px solid #ffc107;
}

.hot-indicator {
    margin-right: 6px;
    animation: hot-pulse 1s ease-in-out infinite;
}

@keyframes hot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.streak-indicator {
    margin-left: 8px;
    background: var(--success);
    color: #fff;
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

tr.is-mastered {
    background: rgba(0, 210, 106, 0.08);
}

tr.is-mastered td:first-child strong {
    color: var(--success);
}

/* Light téma kiegészítések */
body[data-theme="light"] .nemesis-card {
    box-shadow: 0 4px 15px rgba(107, 70, 193, 0.2);
}

body[data-theme="light"] .error-item.critical {
    background: rgba(220, 50, 50, 0.1);
}

body[data-theme="light"] .error-item.problem {
    background: rgba(255, 152, 0, 0.1);
}

body[data-theme="light"] .error-item.improving {
    background: rgba(255, 193, 7, 0.08);
}

body[data-theme="light"] tr.is-mastered {
    background: rgba(0, 210, 106, 0.06);
}

body[data-theme="light"] .status-badge.error {
    border-color: #dc3545;
    color: #dc3545;
}

body[data-theme="light"] .status-badge.learning {
    border-color: #e5ac00;
    color: #b38600;
}

body[data-theme="light"] .status-badge.mastered {
    border-color: #00a854;
    color: #00a854;
}

/* ===============================
   EGYSÉGES TOOLBAR STÍLUSOK
   =============================== */
.toolbar-btn {
    background: var(--bg-lighter);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 10px 16px;
    color: var(--text);
    font-size: 1em;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
}

.toolbar-btn:hover {
    background: var(--card-bg);
    border-color: rgba(255,255,255,0.25);
}

.toolbar-btn.active {
    background: var(--card-bg);
    border-color: rgba(255,255,255,0.35);
}

.toolbar-btn svg {
    flex-shrink: 0;
}

.toolbar-btn.nav-btn-wide {
    padding: 10px 20px;
    min-width: 120px;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.toolbar-grow {
    flex: 1;
}

.toolbar-select {
    background: var(--bg-lighter);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 10px 16px;
    color: var(--text);
    font-size: 1.1em;
    cursor: pointer;
    min-height: 44px;
    height: 44px;
    width: 100%;
    font-family: 'Fira Sans', sans-serif;
}

.toolbar-select:focus {
    border-color: rgba(255,255,255,0.3);
}

/* Test toolbar */
.test-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(0,0,0,0.1);
    border-radius: 12px;
}

.test-toolbar .toolbar-grow {
    flex: 1;
}

.test-toolbar .toolbar-select {
    width: 100%;
}

.test-toolbar .toolbar-group:last-child {
    margin-left: 0;
}

/* Study toolbar */
.study-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.study-title {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text);
}

.study-count {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.9em;
}

/* Practice nav */
.practice-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

/* Light téma toolbar */
body[data-theme="light"] .toolbar-btn {
    background: #fff;
    border-color: #e0e0e0;
    color: var(--text);
}

body[data-theme="light"] .toolbar-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

body[data-theme="light"] .toolbar-btn.active {
    background: #f0f0f0;
    border-color: #bbb;
}

body[data-theme="light"] .toolbar-select {
    background: #fff;
    border-color: #e0e0e0;
    color: var(--text);
}

body[data-theme="light"] .test-toolbar {
    background: rgba(0,0,0,0.03);
}

body[data-theme="light"] .theme-toggle button {
    background: #fff;
    border-color: #e0e0e0;
    color: var(--text);
}

body[data-theme="light"] .theme-toggle button:hover {
    background: #f5f5f5;
}

/* Mobile responsive */
@media (max-width: 600px) {
    .toolbar-btn {
        padding: 8px 12px;
        min-height: 40px;
    }

    .toolbar-btn.nav-btn-wide {
        padding: 8px 14px;
        min-width: 100px;
        font-size: 0.9em;
    }

    .practice-toolbar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .test-toolbar {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .test-toolbar .toolbar-grow {
        flex: 1;
        min-width: 0;
    }
}

/* ===============================
   AUTH ÉS USER INTERFACE
   =============================== */

/* Header kiegészítések */
.header h1 {
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* User info (bejelentkezve) */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Login oldal */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: var(--bg-lighter);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.login-box h1 {
    text-align: center;
    margin: 0 0 30px 0;
    color: var(--text);
    font-size: 1.8rem;
    background: none;
    -webkit-text-fill-color: var(--text);
}

.login-field {
    margin-bottom: 20px;
}

.login-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.login-field input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.login-field input:focus {
    outline: none;
    border-color: var(--secondary);
}

.login-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.login-btn:hover {
    opacity: 0.9;
}

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

.login-error {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255,0,0,0.1);
    color: var(--error);
    text-align: center;
    display: none;
}

.login-error.visible {
    display: block;
}

/* Light téma login */
body[data-theme="light"] .login-box {
    background: #fff;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

body[data-theme="light"] .login-box h1 {
    color: var(--text);
}

body[data-theme="light"] .login-field input {
    background: #fff;
    border-color: #ddd;
    color: var(--text);
}

body[data-theme="light"] .login-field input:focus {
    border-color: var(--primary);
}

/* ===============================
   SCORE BOARD ÚJRATERVEZÉS
   =============================== */

/* Felülírjuk a régi score-board-ot */
.score-board {
    background: var(--bg-lighter);
    border: 2px solid #0d2e57;
    border-radius: 12px;
    padding: 15px 20px;
    text-align: center;
    margin-bottom: 20px;
}

.daily-attempts {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.score-details {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.score-details .accuracy {
    color: var(--secondary);
}

.score-details .combo {
    color: var(--gold);
}

/* Light téma score board */
body[data-theme="light"] .score-board {
    background: #fff;
    border-color: var(--secondary);
}

body[data-theme="light"] .daily-attempts {
    color: var(--text);
}

body[data-theme="light"] .score-details {
    color: var(--text-muted);
}

/* ===============================
   TESZT FULLSCREEN MÓDOSÍTÁSOK
   =============================== */

/* Toolbar elrejtése fullscreen módban */
body.test-fullscreen .test-toolbar {
    display: none !important;
}

/* ===============================
   HEADER GOMBOK (Streak, Badges)
   =============================== */

.header-btn {
    background: var(--bg-lighter);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-btn:hover {
    background: var(--card-bg);
    border-color: rgba(255,255,255,0.2);
}

.header-btn.active {
    background: var(--card-bg);
    border-color: rgba(255,255,255,0.25);
}

#streakBtn {
    width: auto;
    padding: 0 12px;
    gap: 6px;
    color: var(--gold);
    font-weight: 600;
    font-size: 1rem;
}

#streakBtn .streak-icon {
    color: var(--gold);
}

body[data-theme="light"] .header-btn {
    background: #fff;
    border-color: #ddd;
    color: var(--text);
}

body[data-theme="light"] .header-btn:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

body[data-theme="light"] .header-btn.active {
    background: #f0f0f0;
    border-color: #bbb;
}

body[data-theme="light"] #streakBtn {
    color: #d4a012;
}

/* Logout gomb igazítása */
.logout-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text);
}

body[data-theme="light"] .logout-btn {
    border-color: #ddd;
    color: var(--text-muted);
}

body[data-theme="light"] .logout-btn:hover {
    background: rgba(0,0,0,0.05);
    color: var(--text);
}

/* ===============================
   STREAK MODAL
   =============================== */

.streak-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.streak-modal {
    background: var(--card-bg);
    border-radius: 20px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.streak-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.streak-modal-header h2 {
    color: var(--secondary);
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.streak-modal-close {
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
}

.streak-modal-close:hover {
    background: rgba(255,255,255,0.2);
    color: var(--text);
}

.streak-modal-content {
    padding: 20px;
}

/* Streak Stats - 50-50% elrendezés */
.streak-stats {
    display: flex;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.streak-stat-box {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 12px;
}

.streak-stat-box:first-child {
    border-right: 1px solid rgba(255,255,255,0.1);
}

.streak-stat {
    text-align: right;
}

.streak-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.streak-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.streak-icon-large {
    font-size: 2.2rem;
}

/* Freezes */
.streak-freezes {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.freezes-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.freeze-indicators {
    display: flex;
    gap: 6px;
}

.freeze-bolt {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.freeze-bolt .freeze-bolt-icon {
    width: 24px;
    height: 24px;
}

.freeze-bolt.active {
    opacity: 1;
    color: var(--gold);
}

.freeze-bolt.inactive {
    opacity: 0.3;
    color: var(--text-muted);
}

/* Calendar */
.streak-calendar {
    margin-top: 15px;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 15px;
}

.day-name {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}

.calendar-day.empty {
    background: transparent;
}

.calendar-day.completed {
    background: var(--secondary);
    color: #000;
}

.calendar-day.frozen {
    background: rgba(0, 210, 106, 0.3);
    color: var(--success);
}

.calendar-day.today {
    box-shadow: 0 0 0 2px var(--text);
}

.calendar-day.today.pending {
    background: transparent;
    box-shadow: 0 0 0 2px var(--secondary);
    color: var(--secondary);
}

.calendar-day.future {
    color: rgba(255,255,255,0.2);
}

.calendar-day.next-freeze {
    background: rgba(255, 215, 0, 0.2);
    color: var(--gold);
}

.calendar-day.missed {
    color: rgba(255,255,255,0.3);
}

.freeze-icon {
    width: 16px;
    height: 16px;
    color: currentColor;
}

.calendar-month {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 15px;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Light téma streak modal */
body[data-theme="light"] .streak-modal {
    background: #fff;
    border-color: #e0e0e0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

body[data-theme="light"] .streak-modal-header {
    border-color: #e0e0e0;
}

body[data-theme="light"] .streak-modal-header h2 {
    color: var(--primary);
}

body[data-theme="light"] .streak-stat-box:first-child {
    border-color: #e0e0e0;
}

body[data-theme="light"] .streak-freezes {
    border-color: #e0e0e0;
}

body[data-theme="light"] .streak-stats {
    border-color: #e0e0e0;
}

body[data-theme="light"] .calendar-day.completed {
    background: var(--secondary);
    color: #000;
}

body[data-theme="light"] .calendar-day.today {
    box-shadow: 0 0 0 2px var(--text);
}

body[data-theme="light"] .calendar-day.today.pending {
    box-shadow: 0 0 0 2px var(--primary);
    color: var(--primary);
}

body[data-theme="light"] .calendar-day.future {
    color: rgba(0,0,0,0.2);
}

body[data-theme="light"] .calendar-day.next-freeze {
    background: rgba(255, 193, 7, 0.2);
    color: #d4a012;
}

body[data-theme="light"] .calendar-day.missed {
    color: rgba(0,0,0,0.3);
}

/* Freeze progress */
.freeze-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

.freeze-progress-label {
    color: var(--text-muted);
}

.freeze-progress-value {
    color: var(--secondary);
    font-weight: 600;
}

body[data-theme="light"] .freeze-progress {
    border-color: #e0e0e0;
}


/* ===============================
   STATS DIRECTION SELECTOR
   =============================== */

.stats-direction-selector {
    position: relative;
    display: inline-block;
    margin-right: 8px;
}

.stats-direction-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 4px 10px;
    color: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.stats-direction-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.stats-direction-btn .dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.stats-direction-selector.open .dropdown-arrow {
    transform: rotate(180deg);
}

.stats-direction-options {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--card-bg, #1e3a5f);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 4px;
    min-width: 160px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
}

.stats-direction-selector.open .stats-direction-options {
    display: block;
}

.stats-direction-options button {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 8px 12px;
    color: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
}

.stats-direction-options button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.stats-direction-options button.active {
    background: rgba(255, 255, 255, 0.15);
    font-weight: 600;
}

/* Main stat header flex fix */
.main-stat-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Kattintás a dropdownon kívül bezárja */
@media (max-width: 600px) {
    .stats-direction-options {
        min-width: 140px;
    }

    .stats-direction-btn {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
}
/* ===============================
   KVÍZ STÍLUSOK
   Hozzáadni a style.css végéhez
   =============================== */

/* Wrapper */
.quiz-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
}

.quiz-wrapper > .quiz-question-card,
.quiz-wrapper > .quiz-options,
.quiz-wrapper > .quiz-counter {
    align-self: center;
}

/* Toolbar - test-toolbar mintájára */
.quiz-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(0,0,0,0.1);
    border-radius: 12px;
    width: 100%;
}

.quiz-toolbar .toolbar-grow {
    flex: 1;
}

.quiz-toolbar .toolbar-select {
    width: 100%;
}

/* Kérdés kártya - flip-card-front (lila) mintájára */
.quiz-question-card {
    background: linear-gradient(145deg, #4a69bd, #6a89cc);
    border-radius: 16px;
    padding: 40px 48px;
    margin-bottom: 24px;
    width: 100%;
    max-width: 500px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.quiz-question {
    font-family: 'Source Serif 4', serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    text-align: center;
    word-break: break-word;
}

/* Válasz gombok */
.quiz-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    max-width: 500px;
    margin-bottom: 24px;
}

.quiz-option-btn {
    padding: 20px 16px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: #16213e;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Fira Sans', sans-serif;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-break: break-word;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.quiz-option-btn:focus {
    outline: none;
}

.quiz-option-btn:hover:not(.correct):not(.wrong) {
    border-color: rgba(255,255,255,0.25);
    background: var(--card-bg);
}

.quiz-option-btn:active:not(.correct):not(.wrong) {
    transform: scale(0.98);
}

/* Helyes válasz - flip-card-back (zöld) mintájára */
.quiz-option-btn.correct {
    background: linear-gradient(145deg, #38ada9, #78e08f);
    border-color: transparent;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    animation: quiz-pulse-correct 0.3s ease;
}

/* Hibás válasz */
.quiz-option-btn.wrong {
    background: var(--error);
    border-color: transparent;
    color: #fff;
    animation: quiz-shake 0.4s ease;
}

@keyframes quiz-pulse-correct {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

@keyframes quiz-shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Számláló */
.quiz-counter {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* ===============================
   QUIZ FULLSCREEN MÓD
   =============================== */

body.quiz-fullscreen {
    overflow: hidden;
}

body.quiz-fullscreen .header,
body.quiz-fullscreen .material-selector,
body.quiz-fullscreen .nav-container,
body.quiz-fullscreen .score-board {
    display: none !important;
}

body.quiz-fullscreen #quiz {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: none;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

body.quiz-fullscreen .quiz-wrapper {
    height: 100%;
    justify-content: center;
    padding: 20px;
}

body.quiz-fullscreen .quiz-question-card,
body.quiz-fullscreen .quiz-options {
    width: 100%;
    max-width: 500px;
}

body.quiz-fullscreen .quiz-toolbar {
    display: none !important;
}

body.quiz-fullscreen .quiz-question-card {
    padding: 48px 56px;
    min-height: 220px;
}

body.quiz-fullscreen .quiz-question {
    font-size: 2.5rem;
}

body.quiz-fullscreen .quiz-option-btn {
    padding: 24px 20px;
    font-size: 1.2rem;
    min-height: 70px;
}

/* Close button fullscreenben látható */
body.quiz-fullscreen #quizFullscreenCloseBtn {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* ===============================
   MOBIL NÉZET
   =============================== */

@media (max-width: 600px) {
    .quiz-toolbar {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Select új sorba mobilon */
    .quiz-toolbar .toolbar-grow {
        width: 100%;
        order: 3;
    }

    .quiz-question-card {
        padding: 30px 20px;
        min-height: 140px;
    }

    .quiz-question {
        font-size: 1.6rem;
    }

    .quiz-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .quiz-option-btn {
        padding: 18px 16px;
        font-size: 1rem;
        min-height: 56px;
    }

    /* Fullscreen mobil */
    body.quiz-fullscreen .quiz-wrapper {
        padding: 15px;
        width: 100%;
    }

    body.quiz-fullscreen .quiz-question-card,
    body.quiz-fullscreen .quiz-options {
        max-width: none !important;
        width: 100% !important;
    }

    body.quiz-fullscreen .quiz-question {
        font-size: 1.8rem;
    }

    body.quiz-fullscreen .quiz-option-btn {
        font-size: 1.1rem;
        min-height: 60px;
    }
}

/* ===============================
   QUIZ HELYES VÁLASZ MODAL
   =============================== */

.quiz-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.quiz-modal-overlay.visible {
    opacity: 1;
}

.quiz-modal {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 32px 40px;
    max-width: 90%;
    max-height: 80%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.2s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.quiz-modal-overlay.visible .quiz-modal {
    transform: scale(1);
}

.quiz-modal-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.quiz-modal-title {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.quiz-modal-answer {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    word-break: break-word;
    max-width: 100%;
    background-color: #0d2e57;
    border-radius:20px;
    padding:20px;
}

.quiz-modal-btn {
    margin-top: 8px;
    padding: 14px 48px;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(145deg, #38ada9, #78e08f);
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quiz-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 173, 169, 0.4);
}

.quiz-modal-btn:active {
    transform: translateY(0);
}

@media (max-width: 600px) {
    .quiz-modal {
        padding: 24px 28px;
    }

    .quiz-modal-answer {
        font-size: 1.5rem;
    }

    .quiz-modal-btn {
        padding: 12px 40px;
        font-size: 1rem;
    }
}

/* Light téma */
body[data-theme="light"] .quiz-option-btn {
    background: #e8eaed;
    color: var(--text);
}

body[data-theme="light"] .quiz-option-btn:hover:not(.correct):not(.wrong) {
    background: #d8dadd;
    border-color: rgba(0,0,0,0.15);
}

/* ===============================
   STATS DIRECTION SELECTOR
   Hozzáadni a style.css végéhez
   =============================== */

.stats-direction-selector {
    position: relative;
    display: inline-block;
    margin-right: 8px;
}

.stats-direction-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 4px 10px;
    color: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.stats-direction-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.stats-direction-btn .dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.stats-direction-selector.open .dropdown-arrow {
    transform: rotate(180deg);
}

.stats-direction-options {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--card-bg, #1e3a5f);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 4px;
    min-width: 160px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: none;
}

.stats-direction-selector.open .stats-direction-options {
    display: block;
}

.stats-direction-options button {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 8px 12px;
    color: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
}

.stats-direction-options button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.stats-direction-options button.active {
    background: rgba(255, 255, 255, 0.15);
    font-weight: 600;
}

/* Main stat header flex fix */
.main-stat-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Kattintás a dropdownon kívül bezárja */
@media (max-width: 600px) {
    .stats-direction-options {
        min-width: 140px;
    }

    .stats-direction-btn {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
}

/* ===============================
   WORD PROGRESS BAR (Tanulás táblázat)
   =============================== */

.word-cell-td {
    padding: 8px 12px;
}

.word-cell-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.word-cell-row .status-badges {
    margin-left: auto;
}

.word-progress-track {
    margin-top: 6px;
    margin-left:45px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    opacity: .4;
}

.word-progress-bar {
    height: 100%;
    background: #f1c40f;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.word-progress-bar.progress-mastered {
    background: #38ada9;
}

/* Light téma */
body[data-theme="light"] .word-progress-track {
    background: rgba(0, 0, 0, 0.1);
}

body[data-theme="light"] .word-progress-bar {
    background: #e6a800;
}

body[data-theme="light"] .word-progress-bar.progress-mastered {
    background: #2d8a85;
}

/* Progress elrejtése */
.study-wrapper.hide-progress .word-progress-track {
    display: none;
}

/* Toolbar gombok jobbra */
#studyProgressBtn {
    display: flex;
    gap: 8px;
    margin-left: auto;
}
