/* ============================================================================
   MATEMATIKA 7: NARAVNA ŠTEVILA – DELJIVOST (style.css)
   Oblikovanje po slovenskem delovnem zvezku za 7. razred OŠ + AI Diagnostika
   ============================================================================ */

:root,
html[data-theme="light"] {
    color-scheme: light;
    --bg-page: #f1f5f9;
    --bg-card: #ffffff;
    --card-bg: #ffffff;
    --bg-subtle: #f8fafc;
    --bg-input: #ffffff;

    --text-main: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;

    --border-color: #cbd5e1;
    --border-soft: #e2e8f0;

    --primary: #1d4ed8;
    --primary-light: #dbeafe;
    --primary-border: #60a5fa;

    --orange: #ea580c;
    --orange-light: #ffedd5;
    --orange-border: #fb923c;

    --green: #15803d;
    --green-light: #dcfce7;
    --green-border: #4ade80;

    --red: #b91c1c;
    --red-light: #fee2e2;
    --red-border: #f87171;

    --purple: #6d28d9;
    --purple-light: #ede9fe;

    --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.07);
    --shadow-lg: 0 12px 32px rgba(29, 78, 216, 0.14);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;

    --font-heading: 'Lexend', system-ui, sans-serif;
    --font-body: 'Nunito', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg-page: #0b1120;
    --bg-card: #1e293b;
    --card-bg: #1e293b;
    --bg-subtle: #0f172a;
    --bg-input: #0f172a;

    --text-main: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --border-color: #334155;
    --border-soft: #1e293b;

    --primary: #60a5fa;
    --primary-light: rgba(37, 99, 235, 0.22);
    --primary-border: #3b82f6;

    --orange: #fb923c;
    --orange-light: rgba(234, 88, 12, 0.22);
    --orange-border: #f97316;

    --green: #4ade80;
    --green-light: rgba(22, 163, 74, 0.22);
    --green-border: #22c55e;

    --red: #f87171;
    --red-light: rgba(220, 38, 38, 0.22);
    --red-border: #ef4444;

    --purple: #c084fc;
    --purple-light: rgba(109, 40, 217, 0.25);
}

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

body {
    font-family: var(--font-body);
    background: var(--bg-page);
    color: var(--text-main);
    line-height: 1.55;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.25;
}

code {
    font-family: var(--font-mono);
    font-size: 0.94em;
    background: var(--bg-subtle);
    color: var(--text-main);
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid var(--border-soft);
}

.confetti-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* ==================== ZGORNJA GLAVA ==================== */
.top-header {
    background: var(--bg-card);
    border-bottom: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    max-width: 1560px;
    margin: 0 auto;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hub-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.85rem;
}

.brand-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1d4ed8, #4338ca);
    color: #fff;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-topline {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 2px;
}

.grade-badge {
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 7px;
    border-radius: 5px;
}

.student-badge {
    font-size: 0.72rem;
    font-weight: 800;
    background: var(--green-light);
    color: var(--green);
    padding: 2px 8px;
    border-radius: 5px;
}

.brand-title {
    font-size: 1.22rem;
    font-weight: 800;
}

.header-stats-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 99px;
    font-weight: 800;
    font-size: 0.92rem;
}

.stars-pill {
    background: #fef9c3;
    color: #854d0e;
    border: 1.5px solid #fde047;
}

.streak-pill {
    background: #ffedd5;
    color: #9a3412;
    border: 1.5px solid #fdba74;
}

.icon-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-subtle);
    color: var(--text-main);
    cursor: pointer;
    font-size: 1.05rem;
}

.mentor-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 10px;
    border: 2px solid var(--primary-border);
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 800;
    font-size: 0.86rem;
    cursor: pointer;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
}

/* Vrstica s strogo simboliko */
.notation-strip {
    background: var(--bg-subtle);
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    padding: 7px 18px;
    font-size: 0.82rem;
}

.notation-strip-inner {
    max-width: 1560px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px 14px;
    flex-wrap: wrap;
}

.notation-sep {
    color: var(--text-muted);
}

/* Pregledna navigacija poglavij (brez drsenja vstran - vsa poglavja vidna hkrati!) */
.module-nav-wrapper {
    max-width: 1560px;
    margin: 0 auto;
    padding: 10px 18px 12px;
}

