/* ===== DARK MODERN THEME ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.85);
    --bg-card-solid: #1e293b;
    --bg-input: #0f172a;
    --border: rgba(148, 163, 184, 0.15);
    --border-focus: #14b8a6;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #14b8a6;
    --accent-hover: #0d9488;
    --accent2: #f97316;
    --accent3: #a78bfa;
    --accent4: #fb7185;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --glow: 0 0 20px rgba(20, 184, 166, 0.3);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.5);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* ===== HEADER ===== */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    position: relative;
    backdrop-filter: blur(12px);
}
.header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--accent), var(--accent3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.header p {
    font-size: .82rem;
    color: var(--text-secondary);
    margin-top: 2px;
    font-weight: 400;
}
.header-left { flex: 1; text-align: left; }
.header-center { flex: 2; text-align: center; }
.header-right { flex: 1; text-align: right; }
.header-logo { height: 50px; max-width: 120px; object-fit: contain; filter: brightness(1.1); }
.header-text { text-align: center; }
.header-actions {
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== NAV BAR ===== */
.nav-bar {
    background: var(--bg-secondary);
    padding: 8px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-home {
    color: var(--accent);
    text-decoration: none;
    font-size: .84rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: .2s;
}
.nav-home:hover { color: var(--accent-hover); text-decoration: none; opacity: .8; }

/* ===== BUTTONS ===== */
.btn-logout {
    background: transparent;
    color: var(--accent4);
    border: 1px solid var(--accent4);
    padding: 5px 14px;
    border-radius: var(--radius-sm);
    font-size: .76rem;
    cursor: pointer;
    font-weight: 500;
    transition: .2s;
    font-family: inherit;
}
.btn-logout:hover { background: var(--accent4); color: var(--bg-primary); }

.btn-generate {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
    border: none;
    padding: 8px 22px;
    border-radius: 24px;
    font-size: .82rem;
    cursor: pointer;
    font-weight: 600;
    transition: .25s;
    font-family: inherit;
    letter-spacing: .01em;
}
.btn-generate:hover { box-shadow: var(--glow); transform: translateY(-1px); }

.btn-recalc {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent) !important;
    padding: 8px 22px;
    border-radius: 24px;
    font-size: .82rem;
    cursor: pointer;
    font-weight: 600;
    transition: .25s;
    font-family: inherit;
}
.btn-recalc:hover { background: var(--accent); color: var(--bg-primary); }

.btn-cross {
    background: transparent;
    color: var(--accent2);
    border: 1px solid var(--accent2) !important;
    padding: 8px 22px;
    border-radius: 24px;
    font-size: .82rem;
    cursor: pointer;
    font-weight: 600;
    transition: .25s;
    font-family: inherit;
}
.btn-cross:hover { background: var(--accent2); color: var(--bg-primary); }

/* ===== TABS ===== */
.tabs {
    display: flex;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.tabs button, .tab-btn {
    padding: 12px 28px;
    border: none;
    background: none;
    font-size: .9rem;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: .2s;
    font-family: inherit;
    white-space: nowrap;
}
.tabs button.active, .tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}
.tabs button:hover, .tab-btn:hover {
    color: var(--accent);
    background: rgba(20, 184, 166, 0.05);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    text-decoration: none;
    color: var(--text-primary);
    transition: .3s;
    cursor: pointer;
    padding: 30px;
    text-align: center;
    backdrop-filter: blur(12px);
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}
.card-icon { font-size: 3.5rem; margin-bottom: 16px; }
.card-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.card-desc { font-size: .82rem; color: var(--text-secondary); line-height: 1.5; }
.card-stats { border-top: 3px solid var(--accent); }
.card-finance { border-top: 3px solid var(--accent2); }

/* ===== EXPLORER ===== */
.explorer { display: flex; flex-wrap: wrap; gap: 16px; padding: 16px; }
.data-section {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(12px);
}
.data-section h3 { font-size: .88rem; color: var(--accent); margin-bottom: 10px; font-weight: 600; }
.data-section textarea {
    width: 100%;
    height: 65px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-size: .85rem;
    resize: vertical;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: var(--text-primary);
    transition: .2s;
}
.data-section textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.15); }
.data-actions { display: flex; gap: 8px; margin-top: 12px; align-items: center; flex-wrap: wrap; }
.data-actions span { font-size: .76rem; color: var(--text-muted); }

