:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --bg-color: #ecf0f1;
    --text-color: #333;
    --border-radius: 8px;
    --transition-speed: 0.3s;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.hidden { display: none !important; }

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%; /* Kicsit beljebb húzzuk a szélektől */
    background-color: rgba(255, 255, 255, 0.95); /* Enyhén átlátszó, hogy modern legyen */
    backdrop-filter: blur(10px); /* Homályosítja a mögötte lévő tartalmat görgetéskor */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000; /* Mindig legfelül marad */
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color, #2c3e50);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease;
}

.nav-brand:hover {
    transform: scale(1.05);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.nav-item {
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #7f8c8d;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background-color: #f0f4f8;
    color: var(--primary-color, #2c3e50);
}

/* Az épp aktív menüpont stílusa */
.nav-item.active {
    background-color: var(--primary-color, #2c3e50);
    color: white;
}

/* Mobil nézet: kisebb betűk, kevesebb padding */
@media (max-width: 600px) {
    .main-nav {
        flex-direction: column;
        padding: 0.8rem;
        gap: 1rem;
    }
}

.logo { font-size: 1.5rem; font-weight: bold; cursor: pointer; }

button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    transition: background-color var(--transition-speed);
}

button:hover { background-color: #2980b9; }

.container {
    max-width: 1200px;
    width: 100%;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Landing Page */
.landing-page { 
    text-align: center; 
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);

}

.landing-page h1 { 
    color: var(--primary-color); 
    font-size: 2.2rem;
    margin-bottom: 1rem; 
    font-weight: 800;
}

.subtitle { 
    font-size: 1.1rem; 
    color: #666; 
    max-width: 600px;
    margin: 0 auto 3rem auto; 
    line-height: 1.6;
}

.landing-cards {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.big-card {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    background: white;
    border: none;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.big-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: var(--secondary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.big-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    background: white;
    color: var(--text-color);
}

.big-card:hover::before {
    transform: scaleX(1);
}

.big-card .card-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.big-card h3 { 
    margin: 0 0 1rem 0; 
    font-size: 1.4rem; 
    color: var(--primary-color);
}

.big-card p {
    margin: 0;
    color: #7f8c8d;
    line-height: 1.5;
}

/* Infobox Stílusok */
.info-box {
    display: flex;
    gap: 15px;
    background-color: #e8f4fd; /* Halványkék háttér */
    border-left: 5px solid var(--primary-color, #3498db); /* Kiemelő csík a bal oldalon */
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    color: #2c3e50;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.info-box .info-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.info-box .info-content strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary-color, #2c3e50);
}

.info-box .info-content ol {
    margin: 0;
    padding-left: 20px;
    line-height: 1.6;
}

.info-box .info-content li {
    margin-bottom: 5px;
}

.info-box .info-content a {
    color: var(--primary-color, #3498db);
    text-decoration: none;
    font-weight: bold;
}

.info-box .info-content a:hover {
    text-decoration: underline;
}

/* Form Elemek */
.form-group { margin-bottom: 1.5rem; display: flex; flex-direction: column; }
.checkbox-group { flex-direction: row; align-items: center; gap: 10px; }
label { font-weight: bold; margin-bottom: 0.5rem; }
input[type="text"], select, textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
}
textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 150px;
    resize: vertical;
    margin-top: 1rem; /* Eltartja a felette lévő gombtól */
}

/* Prompt gombok elrendezése */
.button-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap; /* Mobilon egymás alá ugranak */
}

.button-group button {
    flex: 1; /* Egyforma szélesek lesznek */
    margin: 0; /* Felülírja az alap marginokat */
}

/* Gemini specifikus gomb stílus */
.btn-gemini {
    background: linear-gradient(135deg, #1A73E8 0%, #8E44AD 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-gemini:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(142, 68, 173, 0.3);
}

.divider { margin: 2rem 0; border: 0; border-top: 1px solid #eee; }

/* Feladattár */

.layout-sidebar {
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
    margin: auto;
    align-items: flex-start;
}

.sidebar {
    flex: 0 0 200px;
    width: 200px;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.filter-group-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.filter-group-col label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
}

.content {
    flex: 1;
    min-width: 0;
}

.sets-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.sets-list li {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    box-sizing: border-box;
}

.sets-list li:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.08);
}

.sets-list li .btn-practice {
    margin-top: auto; 
    width: 100%;
}

.list-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 15px;
}

.list-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #2c3e50;
    line-height: 1.3;
}

.badge {
    display: inline-block;
    background-color: #e8f4fd;
    color: #0d6efd;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid #b6d4fe;
}

.meta-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #555;
}

.meta-item {
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .layout-sidebar {
        flex-direction: column;
        gap: 20px;
    }
    
    .sidebar {
        flex: none;
        width: 100%;
        box-sizing: border-box;
    }
}


/* Gyakorló felület */
.practice-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
#fc-progress { font-weight: bold; font-size: 1.2rem; color: var(--secondary-color); }

.flashcard-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 2rem auto;
    overflow: hidden; /* Elrejti a kilépő kártyát */
    padding: 10px;
}