.module-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 8px;
    overflow: visible;
}

.module-tab {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-subtle);
    color: var(--text-secondary);
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 9px;
    text-align: left;
    line-height: 1.25;
    transition: all 0.16s ease;
}

.module-tab:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--text-main);
    transform: translateY(-1px);
}

.module-tab.active {
    background: linear-gradient(135deg, #1d4ed8, #4338ca);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.28);
}

.module-tab.module-tab-exam.active {
    background: linear-gradient(135deg, #d97706, #ea580c);
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3);
}

.tab-num {
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.08);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 900;
}

.module-tab.active .tab-num {
    background: rgba(255, 255, 255, 0.24);
    color: #fff;
}

/* ==================== DVODELNA POSTAVITEV (DELOVNI LIST + AI MENTOR) ==================== */
.workspace-shell {
    max-width: 1560px;
    margin: 18px auto;
    padding: 0 18px 60px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
    transition: all 0.25s ease;
}

.module-section {
    display: none;
    animation: fadeIn 0.22s ease;
}

.module-section.active {
    display: block;
}

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

.section-hero {
    margin-bottom: 16px;
}

.module-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--primary-light);
    color: var(--primary);
    margin-bottom: 4px;
}

.section-hero h2 {
    font-size: 1.55rem;
    margin-bottom: 4px;
}

.section-hero p {
    color: var(--text-secondary);
    font-size: 0.96rem;
}

/* Kartice */
.card {
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    margin-bottom: 18px;
}

.subcard {
    background: var(--bg-subtle);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}

.ex-header {
    margin-bottom: 8px;
}

.ex-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    padding: 2px 8px;
    border-radius: 5px;
    background: var(--orange-light);
    color: var(--orange);
    margin-bottom: 4px;
}

.ex-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

/* Gumbi */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all 0.15s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #1d4ed8, #4338ca);
    color: #fff;
}

.btn-primary:hover {
    filter: brightness(1.08);
}

.btn-secondary {
    background: linear-gradient(135deg, #15803d, #059669);
    color: #fff;
}

.btn-outline {
    background: var(--bg-subtle);
    color: var(--text-main);
    border-color: var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.pill-btn {
    padding: 6px 14px;
    border-radius: 99px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-subtle);
    color: var(--text-main);
    font-weight: 800;
    font-size: 0.88rem;
    cursor: pointer;
}

.pill-btn.active, .pill-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.target-selector-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

/* ==================== MODUL 1 POSEBNI SLOGI ==================== */
.eq-master-banner {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.eq-box {
    flex: 1;
    min-width: 210px;
    padding: 14px;
    border-radius: 14px;
    border: 2px solid transparent;
}

.eq-box-blue { background: var(--primary-light); border-color: var(--primary-border); }
.eq-box-orange { background: var(--orange-light); border-color: var(--orange-border); }
.eq-box-green { background: var(--green-light); border-color: var(--green-border); }

.eq-big {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 900;
}

.eq-tag {
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 900;
    margin-bottom: 8px;
}

.eq-phrases {
    list-style: none;
    font-size: 0.86rem;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.eq-sign {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    color: var(--text-muted);
}

.workspace-box {
    background: var(--bg-subtle);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
}

.pair-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.pair-box {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-card);
    padding: 6px 10px;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    font-family: var(--font-mono);
    font-weight: 700;
}

.math-input-sm {
    width: 58px;
    height: 34px;
    text-align: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.96rem;
    border: 1.5px solid var(--border-color);
    border-radius: 7px;
    background: var(--bg-input);
    color: var(--text-main);
}

.math-input-wide {
    width: 100%;
    max-width: 420px;
    height: 38px;
    padding: 0 12px;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.95rem;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-input);
    color: var(--text-main);
}

.questions-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.q-item-row {
    background: var(--bg-subtle);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 14px;
}

.q-item-row.correct {
    border-color: var(--green-border);
    background: var(--green-light);
}

.q-item-row.wrong {
    border-color: var(--red-border);
    background: var(--red-light);
}

.tf-btns-group {
    display: inline-flex;
    gap: 6px;
    margin-top: 6px;
}

.tf-btn {
    padding: 5px 14px;
    border-radius: 8px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    font-weight: 800;
    cursor: pointer;
}

.tf-btn.active-p { background: var(--green); color: #fff; border-color: var(--green); }
.tf-btn.active-n { background: var(--red); color: #fff; border-color: var(--red); }

/* Carrollov diagram */
.carroll-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 0.88rem;
}

.carroll-table th, .carroll-table td {
    border: 1.5px solid var(--border-color);
    padding: 10px;
    text-align: center;
}

.carroll-table th {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 800;
}

/* ==================== MODUL 2 & 3 POSEBNI SLOGI ==================== */
.rules-styled-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.92rem;
}

.rule-num-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 6px;
    margin-right: 6px;
}

