/* -------------------------------------------------------------
   Computer Architecture Exam Prep - Design System & Styles
   ------------------------------------------------------------- */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* CSS Variables for Premium Dark Theme */
:root {
    --bg-main: radial-gradient(circle at 50% 50%, hsl(222, 47%, 13%) 0%, hsl(224, 71%, 5%) 100%);
    --bg-card: rgba(22, 28, 45, 0.6);
    --bg-card-hover: rgba(30, 41, 59, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-glow: rgba(59, 130, 246, 0.3);
    
    --text-primary: hsl(210, 40%, 98%);
    --text-secondary: hsl(215, 20%, 65%);
    --text-muted: hsl(215, 16%, 47%);
    
    --accent-blue: hsl(217, 91%, 60%);
    --accent-blue-glow: rgba(59, 130, 246, 0.5);
    
    --correct: hsl(142, 72%, 40%);
    --correct-bg: rgba(16, 185, 129, 0.12);
    --correct-border: rgba(16, 185, 129, 0.3);
    
    --incorrect: hsl(350, 89%, 55%);
    --incorrect-bg: rgba(239, 68, 68, 0.12);
    --incorrect-border: rgba(239, 68, 68, 0.3);
    
    --category-bg-1: rgba(147, 51, 234, 0.15); /* Purp */
    --category-text-1: hsl(270, 85%, 75%);
    --category-bg-2: rgba(236, 72, 153, 0.15); /* Pink */
    --category-text-2: hsl(325, 85%, 75%);
    --category-bg-3: rgba(245, 158, 11, 0.15); /* Orange */
    --category-text-3: hsl(35, 95%, 70%);
    --category-bg-4: rgba(14, 165, 233, 0.15); /* Blue */
    --category-text-4: hsl(195, 90%, 70%);
    
    --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(59, 130, 246, 0.15);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(rgba(10, 15, 30, 0.88), rgba(10, 15, 30, 0.88)), url('bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    padding-bottom: 5rem;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Glassmorphic Dashboard */
header {
    margin-top: 2rem;
    margin-bottom: 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-premium);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1.5rem;
}

.logo-section h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 30%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.logo-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 0.2rem;
}

/* Stats Widget */
.stats-widget {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-val {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-val.accent {
    color: var(--accent-blue);
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.stat-lbl {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: -0.2rem;
}

/* Progress Tracker Dashboard */
.progress-dashboard {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 768px) {
    .progress-dashboard {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.overall-progress-bar-wrapper {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.2rem;
    text-align: center;
}

.overall-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.overall-progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.overall-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-blue) 0%, hsl(195, 90%, 55%) 100%);
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 12px var(--accent-blue-glow);
}

.category-progress-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 480px) {
    .category-progress-grid {
        grid-template-columns: 1fr;
    }
}

.category-progress-item {
    font-size: 0.85rem;
}

.cat-progress-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.cat-progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.cat-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Category Filters */
.controls-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.filter-group {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-body);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.filter-btn.active {
    background: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-blue);
    box-shadow: 0 8px 20px -6px var(--accent-blue-glow);
}

/* Switch styling for Only Unlearned toggle */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.toggle-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
}

.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.08);
    transition: .3s;
    border-radius: 34px;
    border: 1px solid var(--border-color);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-secondary);
    transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
}

input:checked + .slider.slider-practice {
    background-color: var(--category-text-3);
    border-color: var(--category-text-3);
}

input:checked + .slider:before {
    transform: translateX(22px);
    background-color: white;
}

/* Quiz Card Grid */
.quiz-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

/* Quiz Card Styling */
.quiz-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.2rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-premium);
    position: relative;
    transition: var(--transition-smooth);
    overflow: hidden;
}

.quiz-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    transition: var(--transition-smooth);
}

.quiz-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    border-color: var(--border-color-glow);
    box-shadow: var(--shadow-premium), var(--shadow-glow);
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.2rem;
    gap: 1rem;
}

.category-tag {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.35rem 0.8rem;
    border-radius: 8px;
}