/* ===== PRESET GROUPS ===== */
.preset-groups { display: flex; gap: 6px; margin-top: 12px; flex-wrap: nowrap; }
.preset-group {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    flex: 1;
    min-width: 0;
}
.preset-group-title {
    font-size: .65rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
    margin-bottom: 4px;
    letter-spacing: .4px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.preset-group label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .73rem;
    padding: 2px 0;
    cursor: pointer;
    color: var(--text-secondary);
    white-space: nowrap;
}
.preset-group label:hover { color: var(--accent); }
.preset-group input[type="radio"] { accent-color: var(--accent); cursor: pointer; width: 12px; height: 12px; margin: 0; }

/* ===== STAT GROUPS ===== */
.left-panel { width: 35%; min-width: 300px; flex-shrink: 0; }
.right-panel { flex: 1; min-width: 400px; display: flex; flex-direction: column; gap: 14px; }

.stat-group {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    margin-bottom: 12px;
    overflow: hidden;
}
.stat-group-header {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: .86rem;
    user-select: none;
    transition: .2s;
}
.stat-group-header .arrow { transition: transform .3s; font-size: .7rem; }
.stat-group-header.open .arrow { transform: rotate(180deg); }

.sg-position .stat-group-header, .sg-basic .stat-group-header { background: rgba(20, 184, 166, 0.1); color: var(--accent); border-bottom: 1px solid rgba(20, 184, 166, 0.15); }
.sg-dispersion .stat-group-header, .sg-regression .stat-group-header { background: rgba(249, 115, 22, 0.1); color: var(--accent2); border-bottom: 1px solid rgba(249, 115, 22, 0.15); }
.sg-shape .stat-group-header, .sg-goodness .stat-group-header { background: rgba(34, 197, 94, 0.1); color: var(--success); border-bottom: 1px solid rgba(34, 197, 94, 0.15); }
.sg-concentration .stat-group-header, .sg-variance .stat-group-header { background: rgba(251, 113, 133, 0.1); color: var(--accent4); border-bottom: 1px solid rgba(251, 113, 133, 0.15); }
.sg-info .stat-group-header { background: rgba(148, 163, 184, 0.08); color: var(--text-secondary); border-bottom: 1px solid var(--border); }
.sg-chi .stat-group-header { background: rgba(167, 139, 250, 0.1); color: var(--accent3); border-bottom: 1px solid rgba(167, 139, 250, 0.15); }

.stat-group-body { padding: 12px 16px; display: none; }
.stat-group-body.open { display: block; }
.stat-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: .84rem; }
.stat-row:last-child { border-bottom: none; }
.stat-label { font-weight: 500; color: var(--text-secondary); }
.stat-value { font-weight: 600; color: var(--text-primary); min-width: 80px; text-align: right; font-variant-numeric: tabular-nums; }
.stat-interpret { font-size: .75rem; color: var(--text-muted); margin-left: 6px; font-style: italic; }

.percentile-input { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.percentile-input input {
    width: 55px; padding: 4px 8px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: 4px; text-align: center; font-size: .84rem;
    color: var(--text-primary); font-family: inherit;
}
.percentile-input input:focus { border-color: var(--accent); outline: none; }
.percentile-input .result { font-weight: 600; color: var(--accent); }

/* ===== CHART CARDS ===== */
.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 18px;
}
.chart-card h3 { font-size: .88rem; color: var(--text-primary); margin-bottom: 12px; font-weight: 600; }
canvas { max-width: 100%; }

.marker-toggles { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.marker-toggle { display: flex; align-items: center; gap: 4px; font-size: .76rem; cursor: pointer; color: var(--text-secondary); }
.marker-toggle input { cursor: pointer; accent-color: var(--accent); }
.marker-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* ===== QUIZ ===== */
.quiz-container { max-width: 850px; margin: 20px auto; padding: 16px; }
.quiz-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 28px;
    margin-bottom: 16px;
}
.quiz-card h2 { font-size: 1.1rem; color: var(--text-primary); margin-bottom: 16px; font-weight: 700; }
.quiz-progress { background: var(--bg-input); border-radius: 10px; height: 6px; margin-bottom: 20px; overflow: hidden; }
.quiz-progress-bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent3)); border-radius: 10px; transition: width .4s; }
.quiz-question { font-size: .95rem; font-weight: 500; margin: 16px 0; color: var(--text-primary); line-height: 1.6; white-space: pre-line; }
.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.quiz-option {
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: .88rem;
    transition: .2s;
    text-align: center;
    color: var(--text-primary);
    background: var(--bg-input);
    line-height: 1.4;
}
.quiz-option:hover { border-color: var(--accent); background: rgba(20, 184, 166, 0.08); }
.quiz-option.selected { border-color: var(--accent); background: rgba(20, 184, 166, 0.12); }
.quiz-option.correct { border-color: var(--success); background: rgba(34, 197, 94, 0.12); color: var(--success); }
.quiz-option.wrong { border-color: var(--danger); background: rgba(239, 68, 68, 0.12); color: var(--danger); }
.quiz-option.disabled { pointer-events: none; opacity: .6; }

