
/* =========================================
   TANULÓSAROK – RESZPONZÍV STÍLUS
   style.css
   ========================================= */

:root {
    --bg: #0b1020;
    --bg-light: #131c32;
    --panel: rgba(24, 35, 58, 0.94);
    --panel-light: rgba(34, 48, 75, 0.95);
    --primary: #f4b942;
    --primary-hover: #ffd166;
    --text: #f4f7ff;
    --muted: #b9c4d9;
    --success: #38d996;
    --danger: #ff6577;
    --border: rgba(255, 255, 255, 0.13);
    --header-height: 76px;
    --radius: 18px;
    --shadow: 0 12px 35px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
    margin: 0;
    min-height: 100vh;
    padding-top: var(--header-height);
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(
            circle at 15% 10%,
            rgba(56, 92, 160, 0.24),
            transparent 35%
        ),
        radial-gradient(
            circle at 85% 75%,
            rgba(244, 185, 66, 0.10),
            transparent 32%
        ),
        var(--bg);
    line-height: 1.6;
}

body.modal-open {
    overflow: hidden;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--primary-hover);
    outline-offset: 3px;
}

a {
    color: var(--primary-hover);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* =========================================
   FIX FEJLÉC
   ========================================= */

.site-header {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    right: 0;
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    background: rgba(8, 13, 27, 0.96);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 5px 24px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.header-inner {
    width: 100%;
    max-width: 1400px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.logo,
.site-logo {
    flex-shrink: 0;
    color: var(--primary);
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.main-nav button,
.nav-button {
    padding: 9px 12px;
    color: var(--text);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.main-nav button:hover,
.nav-button:hover {
    color: var(--primary-hover);
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--border);
}

.main-nav button.active,
.nav-button.active {
    color: #172033;
    background: var(--primary);
    border-color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    min-width: 44px;
    min-height: 44px;
    color: var(--text);
    background: var(--panel-light);
    border: 1px solid var(--border);
    border-radius: 10px;
}

/* =========================================
   OLDAL ÉS TARTALOM
   ========================================= */

.container,
.page-container {
    width: min(1120px, calc(100% - 36px));
    margin: 0 auto;
}

main {
    min-height: calc(100vh - var(--header-height) - 120px);
    padding-top: 28px;
    padding-bottom: 45px;
}

.page {
    animation: pageFade 0.35s ease both;
}

.page[hidden] {
    display: none !important;
}

@keyframes pageFade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 6vw, 65px);
    margin-bottom: 25px;
    text-align: center;
    background:
        linear-gradient(
            135deg,
            rgba(35, 55, 90, 0.96),
            rgba(17, 27, 48, 0.96)
        );
    border: 1px solid var(--border);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.hero::before {
    content: "";
    position: absolute;
    width: 240px;
    height: 240px;
    right: -90px;
    top: -120px;
    border-radius: 50%;
    background: rgba(244, 185, 66, 0.09);
    pointer-events: none;
}

.hero h1 {
    position: relative;
    margin: 0 0 16px;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.15;
    font-weight: 900;
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    position: relative;
    max-width: 760px;
    margin: 0 auto 20px;
    color: var(--muted);
    font-size: clamp(1rem, 2.3vw, 1.15rem);
}

.maintenance-note {
    position: relative;
    max-width: 800px;
    margin: 25px auto 0;
    padding: 20px;
    background: rgba(244, 185, 66, 0.08);
    border: 1px solid rgba(244, 185, 66, 0.38);
    border-radius: 16px;
}

.maintenance-note p {
    margin: 0 0 12px;
    color: var(--text);
}

.maintenance-note p:last-child {
    margin-bottom: 16px;
}

.maintenance-note strong {
    color: var(--primary-hover);
}

/* =========================================
   GOMBOK
   ========================================= */

.btn,
button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 19px;
    color: #1a2030;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 12px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.btn:hover,
button.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(244, 185, 66, 0.2);
}

.btn:active,
button.btn:active {
    transform: translateY(0);
}

.btn-red,
button.btn-red {
    color: #fff;
    background: #e53945;
    border-color: #e53945;
}

.btn-red:hover,
button.btn-red:hover {
    color: #fff;
    background: #ff4d5a;
}

.btn-secondary,
button.btn-secondary {
    color: var(--text);
    background: var(--panel-light);
    border-color: var(--border);
}

.btn-secondary:hover,
button.btn-secondary:hover {
    color: var(--primary-hover);
    background: #354562;
}

.btn-success,
button.btn-success {
    color: #09271c;
    background: var(--success);
    border-color: var(--success);
}

.btn-danger,
button.btn-danger {
    color: #fff;
    background: #d92d43;
    border-color: #d92d43;
}

button:disabled,
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
    box-shadow: none;
}

/* =========================================
   FŐOLDALI KÁRTYÁK
   ========================================= */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.feature-card,
.panel,
.content-card {
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.feature-card {
    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    border-color: rgba(244, 185, 66, 0.45);
}

.feature-card h2,
.panel h2,
.content-card h2 {
    margin-top: 0;
    color: var(--primary-hover);
}

.feature-card p,
.panel p,
.content-card p {
    color: var(--muted);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 12px;
    border-radius: 15px;
    background: rgba(244, 185, 66, 0.12);
    font-size: 1.8rem;
}

/* =========================================
   OSZTÁLYOLDALAK
   ========================================= */

.grade-heading {
    margin: 0 0 8px;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1.2;
}

.grade-description {
    margin: 0 0 24px;
    color: var(--muted);
}

.subject-shell {
    margin-top: 22px;
}

.subject-shell h2 {
    margin-top: 0;
    color: var(--primary-hover);
}

.subject-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 24px;
}

.subject-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    padding: 10px 15px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-weight: 700;
    text-align: center;
    transition: all 0.2s ease;
}