/* Category Specific Tags */
.category-tag[data-cat="1"] { background: var(--category-bg-1); color: var(--category-text-1); }
.category-tag[data-cat="2"] { background: var(--category-bg-2); color: var(--category-text-2); }
.category-tag[data-cat="3"] { background: var(--category-bg-3); color: var(--category-text-3); }
.category-tag[data-cat="4"] { background: var(--category-bg-4); color: var(--category-text-4); }

.card-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

/* "Ezt már tudom" Checkbox Button */
.tudom-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.tudom-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
}

.tudom-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: var(--transition-fast);
}

.tudom-btn.learned {
    background: rgba(16, 185, 129, 0.1);
    color: var(--correct);
    border-color: rgba(16, 185, 129, 0.25);
}

.tudom-btn.learned svg {
    transform: scale(1.1);
}

/* Card Body & Question text */
.question-text {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--text-primary);
    margin-bottom: 1.8rem;
}

/* Option Statement Items */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.option-item {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.1rem 1.4rem;
    transition: var(--transition-smooth);
    position: relative;
}

.option-item:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.12);
}

.option-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.statement-text {
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Inline choice button controls */
.choice-controls {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}

.btn-choice {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: var(--transition-fast);
}

.btn-choice:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

/* Selected states */
.btn-choice.selected-true {
    background: rgba(59, 130, 246, 0.15);
    color: hsl(210, 100%, 70%);
    border-color: rgba(59, 130, 246, 0.4);
}

.btn-choice.selected-false {
    background: rgba(245, 158, 11, 0.15);
    color: hsl(35, 100%, 70%);
    border-color: rgba(245, 158, 11, 0.4);
}

/* Feedback icon showing after answering */
.feedback-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0.8rem;
    margin-left: 0.5rem;
    display: none;
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.feedback-icon.correct-icon {
    display: inline-flex;
    background: var(--correct);
    color: #ffffff;
}

.feedback-icon.incorrect-icon {
    display: inline-flex;
    background: var(--incorrect);
    color: #ffffff;
}

/* Revealed Correct State Styles on the Option Item container */
.option-item.revealed-correct {
    border-color: var(--correct-border);
    background: var(--correct-bg);
}

.option-item.revealed-incorrect {
    border-color: var(--incorrect-border);
    background: var(--incorrect-bg);
}

/* Explanation drawer sliding out below answered statement */
.explanation-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-top: 0 solid rgba(255, 255, 255, 0.05);
    margin-top: 0;
}

.option-item.revealed .explanation-panel {
    max-height: 250px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 0.8rem;
    padding-top: 0.8rem;
}

.explanation-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
}

.option-item.revealed-correct .explanation-title {
    color: var(--correct);
}

.option-item.revealed-incorrect .explanation-title {
    color: var(--incorrect);
}

.explanation-body {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.explanation-ref {
    display: inline-block;
    margin-top: 0.4rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    font-style: italic;
}

/* Learned card state */
.quiz-card.learned-card {
    opacity: 0.45;
    transform: scale(0.99);
}

.quiz-card.learned-card:hover {
    opacity: 0.75;
    transform: translateY(-2px);
}

.quiz-card.learned-card::before {
    background: var(--correct);
}

/* Practice card state */
.quiz-card.practice-card {
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: var(--shadow-premium), 0 0 25px rgba(245, 158, 11, 0.2);
}

.quiz-card.practice-card::before {
    background: var(--category-text-3);
    height: 4px;
}

/* "Még gyakorolnám" Button styling */
.gyakorol-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.gyakorol-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
}

.gyakorol-btn svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: var(--transition-fast);
}

.gyakorol-btn.practice {
    background: rgba(245, 158, 11, 0.1);
    color: var(--category-text-3);
    border-color: rgba(245, 158, 11, 0.35);
}

.gyakorol-btn.practice svg {
    transform: scale(1.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.6);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
    animation: fadeInUp 0.5s ease;
}

