@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
    --bg-dark: #090d16;
    --bg-surface: rgba(18, 24, 38, 0.8);
    --bg-surface-hover: rgba(30, 41, 59, 0.85);
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.18);
    --border-glow: rgba(99, 102, 241, 0.4);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #818cf8;
    
    --accent-indigo: #6366f1;
    --accent-cyan: #38bdf8;
    --accent-green: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    
    --font-heading: 'Space Grotesk', -apple-system, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

html, body {
    width: 100vw;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(800px circle at 50% -10%, rgba(99, 102, 241, 0.18), transparent 75%),
        radial-gradient(600px circle at 90% 85%, rgba(56, 189, 248, 0.1), transparent 70%),
        radial-gradient(500px circle at 10% 80%, rgba(16, 185, 129, 0.06), transparent 70%);
    font-family: var(--font-body);
    color: var(--text-primary);
}

/* Custom Dark Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.8);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* App Layout - Fullscreen Main Viewport */
.app-layout {
    display: flex;
    width: 100vw;
    height: 100%;
    height: 100dvh;
    position: relative;
}

/* Mobile & Drawer Backdrop */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: rgba(9, 13, 22, 0.7);
    backdrop-filter: blur(12px);
    z-index: 150;
    display: none;
}

.sidebar-backdrop.show {
    display: block;
}

/* Sidebar Drawer Style */
.sidebar {
    position: fixed;
    top: 0;
    left: -330px;
    width: 310px;
    height: 100dvh;
    background: rgba(12, 17, 29, 0.95);
    backdrop-filter: blur(28px);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    z-index: 200;
    user-select: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.6);
}

.sidebar.open {
    transform: translateX(330px);
}

.sidebar-header {
    padding: 24px 20px 18px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.sidebar-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.progress-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.sidebar-nav-title {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    padding: 18px 20px 8px 20px;
}

.question-grid-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 20px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    align-content: start;
}

.nav-dot {
    height: 38px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-dot:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--border-highlight);
    transform: scale(1.04);
}

.nav-dot.active {
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    color: #ffffff;
    border-color: transparent;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
}

.nav-dot.starred {
    border-color: rgba(245, 158, 11, 0.6);
    color: var(--accent-amber);
}

.nav-dot.answered-correct {
    border-color: rgba(16, 185, 129, 0.6);
    color: var(--accent-green);
}

.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-btn-group {
    display: flex;
    gap: 8px;
    width: 100%;
}

.btn-sidebar-action {
    flex: 1;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--accent-amber);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sidebar-action:hover {
    background: rgba(245, 158, 11, 0.18);
}

.btn-correct-act {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.25);
    color: var(--accent-green);
}

.btn-correct-act:hover {
    background: rgba(16, 185, 129, 0.18);
}

.btn-reset-small {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-reset-small:hover {
    background: rgba(244, 63, 94, 0.15);
    color: var(--accent-rose);
    border-color: rgba(244, 63, 94, 0.3);
}

/* Main Viewport */
.main-content {
    width: 100vw;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Top Animated Progress Bar */
.top-progress-wrapper {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.04);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
}

.top-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #38bdf8, #6366f1, #10b981);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Floating Top Navbar */
.top-bar {
    height: 60px;
    margin: 16px 24px 0 24px;
    padding: 0 24px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(18, 24, 38, 0.8);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 20;
    flex-shrink: 0;
}

.top-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-menu-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-highlight);
}

.deck-tag {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    padding: 5px 12px;
    border-radius: 8px;
}

.header-progress-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-cyan);
}

.top-actions {
    display: flex;
    gap: 8px;
}

.btn-top {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-top:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--border-highlight);
}

.btn-top-study {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.25);
    color: var(--accent-cyan);
}

.btn-top-study:hover {
    background: rgba(56, 189, 248, 0.2);
}

/* Stage & Cards Viewport */
.deck-stage {
    flex: 1 1 0%;
    min-height: 0;
    position: relative;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide {
    display: none;
    width: 100%;
    height: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.slide.active {
    display: flex;
}

/* Cover Slide */
.cover-container {
    max-width: 780px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 48px 40px;
    background: var(--bg-surface);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 30px rgba(99, 102, 241, 0.05);
}

.hero-badge {
    color: var(--accent-cyan);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.12em;
    padding: 6px 16px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 20px;
    margin-bottom: 20px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 32px;
    max-width: 580px;
}

.btn-start-hero {
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    padding: 16px 36px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.3);
}

.btn-start-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(56, 189, 248, 0.45);
}