.subject-tab:hover {
    border-color: var(--primary);
    background: rgba(244, 185, 66, 0.1);
}

.subject-tab.active {
    color: #182033;
    background: var(--primary);
    border-color: var(--primary);
}

.subject-tab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quiz-area {
    min-height: 120px;
    margin-top: 20px;
}

.empty-state {
    padding: 25px;
    color: var(--muted);
    text-align: center;
    background: rgba(255, 255, 255, 0.035);
    border: 1px dashed var(--border);
    border-radius: 15px;
}

/* =========================================
   FELADATKÁRTYÁK ÉS VÁLASZOK
   ========================================= */

.question-card {
    position: relative;
    overflow: hidden;
    padding: clamp(20px, 4vw, 32px);
    background:
        linear-gradient(
            145deg,
            rgba(35, 49, 77, 0.98),
            rgba(18, 27, 47, 0.98)
        );
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.question-card h3 {
    margin: 0 0 18px;
    font-size: clamp(1.2rem, 3vw, 1.65rem);
    line-height: 1.4;
}

.question-text {
    margin: 0 0 22px;
    font-size: clamp(1.2rem, 3.5vw, 1.9rem);
    font-weight: 800;
    text-align: center;
}

.question-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.95rem;
}

.answer-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.quiz-answer,
.answer-option {
    min-height: 58px;
    padding: 14px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.055);
    border: 2px solid var(--border);
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 800;
    overflow-wrap: anywhere;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.quiz-answer:hover,