.empty-state h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Footer Styling */
footer {
    text-align: center;
    margin-top: 4rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* -------------------------------------------------------------
   Mode Switcher Tabs Styling
   ------------------------------------------------------------- */
.mode-tabs-container {
    margin-bottom: 20px !important;
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.mode-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    padding: 0.35rem;
    border-radius: 16px;
    gap: 0.35rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.6rem 1.4rem;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: var(--transition-fast);
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    background: var(--bg-card-hover);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.08), 0 4px 12px rgba(0, 0, 0, 0.2);
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
}

.tab-icon {
    width: 18px;
    height: 18px;
    transition: var(--transition-fast);
}

.tab-btn.active .tab-icon {
    transform: scale(1.05);
    filter: drop-shadow(0 0 4px var(--accent-blue-glow));
}

/* -------------------------------------------------------------
   Premium Table Kvíz Styling
   ------------------------------------------------------------- */
.quiz-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.12);
    margin-bottom: 1.5rem;
    margin-top: 1rem;
}

.quiz-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
}

.quiz-table th, .quiz-table td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.quiz-table tr:last-child th, .quiz-table tr:last-child td {
    border-bottom: none;
}

.quiz-table th {
    background: rgba(255, 255, 255, 0.02);
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    text-align: center;
    border-left: 1px solid var(--border-color);
}

.quiz-table th:first-child {
    text-align: left;
    border-left: none;
    font-size: 0.88rem;
    color: var(--text-primary);
}

.quiz-table td {
    border-left: 1px solid var(--border-color);
    text-align: center;
}

.quiz-table td:first-child {
    text-align: left;
    border-left: none;
    font-weight: 600;
    color: var(--text-primary);
    width: 45%;
}

/* Interactive Grid Cell Buttons */
.table-cell-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: transparent;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
}

.table-cell-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.04);
}

.table-cell-btn.active-x {
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--accent-blue);
    text-shadow: 0 0 12px var(--accent-blue-glow);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.1);
}

.table-cell-btn:disabled {
    cursor: not-allowed;
}

/* Cell Evaluation Styling */
.table-cell-btn.correct-eval {
    background: var(--correct-bg) !important;
    border-color: var(--correct-border) !important;
    color: var(--correct) !important;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.3) !important;
}

.table-cell-btn.incorrect-eval {
    background: var(--incorrect-bg) !important;
    border-color: var(--incorrect-border) !important;
    color: var(--incorrect) !important;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3) !important;
}

.table-cell-btn .cell-badge {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 900;
}

.table-cell-btn.correct-eval .cell-badge {
    background: var(--correct);
}

.table-cell-btn.incorrect-eval .cell-badge {
    background: var(--incorrect);
}

/* Check Answer Action Bar */
.table-action-bar {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-check-answers {
    background: var(--accent-blue);
    color: #ffffff;
    border: none;
    padding: 0.8rem 2.2rem;
    border-radius: 14px;
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 25px -6px var(--accent-blue-glow);
    transition: var(--transition-fast);
    letter-spacing: 0.5px;
}

.btn-check-answers:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -4px var(--accent-blue-glow);
}

.btn-check-answers:disabled {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    box-shadow: none;
    cursor: not-allowed;
}

/* Table Row Explanation Panel */
.table-explanations-list {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeInUp 0.5s ease both;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    padding-top: 1.5rem;
}

.table-row-explanation {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.2rem;
}

.table-row-explanation-header {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-blue);
    margin-bottom: 0.3rem;
}