.hero-shortcuts-hint {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 28px;
}

.shortcut-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    padding: 6px 12px;
    border-radius: 20px;
}

kbd {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Quiz Card Container */
.quiz-container {
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
    background: var(--bg-surface);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.quiz-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(56, 189, 248, 0.2);
}

.stt-pill {
    font-family: var(--font-heading);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 4px 10px;
    border-radius: 8px;
}

.card-quick-actions {
    display: flex;
    gap: 8px;
}

.btn-quick-star, .btn-quick-done {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-quick-star.starred {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

.btn-quick-done.completed {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.question-card-title {
    font-family: var(--font-body);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.55;
    color: #f8fafc;
    letter-spacing: -0.01em;
}

/* Accordion Buttons & Panels */
.card-accordion-bar {
    display: flex;
    gap: 10px;
    margin-top: -4px;
}

.btn-accordion-toggle {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-accordion-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: var(--border-highlight);
}

.btn-accordion-trans:hover {
    border-color: rgba(56, 189, 248, 0.4);
    color: var(--accent-cyan);
}

.btn-accordion-hint:hover {
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

.panel-trans, .panel-hint {
    display: none;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 15px;
    line-height: 1.6;
    animation: fadeInAccordion 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInAccordion {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel-trans.show, .panel-hint.show {
    display: block;
}

.panel-trans {
    background: rgba(56, 189, 248, 0.05);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: #e0f2fe;
}

.panel-hint {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fef08a;
}

.panel-hint-body {
    margin-top: 6px;
    font-size: 14px;
    color: #fef9c3;
}

/* Options Grid Layout */
.options-grid-modern {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}

.opt-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.opt-card:hover {
    background: var(--bg-surface-hover);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.opt-radio {
    display: none !important;
}

.opt-key {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.opt-card:hover .opt-key {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--border-highlight);
}

.opt-val {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-primary);
    flex: 1;
}

.opt-card.selected {
    border-color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.1);
}

.opt-card.selected .opt-key {
    background: var(--accent-cyan);
    color: #0f172a;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.opt-card.correct {
    border-color: var(--accent-green) !important;
    background: rgba(16, 185, 129, 0.12) !important;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.opt-card.correct .opt-key {
    background: var(--accent-green);
    color: #ffffff;
    border-color: transparent;
}

.opt-card.wrong {
    border-color: var(--accent-rose) !important;
    background: rgba(244, 63, 94, 0.12) !important;
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.15);
}

.opt-card.wrong .opt-key {
    background: var(--accent-rose);
    color: #ffffff;
    border-color: transparent;
}

/* Floating Bottom Control Bar */
.bottom-bar {
    height: 60px;
    margin: 0 24px 16px 24px;
    padding: 0 24px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(18, 24, 38, 0.8);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 20;
    flex-shrink: 0;
}

.nav-control-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 9px 20px;
    border-radius: 10px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-highlight);
}

.btn-primary-nav {
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    color: #ffffff;
    border: none;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.3);
}

.btn-primary-nav:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45);
}

.kbd-sub {
    font-size: 11px;
    opacity: 0.6;
    margin-left: 4px;
    font-family: var(--font-heading);
}

.jump-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    padding: 4px 12px;
    border-radius: 10px;
}

.jump-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.jump-num-input {
    width: 46px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    outline: none;
}

.btn-reveal-inline {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reveal-inline:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
}

/* Quick Study Overlay */
.quick-study-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: rgba(9, 13, 22, 0.95);
    backdrop-filter: blur(28px);
    z-index: 200;
    display: none;
    flex-direction: column;
}

.quick-study-overlay.open {
    display: flex;
}

.quick-study-header {
    padding: 20px 32px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(18, 24, 38, 0.8);
}

.quick-study-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.quick-study-header-left h2 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
}

.quick-study-count-badge {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: var(--accent-cyan);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.quick-study-search-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

#quickStudySearchInput {
    width: 280px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    padding: 10px 16px;
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

#quickStudySearchInput:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.quick-study-filters {
    display: flex;
    gap: 6px;
}