.answer-option:hover {
    background: rgba(244, 185, 66, 0.12);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.quiz-answer.correct,
.answer-option.correct {
    color: #062b1c;
    background: var(--success);
    border-color: var(--success);
}

.quiz-answer.wrong,
.answer-option.wrong {
    color: #fff;
    background: #d92d43;
    border-color: #ff6577;
}

.quiz-answer:disabled,
.answer-option:disabled {
    cursor: default;
    transform: none;
}

.feedback-result {
    min-height: 38px;
    margin: 16px 0;
    font-size: 1.05rem;
    font-weight: 800;
    text-align: center;
}

.feedback-result.correct {
    color: var(--success);
}

.feedback-result.wrong {
    color: #ff8997;
}

.feedback-result.neutral {
    color: var(--primary-hover);
}

.quiz-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.score-display {
    padding: 14px 18px;
    margin: 15px 0;
    color: var(--primary-hover);
    background: rgba(244, 185, 66, 0.09);
    border: 1px solid rgba(244, 185, 66, 0.25);
    border-radius: 12px;
    font-weight: 800;
    text-align: center;
}

/* =========================================
   SZORZÓTÁBLA ÉS IDŐMÉRŐ
   ========================================= */

.multiplier-setup {
    display: grid;
    gap: 18px;
    margin-bottom: 22px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.multiplier-setup label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 700;
}

.multiplier-setup select,
.form-field input,
.form-field textarea,
.form-field select,
.admin-login input {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    color: var(--text);
    background: #101a2e;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.multiplier-setup select option,
.form-field select option {
    color: var(--text);
    background: #101a2e;
}

.timer {
    position: relative;
    width: 100%;
    height: 10px;
    overflow: hidden;
    margin: 15px 0;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 20px;
}

.timer-bar {
    width: 100%;
    height: 100%;
    background: var(--success);
    border-radius: inherit;
    transition: width 0.1s linear;
}

.timer-bar.warning {
    background: var(--primary);
}

.timer-bar.danger {
    background: var(--danger);
}

.timer-label {
    color: var(--primary-hover);
    font-size: 1rem;
    font-weight: 800;
    text-align: center;
}

.final-score {
    padding: 25px;
    margin-top: 20px;
    text-align: center;
    background: rgba(56, 217, 150, 0.08);
    border: 1px solid rgba(56, 217, 150, 0.35);
    border-radius: 18px;
}

.final-score h2 {
    margin-top: 0;
    color: var(--success);
    font-size: clamp(1.6rem, 5vw, 2.6rem);
}

.final-score .big-score {
    display: block;
    margin: 12px 0;
    color: var(--primary-hover);
    font-size: clamp(2.8rem, 10vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
}

/* =========================================
   ÖRÖM- ÉS HIBAJELZÉSEK
   ========================================= */

.reaction-face {
    margin: 12px 0;
    font-size: clamp(2.5rem, 8vw, 4rem);
    text-align: center;
    animation: facePop 0.35s ease;
}

@keyframes facePop {
    0% {
        opacity: 0;
        transform: scale(0.4);
    }

    70% {
        transform: scale(1.15);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.celebration {
    position: relative;
    overflow: hidden;
    padding: 25px;
    margin-top: 20px;
    text-align: center;
    background: linear-gradient(
        135deg,
        rgba(244, 185, 66, 0.17),
        rgba(56, 217, 150, 0.13)
    );
    border: 1px solid rgba(244, 185, 66, 0.5);
    border-radius: 20px;
    animation: celebrateGlow 1.5s ease-in-out infinite alternate;
}

.celebration h2 {
    color: var(--primary-hover);
    font-size: clamp(1.7rem, 5vw, 3rem);
}

.celebration p {
    font-size: 1.1rem;
}

@keyframes celebrateGlow {
    from {
        box-shadow: 0 0 8px rgba(244, 185, 66, 0.1);
    }

    to {
        box-shadow: 0 0 28px rgba(244, 185, 66, 0.35);
    }
}

.confetti-layer {
    position: fixed;
    z-index: 2000;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.confetti-piece {
    position: absolute;
    top: -20px;
    width: 9px;
    height: 15px;
    opacity: 0.95;
    animation: confettiFall 2.8s linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-10vh) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(115vh) rotate(900deg);
        opacity: 0;
    }
}

/* =========================================
   ÉSZREVÉTELI ŰRLAP – MODÁLIS ABLAK
   ========================================= */

.modal-backdrop {
    position: fixed;
    z-index: 3000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal-backdrop[hidden] {
    display: none !important;
}

.feedback-modal {
    position: relative;
    width: min(620px, 100%);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    padding: clamp(20px, 5vw, 32px);
    background: #111b30;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.55);
    animation: modalIn 0.25s ease both;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.feedback-modal h2 {
    margin: 0 40px 8px 0;
    color: var(--primary-hover);
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.feedback-modal > p {
    margin-top: 0;
    color: var(--muted);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 1.4rem;
}

.modal-close:hover {
    color: #fff;
    background: #d92d43;
}

.feedback-form {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.form-field {
    display: grid;
    gap: 6px;
}

.form-field label {
    color: var(--text);
    font-weight: 700;
}

.form-field textarea {
    min-height: 130px;
    resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder,
.admin-login input::placeholder {
    color: #8997b0;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus,
.admin-login input:focus {
    border-color: var(--primary);
}

.captcha-box {
    padding: 14px;
    background: rgba(244, 185, 66, 0.08);
    border: 1px solid rgba(244, 185, 66, 0.28);
    border-radius: 12px;
}

.captcha-box label {
    display: block;
    margin-bottom: 8px;
    font-weight: 800;
}

.captcha-box input {
    max-width: 180px;
}

.form-notice {
    padding: 13px 15px;
    margin: 15px 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-weight: 700;
}

.form-notice.success {
    color: #b8ffdc;
    background: rgba(56, 217, 150, 0.1);
    border-color: rgba(56, 217, 150, 0.35);
}

.form-notice.error {
    color: #ffd0d5;
    background: rgba(255, 101, 119, 0.1);
    border-color: rgba(255, 101, 119, 0.35);
}

.form-notice[hidden] {
    display: none !important;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

/* =========================================
   ADMINISZTRÁCIÓ
   ========================================= */

.admin-container {
    width: min(1000px, calc(100% - 32px));
    margin: 30px auto;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}

.admin-header h1 {
    margin: 0;
    color: var(--primary-hover);
}

.admin-login {
    width: min(440px, calc(100% - 32px));
    margin: 50px auto;
    padding: clamp(22px, 5vw, 34px);
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.admin-login h1 {
    margin-top: 0;
    color: var(--primary-hover);
}

.admin-login form {
    display: grid;
    gap: 16px;
}

.message-list {
    display: grid;
    gap: 18px;
}

.message-card {
    padding: 20px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-left: 5px solid var(--primary);
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow-wrap: anywhere;
}

.message-card h2 {
    margin: 0 0 12px;
    color: var(--primary-hover);
    font-size: 1.2rem;
}

.message-meta {
    display: grid;
    gap: 5px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 0.95rem;
}

.message-body {
    padding: 14px;
    margin: 12px 0 16px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.message-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.message-actions form {
    margin: 0;
}

.message-count {
    color: var(--muted);
}

/* =========================================
   LÁBLÉC
   ========================================= */

.site-footer {
    padding: 25px 18px;
    color: var(--muted);
    text-align: center;
    background: rgba(5, 9, 19, 0.7);
    border-top: 1px solid var(--border);
}

.site-footer p {
    margin: 7px 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin: 12px 0;
}

/* =========================================
   SEGÉDOSZTÁLYOK
   ========================================= */

.text-center {
    text-align: center;
}

.muted {
    color: var(--muted);
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

[hidden] {
    display: none !important;
}

/* =========================================
   TABLET
   ========================================= */

@media (max-width: 1050px) {
    :root {
        --header-height: 72px;
    }

    .site-header {
        padding: 8px 12px;
    }

    .header-inner {
        gap: 10px;
    }

    .main-nav {
        gap: 3px;
    }

    .main-nav button,
    .nav-button {
        padding: 8px 9px;
        font-size: 0.82rem;
    }

    .logo,
    .site-logo {
        font-size: 1rem;
    }
}

/* =========================================
   MOBIL
   ========================================= */

@media (max-width: 760px) {
    :root {
        --header-height: 64px;
    }

    body {
        font-size: 15px;
    }

    .site-header {
        min-height: var(--header-height);
        padding: 8px 12px;
    }

    .header-inner {
        position: relative;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
    }

    .main-nav {
        position: absolute;
        top: calc(100% + 12px);
        left: -12px;
        right: -12px;
        display: none;
        align-items: stretch;
        justify-content: flex-start;
        max-height: calc(100vh - var(--header-height) - 20px);
        overflow-y: auto;
        padding: 12px;
        background: rgba(8, 13, 27, 0.99);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 16px 25px rgba(0, 0, 0, 0.35);
    }

    .main-nav.open {
        display: flex;
        flex-direction: column;
    }

    .main-nav button,
    .nav-button {
        width: 100%;
        min-height: 44px;
        padding: 10px 13px;
        text-align: left;
        font-size: 0.95rem;
    }

    .container,
    .page-container {
        width: calc(100% - 24px);
    }

    main {
        padding-top: 18px;
        padding-bottom: 30px;
    }

    .hero {
        padding: 28px 18px;
        border-radius: 20px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .feature-card,
    .panel,
    .content-card {
        padding: 19px;
    }

    .subject-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .subject-tab {
        min-height: 44px;
        padding: 9px 8px;
        font-size: 0.9rem;
    }

    .answer-options {
        grid-template-columns: 1fr;
    }

    .quiz-answer,
    .answer-option {
        min-height: 52px;
    }

    .question-card {
        padding: 18px;
    }

    .form-actions,
    .quiz-controls {
        flex-direction: column;
    }

    .form-actions .btn,
    .quiz-controls .btn {
        width: 100%;
    }

    .admin-header {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-header .btn {
        width: 100%;
    }

    .message-card {
        padding: 15px;
    }

    .message-actions {
        flex-direction: column;
    }

    .message-actions .btn {
        width: 100%;
    }
}

/* =========================================
   KISEBB MOBIL
   ========================================= */

@media (max-width: 380px) {
    .container,
    .page-container {
        width: calc(100% - 18px);
    }

    .hero {
        padding: 23px 13px;
    }

    .subject-tabs {
        grid-template-columns: 1fr;
    }

    .maintenance-note {
        padding: 15px;
    }

    .feedback-modal {
        padding: 19px 15px;
    }
}

/* =========================================
   MOZGÁSCSÖKKENTÉS
   ========================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* =========================================
   TANULÓSAROK – JAVÍTÁS A JELENLEGI HTML-HEZ
   A style.css LEGALJÁRA illeszd be!
   ========================================= */

:root {
    --header-height: 76px;
}

/* Az oldal ne tapadjon a képernyő széléhez */
html {
    scroll-padding-top: 95px;
}

body {
    padding-top: var(--header-height);
    overflow-wrap: anywhere;
}

/* Fix fejléc */
.site-header {
    min-height: var(--header-height);
    height: auto;
    padding: 10px 22px;
    justify-content: space-between;
    gap: 18px;
}

/* Logó */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
    color: var(--text);
    font-size: 1.12rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.brand:hover {
    text-decoration: none;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #172033;
    background: var(--primary);
    border-radius: 12px;
    font-size: 1.3rem;
}

.brand-accent {
    color: var(--primary);
}

/* Menüpontok */
.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    flex-wrap: wrap;
    gap: 5px;
}

.main-nav .nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 10px;
    color: var(--text);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 0.83rem;
    font-weight: 700;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.main-nav .nav-link span {
    color: var(--primary);
    font-weight: 900;
}

.main-nav .nav-link:hover {
    color: var(--primary-hover);
    background: rgba(255, 255, 255, 0.07);
    text-decoration: none;
}

.main-nav .nav-link.active {
    color: #172033;
    background: var(--primary);
    border-color: var(--primary);
}

.main-nav .nav-link.active span {
    color: #172033;
}

/* Mobil menü gomb */
.menu-toggle {
    display: none;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 10px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    color: var(--text);
    background: var(--panel-light);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 3px;
}

/* Fő tartalom: valódi oldalsó margók */
.main-content {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 30px 0 45px;
}

.main-content > .page {
    width: 100%;
    min-width: 0;
}

.glass {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Főoldali nyitókártya */
.hero-card {
    position: relative;
    overflow: hidden;
    padding: clamp(26px, 5vw, 58px);
    margin-bottom: 24px;
    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(244, 185, 66, 0.12),
            transparent 30%
        ),
        linear-gradient(135deg, #233756, #111b30);
}

.hero-card h1 {
    position: relative;
    z-index: 1;
    margin: 18px 0;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.16;
    font-weight: 900;
}

.gradient-text {
    color: var(--primary-hover);
    background: linear-gradient(90deg, #ffd166, #f4b942);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--primary-hover);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1.3px;
}

.pulse-dot {
    width: 9px;
    height: 9px;
    flex-shrink: 0;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(56, 217, 150, 0.6);
}

.hero-copy {
    max-width: 680px;
    color: var(--muted);
    font-size: 1.08rem;
}

.maintenance-note {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-top: 26px;
}

.maintenance-note > span {
    color: var(--muted);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 19px;
    color: #172033;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 11px;
    font-weight: 800;
    text-align: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.button-primary {
    color: #172033;
    background: var(--primary);
}

.hero-orbit {
    position: absolute;
    top: 28px;
    right: 35px;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0.65;
}

.orbit-ring {
    position: absolute;
    inset: 5px;
    border: 1px solid rgba(244, 185, 66, 0.55);
    border-radius: 50%;
}

.orbit-core {
    color: var(--primary);
    font-size: 3rem;
}

.orbit-star {
    position: absolute;
    top: 0;
    right: 0;
    color: var(--primary-hover);
    font-size: 1.5rem;
}

/* Főoldali információs kártyák */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.feature-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    min-width: 0;
    padding: 24px;
}

.feature-icon {
    flex-shrink: 0;
    width: 58px;
    height: 58px;
    margin: 0;
    color: var(--primary-hover);
    font-size: 1.25rem;
    font-weight: 900;
}

.feature-icon.purple,
.section-icon.purple {
    background: rgba(155, 111, 255, 0.16);
    color: #c8adff;
}

.feature-icon.cyan,
.section-icon.cyan {
    background: rgba(56, 189, 248, 0.13);
    color: #7dd3fc;
}

.feature-card h2 {
    margin: 0 0 8px;
    font-size: 1.15rem;
}

.feature-card p {
    margin: 0 0 12px;
}

.text-link {
    padding: 0;
    color: var(--primary-hover);
    background: transparent;
    border: 0;
    font-weight: 800;
    text-align: left;
}

/* Osztályoldalak */
.section-heading {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
}

.section-heading h1 {
    margin: 5px 0;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1.2;
}

.section-heading p {
    margin: 5px 0 0;
    color: var(--muted);
}

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 68px;
    height: 68px;
    color: var(--primary-hover);
    background: rgba(244, 185, 66, 0.12);
    border-radius: 18px;
    font-size: 1.8rem;
    font-weight: 900;
}

.subject-shell {
    padding: clamp(16px, 3vw, 28px);
}

.subject-tabs {
    margin-top: 0;
}

.quiz-area {
    overflow-wrap: anywhere;
}

/* Lábléc és gombok */
.site-footer {
    padding: 24px 20px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(1120px, 100%);
    margin: 0 auto;
    text-align: left;
}

.footer-note {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-star {
    color: var(--primary);
    font-size: 1.8rem;
}

.footer-note strong,
.footer-note small {
    display: block;
}

.footer-note strong {
    color: var(--text);
}

.footer-note small {
    color: var(--muted);
}

.footer-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 9px;
}

.footer-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 39px;
    padding: 8px 12px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 9px;
    font-size: 0.85rem;
    font-weight: 700;
}

.footer-button:hover {
    color: var(--primary-hover);
    background: rgba(255, 255, 255, 0.09);
    text-decoration: none;
}

.footer-button.work-button {
    color: #172033;
    background: var(--primary);
    border-color: var(--primary);
}

/* Űrlap: a jelenlegi HTML címkéihez */
.feedback-form > label {
    display: grid;
    gap: 7px;
    color: var(--text);
    font-weight: 700;
}

.feedback-form input,
.feedback-form textarea {
    width: 100%;
    min-width: 0;
    padding: 12px;
    color: var(--text);
    background: #101a2e;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.feedback-form textarea {
    resize: vertical;
}

.feedback-form .captcha-label {
    padding: 13px;
    background: rgba(244, 185, 66, 0.07);
    border: 1px solid rgba(244, 185, 66, 0.25);
    border-radius: 12px;
}

.feedback-form .button {
    justify-self: start;
}

/* TABLET */
@media (max-width: 1050px) {
    :root {
        --header-height: 76px;
    }

    .site-header {
        padding: 9px 14px;
        gap: 10px;
    }

    .brand {
        font-size: 0.98rem;
    }

    .main-nav {
        gap: 2px;
    }

    .main-nav .nav-link {
        padding: 7px;
        font-size: 0.76rem;
    }

    .main-content {
        width: calc(100% - 32px);
    }
}

/* MOBIL: a HTML-ben valóban létező gombot használjuk */
@media (max-width: 760px) {
    :root {
        --header-height: 64px;
    }

    body {
        font-size: 15px;
    }

    .site-header {
        min-height: var(--header-height);
        padding: 8px 14px;
    }

    .brand {
        font-size: 1rem;
    }

    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 5px;
        max-height: calc(100dvh - var(--header-height));
        overflow-y: auto;
        padding: 12px 14px 18px;
        background: #0b1020;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 16px 28px rgba(0, 0, 0, 0.4);
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav .nav-link {
        display: flex;
        justify-content: flex-start;
        width: 100%;
        min-height: 43px;
        padding: 10px 13px;
        font-size: 0.95rem;
    }

    .main-content {
        width: calc(100% - 28px);
        padding-top: 20px;
        padding-bottom: 30px;
    }

    .hero-card {
        padding: 26px 19px;
    }

    .hero-card h1 {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }

    .hero-orbit {
        top: 8px;
        right: 8px;
        transform: scale(0.65);
        transform-origin: top right;
        opacity: 0.35;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .feature-card {
        padding: 18px;
    }

    .section-heading {
        align-items: flex-start;
        gap: 12px;
    }

    .section-icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
        font-size: 1.4rem;
    }

    .footer-inner {
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
    }

    .footer-actions {
        justify-content: flex-start;
    }

    .footer-button {
        flex: 1 1 auto;
    }
}

/* KISEBB MOBIL */
@media (max-width: 380px) {
    .main-content {
        width: calc(100% - 22px);
    }

    .brand {
        font-size: 0.9rem;
    }

    .brand-mark {
        width: 33px;
        height: 33px;
    }

    .hero-card {
        padding: 22px 14px;
    }

    .maintenance-note {
        padding: 14px;
    }

    .feature-card {
        gap: 12px;
        padding: 15px;
    }

    .footer-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .footer-button {
        width: 100%;
    }
}

/* =========================================
   MENÜ JAVÍTÁS – MINDEN KÉPERNYŐMÉRETEN
   A style.css legvégére illeszd be!
   ========================================= */

/* A fejlécben a menügomb és a logó maradjon egy sorban */
.site-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

/* MENÜ gomb: minden képernyőméreten látható */
.menu-toggle {
    display: inline-flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    min-width: 86px;
    min-height: 42px;
    height: 42px;
    padding: 0 12px;
    color: var(--text);
    background: var(--panel-light);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 800;
    white-space: nowrap;
}

/* A három vonal megmarad, a MENÜ felirat CSS-ből jelenik meg */
.menu-toggle::after {
    content: "MENÜ";
    display: inline-block;
}

/* A három hamburger-vonal egymás alatt marad */
.menu-toggle span {
    display: block;
    flex: 0 0 22px;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 3px;
}

/* A menü alaphelyzetben minden képernyőn csukva van */
.site-header .main-nav {
    display: none !important;
}

/* Csak kattintás után nyílik ki */
.site-header .main-nav.open {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 5px;

    position: absolute;
    top: 100%;
    right: 12px;
    left: auto;

    width: min(320px, calc(100vw - 24px));
    max-height: calc(100vh - var(--header-height) - 16px);
    overflow-y: auto;

    padding: 12px;
    background: #0b1020;
    border: 1px solid var(--border);
    border-radius: 0 0 14px 14px;
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.4);
}

/* A menüpontok teljes szélességűek a lenyíló panelben */
.site-header .main-nav.open .nav-link {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    font-size: 0.95rem;
    white-space: normal;
}

/* Keskeny mobilon se lógjon ki a menü */
@media (max-width: 420px) {
    .site-header {
        padding-right: 10px;
        padding-left: 10px;
    }

    .menu-toggle {
        min-width: 80px;
        padding: 0 9px;
    }

    .site-header .main-nav.open {
        right: 0;
        width: min(300px, calc(100vw - 20px));
    }
}