.table-row-explanation-body {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.table-row-explanation-ref {
    display: inline-block;
    margin-top: 0.3rem;
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 600;
    font-style: italic;
}



/* ============================================================================
   --- 10. DRAM Scheduling Mode Styles ---
   ============================================================================ */
.dram-quiz-card {
    padding: 1.8rem;
    background: rgba(30, 41, 59, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dram-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
    padding: 0.8rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.dram-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.dram-meta-label {
    font-weight: 700;
    color: var(--text-secondary);
}

.dram-meta-val {
    color: var(--accent-blue);
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.dram-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.dram-table-container {
    background: rgba(15, 23, 42, 0.35);
    border-radius: 12px;
    padding: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.dram-table-container h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.05rem;
    color: var(--text-primary);
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dram-table {
    width: 100%;
    border-collapse: collapse;
}

.dram-table th {
    text-align: left;
    padding: 0.6rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.dram-table td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.dram-row-num {
    font-weight: bold;
    color: var(--text-muted);
    width: 25px;
}

.dram-select {
    width: 100%;
    padding: 0.5rem;
    background: rgba(30, 41, 59, 0.85);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.dram-select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.dram-select:disabled {
    cursor: not-allowed;
    opacity: 0.9;
}

/* Validation styling */
.dram-cell-correct {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: rgba(16, 185, 129, 0.6) !important;
    color: #10b981 !important;
    font-weight: bold;
}

.dram-cell-incorrect {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.6) !important;
    color: #ef4444 !important;
}

.dram-feedback-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.3rem;
    font-size: 0.85rem;
    font-weight: bold;
}

.dram-feedback-badge.correct {
    color: #10b981;
}

.dram-feedback-badge.incorrect {
    color: #ef4444;
}

.dram-correct-ans-display {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.72rem;
    color: #34d399;
    font-weight: 700;
}

.dram-correct-ans-display.empty-val {
    color: var(--text-muted);
    font-style: italic;
}


/* ============================================================================
   --- 11. Code Editor and SVG Flowchart Styles ---
   ============================================================================ */
.code-editor-block {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    font-family: 'Fira Code', 'Courier New', monospace;
    overflow: hidden;
    margin-bottom: 1.2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.code-editor-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(30, 41, 59, 0.5);
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.code-dot.red { background: #ef4444; }
.code-dot.yellow { background: #eab308; }
.code-dot.green { background: #22c55e; }

.code-title {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.code-content {
    margin: 0;
    padding: 1.2rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.code-keyword { color: #f43f5e; font-weight: bold; }
.code-type { color: #06b6d4; }
.code-number { color: #f59e0b; }

.dram-flowchart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.2rem;
}

.flowchart-svg {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.15));
}

.svg-node-start-end {
    fill: rgba(30, 41, 59, 0.8);
    stroke: var(--accent-blue);
    stroke-width: 2;
    filter: drop-shadow(0 0 4px rgba(59, 130, 246, 0.3));
}

.svg-node-process {
    fill: rgba(15, 23, 42, 0.8);
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 1.5;
}

.svg-node-decision {
    fill: rgba(45, 30, 15, 0.8);
    stroke: #eab308;
    stroke-width: 2;
    filter: drop-shadow(0 0 4px rgba(234, 179, 8, 0.3));
}

.svg-arrow {
    stroke: rgba(255, 255, 255, 0.45);
    stroke-width: 2;
    fill: none;
}

.svg-text {
    fill: #f8fafc;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    text-anchor: middle;
    dominant-baseline: middle;
}

.svg-text-small {
    font-size: 0.72rem;
    fill: var(--text-muted);
}

.svg-label {
    fill: #38bdf8;
    font-size: 0.76rem;
    font-weight: 700;
}

/* 1-Table Algorithm Layout styles */
.algo-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.algo-table-wrapper {
    overflow-x: auto;
    background: rgba(15, 23, 42, 0.35);
    border-radius: 12px;
    padding: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 1.5rem;
}

.algo-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.algo-table th {
    padding: 0.8rem;
    font-size: 0.8rem;
    text-align: center;
    color: var(--text-primary);
    background: rgba(255,255,255,0.02);
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.algo-table td {
    padding: 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    text-align: center;
}

.algo-table td:first-child {
    text-align: left;
    font-weight: 700;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.02);
    border-right: 1px solid rgba(255,255,255,0.08);
    width: 180px;
}

/* --- Hosszú Feladatok (Long Tasks) CSS --- */
.hosszu-grids-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.hosszu-grid-box {
    flex: 1 1 340px;
    background: rgba(15, 23, 42, 0.25);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.2rem;
}

.hosszu-grid-title {
    font-size: 1rem;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: 0.5px;
}

.hosszu-matrix {
    border-collapse: separate;
    border-spacing: 3px;
    width: 100%;
}

.hosszu-matrix th, .hosszu-matrix td {
    width: 42px;
    height: 42px;
    text-align: center;
    vertical-align: middle;
    font-size: 0.82rem;
    padding: 0;
}

.hosszu-matrix th {
    color: var(--text-muted);
    font-weight: 600;
}

.hosszu-matrix td.header-col {
    color: var(--text-secondary);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    width: 42px;
}

.hosszu-cell-btn {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #38bdf8;
    font-weight: 900;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hosszu-cell-btn:hover {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.15);
}

.hosszu-cell-btn.selected {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: inset 0 0 6px rgba(56, 189, 248, 0.3), 0 0 10px rgba(56, 189, 248, 0.2);
}

.hosszu-cell-btn.correct {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.6) !important;
    color: #10b981 !important;
}

.hosszu-cell-btn.incorrect {
    background: rgba(244, 63, 94, 0.15) !important;
    border-color: rgba(244, 63, 94, 0.6) !important;
    color: #f43f5e !important;
}

.hosszu-cell-btn.missed {
    background: rgba(244, 63, 94, 0.05) !important;
    border: 1px dashed rgba(244, 63, 94, 0.5) !important;
    color: rgba(244, 63, 94, 0.5) !important;
}

.hosszu-cell-btn.disabled {
    cursor: not-allowed;
}

.hosszu-matrix-tick, .hosszu-matrix-cross {
    font-size: 0.62rem;
    position: absolute;
    bottom: 1px;
    right: 2px;
}

.hosszu-matrix-tick { color: #10b981; }
.hosszu-matrix-cross { color: #f43f5e; }

.hosszu-sched-container {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    background: rgba(15, 23, 42, 0.25);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.2rem;
    overflow-x: auto;
}

.hosszu-sched-title {
    font-size: 1rem;
    font-weight: 700;
    color: #38bdf8;
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: 0.5px;
}

.hosszu-sched-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.hosszu-sched-table th {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    text-align: center;
}

.hosszu-sched-table td {
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.hosszu-sched-table td.row-header {
    background: rgba(255, 255, 255, 0.02);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.9rem;
    width: 80px;
}

.hosszu-select {
    width: 100%;
    padding: 0.4rem 0.5rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s ease;
    cursor: pointer;
}

.hosszu-select:focus {
    border-color: var(--accent-color);
}

.hosszu-select.correct {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.6) !important;
    color: #10b981 !important;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.2);
}

.hosszu-select.incorrect {
    background: rgba(244, 63, 94, 0.15) !important;
    border-color: rgba(244, 63, 94, 0.6) !important;
    color: #f43f5e !important;
    box-shadow: 0 0 6px rgba(244, 63, 94, 0.2);
}

.hosszu-select-correct-ans {
    display: block;
    font-size: 0.72rem;
    color: #10b981;
    margin-top: 0.25rem;
    font-weight: 700;
}

.hosszu-inputs-container {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    background: rgba(15, 23, 42, 0.25);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.2rem;
}

.hosszu-inputs-title {
    font-size: 1rem;
    font-weight: 700;
    color: #a855f7;
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: 0.5px;
}

.hosszu-inputs-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hosszu-input-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.hosszu-input-label {
    font-size: 0.92rem;
    color: var(--text-secondary);
    flex: 1 1 200px;
}

.hosszu-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hosszu-input-field {
    width: 60px;
    padding: 0.4rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: center;
    outline: none;
    transition: border-color 0.2s ease;
}

.hosszu-input-field:focus {
    border-color: #a855f7;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.3);
}

.hosszu-input-field.correct {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.6) !important;
    color: #10b981 !important;
}

.hosszu-input-field.incorrect {
    background: rgba(244, 63, 94, 0.15) !important;
    border-color: rgba(244, 63, 94, 0.6) !important;
    color: #f43f5e !important;
}

.hosszu-input-correct-display {
    font-size: 0.85rem;
    color: #10b981;
    font-weight: 700;
}

/* ============================================================================ */
/* --- 12.0. Beírós Feladatok (Write-in Tasks) styles --- */
/* ============================================================================ */
.beiros-inputs-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    background: rgba(15, 23, 42, 0.25);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.2rem;
}

.beiros-input-item {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 0.8rem;
}

.beiros-input-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.beiros-input-label {
    font-size: 0.94rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.beiros-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.beiros-input-field {
    width: 120px;
    padding: 0.45rem 0.6rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.95rem;
    text-align: center;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.beiros-input-field:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.beiros-input-field.correct {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.6) !important;
    color: #10b981 !important;
    font-weight: bold;
}

.beiros-input-field.incorrect {
    background: rgba(244, 63, 94, 0.15) !important;
    border-color: rgba(244, 63, 94, 0.6) !important;
    color: #f43f5e !important;
    font-weight: bold;
}

.beiros-feedback-icon {
    font-size: 1.25rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.beiros-feedback-icon.correct {
    color: #10b981;
}

.beiros-feedback-icon.incorrect {
    color: #f43f5e;
}

.beiros-hint-text {
    font-size: 0.9rem;
    color: #10b981;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.08);
    border: 1px dashed rgba(16, 185, 129, 0.25);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    animation: fadeIn 0.3s ease;
}

.beiros-input-suffix {
    font-size: 0.92rem;
    color: var(--text-secondary);
}

/* Essay correct answer display */
.beiros-essay-correct-container {
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.beiros-essay-correct-title {
    font-size: 0.94rem;
    font-weight: bold;
    color: #10b981;
    margin-bottom: 0.5rem;
}

.beiros-essay-correct-body {
    font-size: 0.92rem;
    color: var(--text-primary);
    line-height: 1.6;
    font-style: italic;
    background: rgba(15, 23, 42, 0.3);
    padding: 0.8rem;
    border-radius: 8px;
    border-left: 3px solid #10b981;
}

/* Custom interactive tables for Beiros mode */
.beiros-vipt-table, .beiros-pht-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    margin-bottom: 1.2rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.beiros-vipt-table th, .beiros-vipt-table td,
.beiros-pht-table th, .beiros-pht-table td {
    padding: 0.6rem 0.8rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.88rem;
}

.beiros-vipt-table th, .beiros-pht-table th {
    background: rgba(15, 23, 42, 0.6);
    color: #3b82f6;
    font-weight: 700;
    font-size: 0.9rem;
}

.beiros-pht-table th {
    color: #a855f7; /* Branch prediction has a purple tint */
}

.beiros-vipt-table td.row-header, .beiros-pht-table td.row-header {
    background: rgba(15, 23, 42, 0.4);
    font-weight: 700;
    color: var(--text-secondary);
}

/* Mini table inputs */
.beiros-table-input {
    width: 65px;
    padding: 0.3rem 0.4rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.85rem;
    text-align: center;
    outline: none;
    transition: all 0.2s ease;
}

.beiros-table-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.25);
}

.beiros-table-input.correct {
    background: rgba(16, 185, 129, 0.18) !important;
    border-color: rgba(16, 185, 129, 0.6) !important;
    color: #10b981 !important;
    font-weight: bold;
}

.beiros-table-input.incorrect {
    background: rgba(244, 63, 94, 0.18) !important;
    border-color: rgba(244, 63, 94, 0.6) !important;
    color: #f43f5e !important;
    font-weight: bold;
}

/* Feedback icon in tables */
.beiros-table-feedback-icon {
    font-weight: bold;
    margin-left: 0.3rem;
    font-size: 1rem;
}

.beiros-table-feedback-icon.correct {
    color: #10b981;
}

.beiros-table-feedback-icon.incorrect {
    color: #f43f5e;
}

/* Hint text inside table cells */
.beiros-table-hint {
    display: block;
    font-size: 0.75rem;
    color: #10b981;
    font-weight: 600;
    margin-top: 0.2rem;
}

/* Inline reordering wrapper */
.beiros-reorder-input-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.2rem 0;
}

.beiros-reorder-dash {
    color: var(--text-secondary);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Pipeline table specific styling */
.beiros-pipeline-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    margin-bottom: 1.2rem;
    background: rgba(15, 23, 42, 0.35);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.beiros-pipeline-table th {
    background: rgba(15, 23, 42, 0.65);
    color: #10b981; /* green tint for pipeline */
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.5rem 0.4rem;
}

.beiros-pipeline-table td {
    padding: 0.4rem 0.3rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.beiros-pipeline-table td.row-header {
    background: rgba(15, 23, 42, 0.45);
    font-weight: bold;
    color: #3b82f6;
    font-family: monospace;
}

/* ============================================================================
   --- 13.0. Mobile Responsiveness Overrides ---
   ============================================================================ */
@media (max-width: 900px) {
    .mode-tabs-container {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
        width: 100%;
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }
    .mode-tabs-container::-webkit-scrollbar {
        display: none; /* Hide scrollbar for Chrome/Safari */
    }
    .mode-tabs {
        flex-wrap: nowrap;
        width: max-content;
    }
    .tab-btn {
        flex-shrink: 0;
        padding: 0.5rem 1rem;
        font-size: 0.82rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }
    header {
        padding: 1.2rem 1rem;
        margin-top: 1rem;
        margin-bottom: 1.5rem;
        border-radius: 16px;
    }
    .header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.2rem;
    }
    .stats-widget {
        width: 100%;
        justify-content: space-between;
        gap: 1rem;
    }
    .stat-item {
        flex: 1;
        min-width: 90px;
    }
    .stat-val {
        font-size: 1.5rem;
    }
    .overall-progress-header {
        font-size: 0.82rem;
    }
    .controls-section {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    .filter-group {
        width: 100%;
        justify-content: flex-start;
        gap: 0.5rem;
    }
    .filter-btn {
        padding: 0.5rem 0.9rem;
        font-size: 0.8rem;
        border-radius: 10px;
    }
    .toggle-wrapper {
        width: 100%;
        justify-content: space-between;
    }
    .hosszu-grid-box {
        flex: 1 1 100%;
        max-width: 100%;
        overflow-x: auto;
        padding: 1rem;
    }
    .hosszu-matrix th, .hosszu-matrix td {
        width: 38px;
        height: 38px;
        font-size: 0.78rem;
    }
    .hosszu-sched-container {
        padding: 1rem;
    }
    .hosszu-input-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .hosszu-input-wrapper {
        width: 100%;
        justify-content: space-between;
    }
    .beiros-input-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 0.6rem;
    }
    .beiros-input-field {
        width: 100%;
        max-width: 100%;
    }
    .beiros-input-suffix {
        text-align: right;
    }
    .dram-layout {
        grid-template-columns: 1fr;
    }
    .dram-card-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    .dram-table-container {
        padding: 0.8rem;
    }
    .algo-layout {
        grid-template-columns: 1fr;
    }
    .algo-table-wrapper {
        padding: 0.8rem;
    }
}

@media (max-width: 640px) {
    .quiz-card {
        padding: 1.2rem;
        border-radius: 16px;
    }
    .question-text {
        font-size: 1.15rem;
        margin-bottom: 1.2rem;
    }
    .option-item {
        padding: 0.9rem 1.1rem;
        border-radius: 12px;
    }
    .option-layout {
        flex-direction: column;
        align-items: stretch;
        gap: 0.8rem;
    }
    .choice-controls {
        width: 100%;
        gap: 0.5rem;
    }
    .choice-controls .btn-choice {
        flex: 1;
        text-align: center;
        padding: 0.55rem;
        font-size: 0.82rem;
    }
    .feedback-icon {
        margin-left: auto;
    }
}