.quiz-btn {
    padding: 10px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    cursor: pointer;
    font-weight: 600;
    transition: .2s;
    font-family: inherit;
}
.quiz-btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
}
.quiz-btn-primary:hover { box-shadow: var(--glow); transform: translateY(-1px); }
.quiz-btn-primary:disabled { background: var(--text-muted); cursor: default; transform: none; box-shadow: none; }

.quiz-feedback { padding: 14px 18px; border-radius: var(--radius-sm); margin: 12px 0; font-size: .86rem; display: none; line-height: 1.6; }
.quiz-feedback.correct { background: rgba(34, 197, 94, 0.12); color: var(--success); display: block; border: 1px solid rgba(34, 197, 94, 0.2); }
.quiz-feedback.wrong { background: rgba(239, 68, 68, 0.12); color: #fca5a5; display: block; border: 1px solid rgba(239, 68, 68, 0.2); }

.quiz-result { text-align: center; padding: 30px; }
.quiz-score { font-size: 3rem; font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--accent3)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.quiz-score-label { font-size: 1rem; color: var(--text-secondary); margin-top: 6px; }
.quiz-detail { text-align: left; margin-top: 20px; }
.quiz-detail-row { display: flex; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--border); font-size: .84rem; gap: 12px; }
.quiz-detail-row.ok { color: var(--success); }
.quiz-detail-row.fail { color: #fca5a5; }

/* ===== THEME CARDS (estadistica.html) ===== */
.main { max-width: 1100px; margin: 30px auto; padding: 0 20px; }
.section-title { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 20px; padding-left: 4px; }
.themes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.theme-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: .25s;
    display: flex;
    flex-direction: column;
}
.theme-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: rgba(20, 184, 166, 0.3); }
.theme-card-header { padding: 18px 20px; display: flex; align-items: center; gap: 14px; cursor: pointer; user-select: none; }
.theme-card-header .chevron { margin-left: auto; font-size: .8rem; transition: transform .3s; color: rgba(255,255,255,.7); }
.theme-card-header.open .chevron { transform: rotate(180deg); }
.theme-card-body { display: none; }
.theme-card-body.open { display: flex; }
.theme-num {
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; font-weight: 800; flex-shrink: 0;
    color: #fff;
}
.theme-title { font-size: .9rem; font-weight: 600; line-height: 1.35; color: #fff; }
.theme-card:nth-child(1) .theme-card-header { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.theme-card:nth-child(2) .theme-card-header { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.theme-card:nth-child(3) .theme-card-header { background: linear-gradient(135deg, #f97316, #ea580c); }
.theme-card:nth-child(4) .theme-card-header { background: linear-gradient(135deg, #fb7185, #e11d48); }
.theme-card:nth-child(5) .theme-card-header { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.theme-card-body { padding: 16px 20px; flex: 1; flex-direction: column; }
.file-list { list-style: none; flex: 1; }
.file-list li { padding: 8px 0; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.file-list li:last-child { border-bottom: none; }
.file-list a { color: var(--accent); text-decoration: none; font-size: .86rem; font-weight: 500; transition: .2s; }
.file-list a:hover { color: var(--accent-hover); }
.file-icon { font-size: .75rem; width: 20px; text-align: center; flex-shrink: 0; }
.file-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; margin-left: auto; flex-shrink: 0; }
.badge-interactivo { background: rgba(20, 184, 166, 0.15); color: var(--accent); }
.badge-caso { background: rgba(249, 115, 22, 0.15); color: var(--accent2); }
.badge-pdf { background: rgba(251, 113, 133, 0.15); color: var(--accent4); }
.badge-video { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.badge-ejercicio { background: rgba(167, 139, 250, 0.15); color: var(--accent3); }
.badge-teoria { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.empty-msg { color: var(--text-muted); font-size: .85rem; font-style: italic; padding: 10px 0; }

/* ===== LOGIN ===== */
.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hover);
    padding: 48px 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    backdrop-filter: blur(16px);
}
.login-logo { width: 90px; height: auto; margin-bottom: 20px; filter: brightness(1.1); }
.login-title { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.login-subtitle { font-size: .85rem; color: var(--text-secondary); margin-bottom: 28px; }
.form-group { margin-bottom: 16px; text-align: left; }
.form-group label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 5px; }
.form-group input {
    width: 100%; padding: 12px 16px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: .92rem;
    color: var(--text-primary); transition: .2s; outline: none;
    font-family: inherit;
}
.form-group input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12); }
.btn-login {
    width: 100%; padding: 13px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff; border: none; border-radius: var(--radius-sm);
    font-size: 1rem; font-weight: 600; cursor: pointer;
    transition: .25s; margin-top: 8px; font-family: inherit;
}
.btn-login:hover { box-shadow: var(--glow); transform: translateY(-1px); }
.error-msg { color: var(--danger); font-size: .82rem; margin-top: 12px; display: none; }
.flags { position: fixed; top: 16px; right: 20px; display: flex; gap: 6px; z-index: 100; }

/* ===== LANGUAGE FLAG BUTTONS ===== */
.lang-flag {
    border: 1px solid var(--text-muted);
    background: transparent;
    color: var(--text-secondary);
    font-size: .78rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    transition: .2s;
    letter-spacing: .3px;
}
.lang-flag:hover { border-color: var(--accent); color: var(--accent); }
.lang-flag.active { background: rgba(20, 184, 166, 0.2); border-color: var(--accent); color: var(--accent); }

/* ===== FORM ELEMENTS ===== */
select, input[type=number], input[type=text] {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    font-size: .85rem;
    color: var(--text-primary);
    transition: .2s;
    font-family: inherit;
}
select:focus, input[type=number]:focus, input[type=text]:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.15);
}
input[type="checkbox"] { accent-color: var(--accent); }

/* ===== TABLES ===== */
.double-entry-table table, .cross-table-input table, .contingency-input table, .theo-table table {
    border-collapse: collapse;
    width: 100%;
    font-size: .82rem;
}
.double-entry-table th, .double-entry-table td,
.cross-table-input th, .cross-table-input td,
.contingency-input th, .contingency-input td,
.theo-table th, .theo-table td {
    border: 1px solid var(--border);
    padding: 6px 10px;
    text-align: center;
}
.double-entry-table th, .cross-table-input th { background: rgba(20, 184, 166, 0.1); color: var(--accent); font-weight: 600; }
.contingency-input th, .theo-table th { background: rgba(167, 139, 250, 0.1); color: var(--accent3); }
.double-entry-table .marginal { background: rgba(249, 115, 22, 0.1); font-weight: 600; color: var(--accent2); }
.double-entry-table .total { background: rgba(251, 113, 133, 0.1); font-weight: 700; color: var(--accent4); }

/* ===== MISC ===== */
.modify-section { margin-top: 8px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.modify-section label { font-size: .82rem; cursor: pointer; display: flex; align-items: center; gap: 4px; color: var(--text-secondary); }
.param-inputs {
    display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px;
    padding: 8px 12px; background: rgba(15, 23, 42, 0.6);
    border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.param-inputs label { font-size: .78rem; display: flex; align-items: center; gap: 3px; color: var(--text-secondary); }
.param-inputs input[type="number"] { width: 65px; }

.config-panel { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.config-left, .config-right {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-card);
    flex: 1;
    min-width: 280px;
}
.config-left h3, .config-right h3 {
    font-size: .92rem;
    color: var(--accent2);
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
    font-weight: 600;
}
label { font-size: .82rem; color: var(--text-secondary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
    .preset-groups { flex-wrap: wrap; }
    .preset-group { flex: 0 0 calc(33.3% - 4px); }
}
@media (max-width: 900px) {
    .explorer { flex-direction: column; }
    .left-panel, .right-panel { width: 100%; min-width: unset; }
    .quiz-options { grid-template-columns: 1fr; }
    .preset-group { flex: 0 0 calc(33.3% - 4px); }
}
@media (max-width: 700px) {
    .themes-grid { grid-template-columns: 1fr; }
    .header h1 { font-size: 1.1rem; }
}
@media (max-width: 640px) {
    .main { flex-direction: column; align-items: center; gap: 24px; margin-top: 40px; }
    .card { width: 100%; max-width: 320px; height: auto; padding: 36px 24px; }
}
@media (max-width: 550px) {
    .preset-group { flex: 0 0 calc(50% - 3px); }
}

/* Hint box */
#quiz-hint {
    background: rgba(245, 158, 11, 0.1) !important;
    border-left: 3px solid var(--warning) !important;
    color: #fbbf24 !important;
}