.tag-blue { background: var(--primary-light); color: var(--primary); }
.tag-orange { background: var(--orange-light); color: var(--orange); }
.tag-green { background: var(--green-light); color: var(--green); }

.inline-input-group {
    display: flex;
    gap: 8px;
    margin: 10px 0;
}

.num-input-lg {
    width: 180px;
    height: 40px;
    padding: 0 12px;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-main);
}

.xray-output-box {
    background: var(--bg-subtle);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    font-size: 0.9rem;
}

.div-check-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}

.div-check-table th, .div-check-table td {
    border: 1.5px solid var(--border-color);
    padding: 9px;
    text-align: center;
}

.div-check-table th {
    background: var(--bg-subtle);
    font-family: var(--font-mono);
}

.check-cell-btn {
    width: 42px;
    height: 36px;
    border-radius: 8px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-card);
    font-size: 1.05rem;
    font-weight: 900;
    cursor: pointer;
}

.check-cell-btn.val-yes { background: var(--green-light); color: var(--green); border-color: var(--green-border); }
.check-cell-btn.val-no { background: var(--red-light); color: var(--red); border-color: var(--red-border); }

.digit-picker-row {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin: 8px 0;
}

.digit-chip-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    font-family: var(--font-mono);
    font-weight: 700;
    cursor: pointer;
}

.digit-chip-btn.selected {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.highlight-tail {
    background: #fef08a;
    color: #854d0e;
    padding: 0 4px;
    border-radius: 4px;
}

.mini-rule-box {
    background: var(--bg-subtle);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    font-size: 0.9rem;
}

.mini-rule-box h4 {
    margin: 6px 0;
}

/* ==================== MODUL 4: DREVESNI DIAGRAM IN ERATOSTENOVO REŠETO ==================== */
.tree-diagram-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.tree-branch {
    padding: 16px;
    border-radius: 14px;
    border: 2px solid var(--border-color);
    text-align: center;
}

.branch-one { background: var(--orange-light); border-color: var(--orange-border); }
.branch-prime { background: var(--green-light); border-color: var(--green-border); }
.branch-composite { background: var(--primary-light); border-color: var(--primary-border); }

.branch-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 99px;
    background: rgba(255,255,255,0.75);
    color: #0f172a;
    margin-bottom: 6px;
}

.branch-note {
    font-size: 0.84rem;
    margin-top: 6px;
}

.sieve-controls-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.sieve-step-label {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--primary);
}

.sieve-grid-100 {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
}

.sieve-cell {
    height: 40px;
    border-radius: 8px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.18s ease;
}

.sieve-cell.crossed-one {
    background: var(--orange-light);
    color: var(--orange);
    text-decoration: line-through;
}

.sieve-cell.prime-circled {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
    border-radius: 99px;
    box-shadow: 0 2px 8px rgba(21, 128, 61, 0.35);
    transform: scale(1.04);
}

.sieve-cell.crossed-composite {
    background: var(--red-light);
    color: var(--red);
    text-decoration: line-through;
    opacity: 0.65;
}

/* ==================== MODUL 5: STOLPEC Z NAVPIČNO ČRTO IN DREVO ==================== */
.prime-column-table {
    margin: 12px auto;
    border-collapse: collapse;
    font-family: var(--font-mono);
    font-size: 1.1rem;
}

.prime-column-table td {
    padding: 6px 14px;
}