.btn-qs-filter {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-qs-filter.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.quick-study-close-btn {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: var(--accent-rose);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-study-close-btn:hover {
    background: rgba(244, 63, 94, 0.25);
}

.quick-study-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.qs-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.qs-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.qs-question-text {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
}

.qs-stt-badge {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--accent-cyan);
    margin-right: 6px;
}

.qs-card-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.qs-options-inline-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.qs-opt-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.qs-opt-chip.is-correct {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #ffffff;
    font-weight: 600;
}

.qs-chip-key {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--accent-cyan);
}

.qs-hint-inline {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fef08a;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
}

/* Modals */
.custom-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: rgba(9, 13, 22, 0.8);
    backdrop-filter: blur(16px);
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
}

.custom-modal-backdrop.show {
    display: flex;
}

.custom-modal-card {
    background: #0f172a;
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 28px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}

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

.custom-modal-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
}

.custom-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
}

.custom-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.modal-btn-confirm {
    background: linear-gradient(135deg, #38bdf8, #6366f1);
    border: none;
    color: #ffffff;
    font-weight: 700;
}

/* Toast Container & Notification System */
.toast-container {
    position: fixed;
    bottom: 84px;
    right: 28px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.custom-toast {
    background: rgba(18, 24, 38, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 14px;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(40px) scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.custom-toast.show {
    transform: translateX(0) scale(1);
    opacity: 1;
}

.custom-toast.toast-info {
    border-color: rgba(56, 189, 248, 0.4);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(56, 189, 248, 0.12));
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.15);
}

.custom-toast.toast-success {
    border-color: rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(16, 185, 129, 0.12));
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(16, 185, 129, 0.15);
}

.custom-toast.toast-error {
    border-color: rgba(244, 63, 94, 0.4);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(244, 63, 94, 0.12));
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(244, 63, 94, 0.15);
}

.custom-toast.toast-warning {
    border-color: rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(245, 158, 11, 0.12));
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(245, 158, 11, 0.15);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .top-bar {
        margin: 8px 10px 0 10px;
        padding: 0 10px;
        height: 52px;
        gap: 6px;
    }

    .top-left {
        gap: 6px;
        min-width: 0;
        flex-shrink: 1;
    }

    .btn-menu-toggle {
        width: 34px;
        height: 34px;
        font-size: 15px;
        flex-shrink: 0;
    }

    .deck-tag {
        font-size: 11px;
        padding: 3px 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }

    .top-center {
        display: none;
    }

    .top-actions {
        gap: 4px;
        flex-shrink: 0;
    }

    .btn-top {
        padding: 5px 8px;
        font-size: 11.5px;
        border-radius: 6px;
    }

    .deck-stage {
        padding: 10px 8px;
    }

    .quiz-container {
        padding: 16px 14px;
        gap: 14px;
        border-radius: 16px;
    }

    .quiz-card-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .question-card-title {
        font-size: 15.5px;
        line-height: 1.5;
    }

    .card-accordion-bar {
        flex-wrap: wrap;
        gap: 6px;
    }

    .btn-accordion-toggle {
        padding: 5px 10px;
        font-size: 11.5px;
    }

    .opt-card {
        padding: 12px 14px;
        gap: 12px;
        font-size: 13.5px;
        border-radius: 10px;
    }

    .opt-key {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .bottom-bar {
        margin: 0 10px 8px 10px;
        padding: 0 8px;
        height: 52px;
        gap: 4px;
        justify-content: space-between;
    }

    .kbd-sub {
        display: none;
    }

    .nav-control-btn {
        padding: 7px 10px;
        font-size: 12px;
        border-radius: 8px;
        white-space: nowrap;
    }

    .jump-control {
        padding: 3px 6px;
        gap: 4px;
        border-radius: 8px;
    }

    .jump-label {
        display: none;
    }

    .jump-num-input {
        width: 32px;
        font-size: 13px;
    }

    .btn-reveal-inline {
        padding: 4px 8px;
        font-size: 11px;
        white-space: nowrap;
    }

    .toast-container {
        bottom: 66px;
        right: 12px;
        left: 12px;
    }

    .custom-toast {
        padding: 10px 14px;
        font-size: 12.5px;
    }
}

@media (max-width: 480px) {
    .deck-tag {
        display: none;
    }

    .btn-top {
        padding: 4px 6px;
        font-size: 11px;
    }

    .nav-control-btn {
        padding: 6px 8px;
        font-size: 11.5px;
    }

    .btn-reveal-inline {
        padding: 4px 6px;
        font-size: 10.5px;
    }
}