.flashcard-container {
    perspective: 1000px;
    width: 100%;
    height: 300px;
    cursor: pointer;
    /* A sliding animációt JS-ből vezéreljük */
}

.flashcard {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flashcard.flipped { transform: rotateY(180deg); }

.flashcard-front, .flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    font-size: 1.5rem;
    background-color: white;
    border: 2px solid var(--secondary-color);
}
.flashcard-back {
    transform: rotateY(180deg);
    background-color: #f8f9fa;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.fc-controls { display: flex; justify-content: center; gap: 1rem; }
.btn-practice { background-color: #27ae60; }
.btn-practice:hover { background-color: #2ecc71; }

.practice-end { text-align: center; padding: 3rem; background: #f8f9fa; border-radius: var(--border-radius); margin: 2rem auto; }
.practice-end h3 { margin-bottom: 1.5rem; color: var(--primary-color); }

/* Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); display: flex; justify-content: center; align-items: center; z-index: 1000;
}
.modal-box { background: white; padding: 2rem; border-radius: var(--border-radius); max-width: 400px; width: 90%; text-align: center; }

/* Footer */
.main-footer {
    background-color: var(--primary-color, #2c3e50); /* Sötétkék/Elegáns háttér */
    color: #ecf0f1; /* Világos szöveg */
    text-align: center;
    padding: 1.5rem 1rem;
    font-size: 0.9rem;
    margin-top: auto; /* ZSENIÁLIS TRÜKK: Ez tolja le a footert a képernyő legaljára! */
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05); /* Pici árnyék felfelé */
    z-index: 10;
}

.main-footer p {
    margin: 0;
    opacity: 0.8; /* Kicsit halványabb szöveg, hogy ne legyen túl tolakodó */
    letter-spacing: 0.5px;
}

/* Gombok konténere a kártyák alján */
.card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto; 
    width: 100%;
}

/* Flashcard gomb (pl. kék) */
.btn-flashcard {
    flex: 1; /* Felezi a helyet a másik gombbal */
    background-color: #0d6efd;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-flashcard:hover { background-color: #0b5ed7; }

/* Teszt gomb (pl. zöld vagy sötétebb szín, hogy kitűnjön) */
.btn-test {
    flex: 1;
    background-color: #198754; 
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-test:hover { background-color: #157347; }

/* ==========================================
   TESZT (KVÍZ) FELÜLET
   ========================================== */
.test-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.test-question-box {
    background: #ffffff;
    padding: 30px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 5px solid #198754;
}

#test-explanation {
    background-color: #f8d7da;
    color: #842029;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.test-question-box h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #2c3e50;
    line-height: 1.4;
}

.test-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Két oszlop asztalon */
    gap: 15px;
    margin-bottom: 25px;
}

.btn-option {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    color: #333;
}

.btn-option:hover:not(.disabled) {
    background: #e9ecef;
    border-color: #ced4da;
    transform: translateY(-2px);
}

/* Helyes és Helytelen állapotok */
.btn-option.correct {
    background: #d1e7dd;
    border-color: #198754;
    color: #0f5132;
    font-weight: bold;
}

.btn-option.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
    color: #842029;
}

.btn-option.disabled {
    pointer-events: none;
    opacity: 0.7;
}

.test-controls {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .test-options-grid {
        grid-template-columns: 1fr; /* Mobilon egymás alá kerülnek a válaszok */
    }
}