.prime-col-left {
    text-align: right;
    border-right: 3px solid var(--text-main);
    font-weight: 800;
    color: var(--primary);
}

.prime-col-right {
    text-align: left;
    font-weight: 800;
    color: var(--green);
}

.factor-tree-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
}

.tree-node-row {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.tree-node {
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    border-radius: 10px;
    background: var(--primary-light);
    border: 2px solid var(--primary-border);
    color: var(--primary);
    font-family: var(--font-mono);
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tree-node.prime-leaf {
    border-radius: 50%;
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

/* ==================== VENNOV DIAGRAM (MODUL 6) ==================== */
.venn-diagram-wrap {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    margin: 14px 0;
    flex-wrap: wrap;
}

.venn-circle {
    flex: 1;
    min-width: 170px;
    padding: 14px;
    border-radius: 18px;
    border: 2px solid var(--border-color);
    text-align: center;
}

.venn-left {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary-border);
}

.venn-center {
    background: var(--green-light);
    border: 2.5px solid var(--green);
    z-index: 2;
    transform: scale(1.03);
}

.venn-right {
    background: rgba(234, 88, 12, 0.1);
    border-color: var(--orange-border);
}

/* ==================== DESNI PREDAL: AI DIAGNOSTIKA & MENTOR (DRAWER / MODAL) ==================== */
.mentor-sidebar {
    background: var(--bg-card);
    border: 2px solid var(--primary-border);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
    position: fixed;
    right: 20px;
    bottom: 20px;
    top: auto;
    width: min(440px, calc(100vw - 32px));
    height: 580px;
    max-height: 85vh;
    z-index: 1250;
    display: none;
    flex-direction: column;
    animation: mentorPopUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mentor-sidebar.mobile-open,
.mentor-sidebar.open {
    display: flex;
}

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

.mentor-sidebar .icon-close-btn {
    display: inline-flex !important;
}

/* Plavajoči gumb za AI mentorja (FAB) v spodnjem desnem kotu */
.floating-mentor-fab {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 1200;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #1d4ed8, #4338ca);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 99px;
    font-family: var(--font-main);
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(29, 78, 216, 0.4);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-mentor-fab:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 12px 28px rgba(29, 78, 216, 0.55);
}

.floating-mentor-fab:active {
    transform: translateY(0) scale(0.98);
}

.floating-mentor-fab .fab-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.mentor-sidebar.mobile-open ~ .floating-mentor-fab,
.mentor-sidebar.open ~ .floating-mentor-fab {
    display: none;
}

.mentor-sidebar.pulse-alert {
    animation: mentorPulse 0.6s ease 2;
}

@keyframes mentorPulse {
    0%, 100% { box-shadow: var(--shadow-lg); }
    50% { box-shadow: 0 0 0 8px rgba(234, 88, 12, 0.35); border-color: var(--orange); }
}

.mentor-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1.5px solid var(--border-soft);
    margin-bottom: 10px;
}

.mentor-id-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mentor-avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #1d4ed8, #6d28d9);
    color: #fff;
    font-size: 1.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mentor-sub-status {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 700;
}

/* Diagnostični alarm ob napaki */
.diagnostic-alert-card {
    background: var(--orange-light);
    border: 1.5px solid var(--orange-border);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
    font-size: 0.82rem;
}

.diag-alert-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.diag-tag {
    font-weight: 900;
    color: var(--orange);
    font-size: 0.72rem;
}

.diag-attempt {
    background: var(--bg-card);
    padding: 1px 7px;
    border-radius: 99px;
    font-weight: 800;
    font-size: 0.7rem;
}

.diag-error-title {
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
}

.diag-json-details summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.75rem;
}

.diag-json-pre {
    margin-top: 6px;
    background: var(--bg-card);
    padding: 8px;
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    overflow-x: auto;
    max-height: 120px;
}

.mentor-quick-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.chip-prompt {
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 99px;
    border: 1px solid var(--border-color);
    background: var(--bg-subtle);
    color: var(--text-main);
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
}

.chip-prompt:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary-border);
}

.mentor-chat-stream {
    flex: 1;
    overflow-y: auto;
    background: var(--bg-subtle);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
    min-height: 260px;
}

.chat-msg {
    padding: 10px 13px;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.5;
    max-width: 92%;
}

.chat-msg.assistant {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.chat-msg.assistant.diag-msg {
    border-left: 5px solid var(--orange);
}

.chat-msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #1d4ed8, #4338ca);
    color: #fff;
    font-weight: 700;
    border-bottom-right-radius: 4px;
}

.mentor-chat-form {
    display: flex;
    gap: 6px;
}

.mentor-chat-input {
    flex: 1;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-main);
    font-size: 0.88rem;
}

.feedback-slot {
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.modal-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    max-width: 580px;
    width: 100%;
    padding: 22px;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.icon-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-subtle);
    color: var(--text-main);
    cursor: pointer;
    font-weight: 800;
}

.modal-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.llm-presets-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.llm-preset-btn {
    padding: 9px 12px;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-subtle);
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.llm-preset-btn.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.llm-preset-btn span {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 0.86rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

.mobile-only {
    display: none;
}

/* ==================== ODZIVNOST ==================== */
@media (max-width: 1120px) {
    .workspace-shell {
        grid-template-columns: 1fr;
    }

    .mentor-sidebar {
        position: fixed;
        right: 16px;
        bottom: 16px;
        top: auto;
        width: min(420px, calc(100vw - 32px));
        height: 540px;
        max-height: 85vh;
        z-index: 1250;
        display: none;
    }

    .mentor-sidebar.mobile-open {
        display: flex;
    }

    .mobile-only {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 780px) {
    .grid-2-col,
    .grid-3-col,
    .tree-diagram-3 {
        grid-template-columns: 1fr;
    }

    .sieve-grid-100 {
        gap: 4px;
    }

    .sieve-cell {
        height: 34px;
        font-size: 0.8rem;
    }
}

/* ==================== 6. RAZRED (JAKA): PREKLOPNIK RAZREDOV IN DODATNI ELEMENTI ==================== */
.grade-switch-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ede9fe, #dbeafe);
    border: 1.5px solid #8b5cf6;
    color: #4c1d95;
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.grade-switch-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

[data-theme="dark"] .grade-switch-link {
    background: rgba(139, 92, 246, 0.2);
    color: #ddd6fe;
    border-color: #a78bfa;
}

/* Interaktivna tabela desetiških mest (do bilijona) */
.pv-table-wrap {
    overflow-x: auto;
    border-radius: 14px;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    margin: 12px 0;
}

.pv-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
    text-align: center;
}

.pv-table th,
.pv-table td {
    border: 1px solid var(--border-color);
    padding: 8px 6px;
}

.pv-group-b { background: #fae8ff; color: #701a75; font-weight: 800; }
.pv-group-md { background: #ede9fe; color: #4c1d95; font-weight: 800; }
.pv-group-m { background: #dbeafe; color: #1e3a8a; font-weight: 800; }
.pv-group-t { background: #fef3c7; color: #92400e; font-weight: 800; }
.pv-group-e { background: #dcfce7; color: #14532d; font-weight: 800; }

[data-theme="dark"] .pv-group-b { background: rgba(217, 70, 239, 0.2); color: #f5d0fe; }
[data-theme="dark"] .pv-group-md { background: rgba(139, 92, 246, 0.2); color: #ddd6fe; }
[data-theme="dark"] .pv-group-m { background: rgba(59, 130, 246, 0.2); color: #bfdbfe; }
[data-theme="dark"] .pv-group-t { background: rgba(245, 158, 11, 0.2); color: #fde68a; }
[data-theme="dark"] .pv-group-e { background: rgba(34, 197, 94, 0.2); color: #bbf7d0; }

.pv-unit-code {
    font-family: var(--font-mono);
    font-weight: 900;
    font-size: 0.95rem;
}

.pv-power-sub {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-muted);
}

.pv-digit-cell {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 900;
    padding: 10px 4px !important;
    background: var(--bg-subtle);
    transition: all 0.2s ease;
}

.pv-digit-cell.active-digit {
    background: var(--primary-light);
    color: var(--primary);
}

.pv-digit-cell.zero-trap-digit {
    background: var(--red-light);
    color: var(--red);
    border: 2px solid var(--red);
    animation: pulseTrap 1.4s infinite;
}

@keyframes pulseTrap {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

/* Zaokroževanje: Podčrtaj in poglej desno */
.round-visual-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 18px;
    border-radius: 14px;
    background: var(--bg-subtle);
    border: 2px dashed var(--primary-border);
    margin: 12px 0;
}

.round-digit-box {
    width: 46px;
    height: 56px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 900;
    position: relative;
}

.round-digit-box .unit-mini {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    line-height: 1;
}

.round-digit-box.target-place {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 4px;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.2);
}

.round-digit-box.look-right-place {
    border-color: var(--orange);
    background: var(--orange-light);
    color: var(--orange);
}

/* Carrollov diagram 2x2 */
.carroll-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.carroll-table th,
.carroll-table td {
    border: 2px solid var(--border-color);
    padding: 10px;
    text-align: center;
}

.carroll-table th {
    background: var(--bg-subtle);
    font-weight: 800;
    font-size: 0.85rem;
}

/* Rimske številke */
.roman-legend-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin: 12px 0;
}

.roman-legend-card {
    background: var(--bg-subtle);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 6px;
    text-align: center;
}

.roman-sym {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary);
}

.roman-val {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

.roman-decomp-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 14px;
    border-radius: 12px;
    background: var(--bg-subtle);
    border: 1.5px solid var(--border-color);
    margin: 10px 0;
}

.roman-chunk-pill {
    padding: 8px 14px;
    border-radius: 10px;
    background: var(--primary-light);
    border: 1.5px solid var(--primary-border);
    font-family: var(--font-mono);
    font-weight: 800;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.roman-chunk-pill.subtractive {
    background: var(--orange-light);
    border-color: var(--orange-border);
    color: var(--orange);
}

/* Pisno računanje v mrežnem zvezku */
.notebook-grid-box {
    background-color: var(--bg-card);
    background-image:
        linear-gradient(to right, rgba(148, 163, 184, 0.18) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(148, 163, 184, 0.18) 1px, transparent 1px);
    background-size: 32px 32px;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    padding: 18px;
    font-family: var(--font-mono);
    overflow-x: auto;
}

.written-calc-pre {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.65;
    margin: 0;
    white-space: pre;
}

/* Številski trak */
.number-line-box {
    background: var(--bg-subtle);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    margin: 12px 0;
    overflow-x: auto;
}

@media (max-width: 680px) {
    .roman-legend-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==================== PREGLEDNA NAVIGACIJA IN MODUL "ZAPIS ŠTEVIL" ==================== */
.chapter-stepper-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    padding: 10px 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.chapter-stepper-title {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.stepper-btn {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--border-color);
    background: var(--bg-subtle);
    color: var(--text-main);
    font-weight: 800;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.16s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.stepper-btn:hover:not(:disabled) {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}

.stepper-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Vizualne trojice za Zapis števil (Milijarde | Milijoni | Tisočice | Enice) */
.triplets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 14px 0;
}

.triplet-card {
    border-radius: 14px;
    border: 2px solid var(--border-color);
    padding: 12px;
    text-align: center;
    background: var(--bg-subtle);
    transition: all 0.2s ease;
}

.triplet-card.t-md { border-color: #a78bfa; background: rgba(139, 92, 246, 0.08); }
.triplet-card.t-m  { border-color: #60a5fa; background: rgba(59, 130, 246, 0.08); }
.triplet-card.t-t  { border-color: #fbbf24; background: rgba(245, 158, 11, 0.08); }
.triplet-card.t-e  { border-color: #4ade80; background: rgba(34, 197, 94, 0.08); }

.triplet-label {
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.triplet-digits {
    font-family: var(--font-mono);
    font-size: 1.7rem;
    font-weight: 900;
    letter-spacing: 3px;
    padding: 6px 8px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    margin: 6px 0;
}

.triplet-word {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    min-height: 22px;
}

/* Pravopisne kartice (SKUPAJ vs NARAZEN) */
.orthography-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 12px 0;
}

.ortho-card {
    border-radius: 14px;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
}

.ortho-card.together {
    background: var(--green-light);
    border-color: var(--green-border);
}

.ortho-card.apart {
    background: var(--primary-light);
    border-color: var(--primary-border);
}

.ortho-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 0.74rem;
    font-weight: 900;
    background: rgba(255, 255, 255, 0.85);
    color: #0f172a;
    margin-bottom: 6px;
}

/* Sestavljalnik besednega zapisa s čipi */
.word-chips-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
    padding: 12px;
    border-radius: 12px;
    background: var(--bg-subtle);
    border: 1.5px dashed var(--border-color);
}

.word-chip-btn {
    padding: 7px 13px;
    border-radius: 99px;
    border: 1.5px solid var(--primary-border);
    background: var(--bg-card);
    color: var(--text-main);
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.word-chip-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
}

@media (max-width: 820px) {
    .triplets-grid,
    .orthography-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 520px) {
    .triplets-grid,
    .orthography-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================================
   DODATNI STILI ZA GENERALKO ZA TEST IN JAKOVE CILJANE VAJE
   ======================================================== */

/* Časovna os & tabela osebnosti */
.person-table-wrap {
    overflow-x: auto;
    margin: 12px 0;
    border-radius: 12px;
    border: 1.5px solid var(--border-color);
}

.person-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    font-size: 0.92rem;
}

.person-table th,
.person-table td {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.person-table th {
    background: var(--bg-subtle);
    color: var(--primary);
    font-weight: 800;
}

.person-table tr:hover td {
    background: var(--bg-subtle);
}

.timeline-box {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    margin: 14px 0;
    overflow-x: auto;
}

.timeline-axis-wrap {
    min-width: 600px;
    position: relative;
    padding: 24px 10px 30px;
}

.timeline-axis-line {
    position: relative;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
    margin: 20px 0;
}

.timeline-major-tick {
    position: absolute;
    top: -8px;
    width: 2px;
    height: 20px;
    background: var(--primary);
}

.timeline-major-label {
    position: absolute;
    top: 18px;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

.timeline-pin {
    position: absolute;
    top: -34px;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.timeline-pin::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: var(--primary) transparent transparent;
}

/* Spotlight učinek za prednost računskih operacij */
.spotlight-rule-banner {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 12px 0;
}

.spotlight-order-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.spotlight-order-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 12px;
    font-weight: 800;
    font-size: 0.88rem;
}

.spotlight-order-item.active {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.expr-step-line {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.expr-highlight-op {
    background: rgba(245, 158, 11, 0.25);
    border: 1.5px dashed #f59e0b;
    border-radius: 6px;
    padding: 2px 6px;
    color: #d97706;
    font-weight: 900;
}

/* Generalka za test kartice */
.generalka-banner {
    background: linear-gradient(135deg, #f59e0b, #ef4444) !important;
    color: #fff !important;
}

.generalka-banner h2,
.generalka-banner p {
    color: #fff !important;
}

.generalka-task-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 14px;
}

.generalka-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    padding: 18px;
    transition: border-color 0.2s ease;
}

.generalka-card:hover {
    border-color: var(--primary);
}

.generalka-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.generalka-card-top h4 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.generalka-pts-badge {
    background: var(--bg-subtle);
    border: 1.5px solid var(--border-color);
    border-radius: 99px;
    padding: 3px 10px;
    font-weight: 800;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.generalka-subtasks {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.generalka-subrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.generalka-subrow label {
    font-weight: 700;
    font-size: 0.92rem;
    min-width: 140px;
}

.generalka-grade-box {
    background: var(--bg-card);
    border: 3px solid var(--primary);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-top: 20px;
}

.generalka-grade-big {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 900;
    margin: 10px 0;
}

.generalka-grade-1 { color: #ef4444; }
.generalka-grade-2 { color: #f59e0b; }
.generalka-grade-3 { color: #3b82f6; }
.generalka-grade-4 { color: #10b981; }
.generalka-grade-5 { color: #8b5cf6; }

.generalka-encouragement {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 14px;
    margin-top: 14px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.btn-gen-variant {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    background: var(--bg-subtle);
    border: 1.5px solid var(--border-color);
    color: var(--text-main);
    transition: all 0.2s ease;
}

.btn-gen-variant:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-gen-variant.active {
    background: var(--primary);
    color: #fff !important;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

