/* ============================================
   JavaPrep Pro — Design System v3
   All 12 improvements + theme toggle
   ============================================ */

/* ===== THEME VARIABLES ===== */
[data-theme="dark"] {
    --bg-0: #0c0f14;
    --bg-1: #12161e;
    --bg-2: #181e28;
    --bg-3: #1f2733;
    --bg-hover: #242d3a;
    --bg-surface: #161c26;
    --text-0: #e8ecf1;
    --text-1: #b0b8c4;
    --text-2: #7a8594;
    --text-3: #525c69;
    --blue: #4f8ff7;
    --blue-dim: rgba(79, 143, 247, 0.12);
    --green: #34c77b;
    --green-dim: rgba(52, 199, 123, 0.1);
    --red: #e85a5a;
    --red-dim: rgba(232, 90, 90, 0.1);
    --amber: #e8a735;
    --amber-dim: rgba(232, 167, 53, 0.1);
    --purple: #9b6dff;
    --border: rgba(255, 255, 255, 0.06);
    --border-active: rgba(79, 143, 247, 0.3);
    --topbar-bg: rgba(12, 15, 20, 0.85);
}

[data-theme="light"] {
    --bg-0: #f5f6f8;
    --bg-1: #ffffff;
    --bg-2: #eef0f4;
    --bg-3: #dfe3ea;
    --bg-hover: #e8ecf2;
    --bg-surface: #ffffff;
    --text-0: #1a1e26;
    --text-1: #3d4654;
    --text-2: #6b7685;
    --text-3: #9ba5b4;
    --blue: #3b7de8;
    --blue-dim: rgba(59, 125, 232, 0.1);
    --green: #22a866;
    --green-dim: rgba(34, 168, 102, 0.08);
    --red: #d44444;
    --red-dim: rgba(212, 68, 68, 0.08);
    --amber: #cc8c1e;
    --amber-dim: rgba(204, 140, 30, 0.08);
    --purple: #7c4dff;
    --border: rgba(0, 0, 0, 0.08);
    --border-active: rgba(59, 125, 232, 0.3);
    --topbar-bg: rgba(245, 246, 248, 0.9);
}

:root {
    --sidebar-w: 272px;
    --topbar-h: 52px;
    --radius: 8px;
    --radius-lg: 12px;
}

/* ===== RESET ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-0);
    color: var(--text-0);
    display: flex;
    min-height: 100vh;
    line-height: 1.55;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s, color 0.3s;
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-3);
    border-radius: 3px;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: var(--bg-1);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease, background 0.3s;
}

.sidebar-header {
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 20px;
}

.logo-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-0);
    letter-spacing: -0.3px;
}

.logo-sub {
    font-size: 9px;
    color: var(--text-3);
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-2);
    font-size: 14px;
    cursor: pointer;
}

.icon-btn {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-2);
    font-size: 14px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.12s;
}

.icon-btn:hover {
    background: var(--bg-hover);
    color: var(--text-0);
}

/* Progress */
.sidebar-progress {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}

.progress-circle {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.progress-circle svg {
    transform: rotate(-90deg);
}

.progress-bg {
    fill: none;
    stroke: var(--bg-3);
    stroke-width: 3;
}

.progress-fill {
    fill: none;
    stroke: var(--blue);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease;
}

.progress-text {
    fill: var(--text-0);
    font-size: 8px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: central;
    transform: rotate(90deg);
    transform-origin: 18px 18px;
}

.progress-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.progress-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-0);
}

.progress-detail {
    font-size: 11px;
    color: var(--text-3);
}

/* Search */
.sidebar-search {
    padding: 8px 12px;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 10px;
    font-size: 11px;
    opacity: 0.4;
}

.search-wrapper input {
    width: 100%;
    padding: 7px 10px 7px 28px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-0);
    font-family: inherit;
    font-size: 12px;
    outline: none;
    transition: border-color 0.15s;
}

.search-wrapper input:focus {
    border-color: var(--blue);
}

.search-wrapper input::placeholder {
    color: var(--text-3);
}

.search-kbd {
    position: absolute;
    right: 6px;
    font-family: inherit;
    font-size: 9px;
    color: var(--text-3);
    background: var(--bg-3);
    padding: 1px 5px;
    border-radius: 3px;
    border: 1px solid var(--border);
}

/* Nav */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.nav-category {
    margin-bottom: 2px;
}

.nav-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 16px;
    cursor: pointer;
    user-select: none;
}

.nav-category-header:hover {
    background: var(--bg-2);
}

.nav-category-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-3);
}

.nav-category-arrow {
    font-size: 9px;
    color: var(--text-3);
    transition: transform 0.15s;
}

.nav-category.expanded .nav-category-arrow {
    transform: rotate(90deg);
}

.nav-topic-list {
    display: none;
    padding: 0 6px 2px;
}

.nav-category.expanded .nav-topic-list {
    display: block;
}

.nav-topic {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-1);
    transition: all 0.12s;
}

.nav-topic:hover {
    background: var(--bg-2);
    color: var(--text-0);
}

.nav-topic.active {
    background: var(--blue-dim);
    color: var(--blue);
}

.nav-topic-icon {
    font-size: 13px;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
}

.nav-topic-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.nav-topic-count {
    font-size: 10px;
    color: var(--text-3);
    background: var(--bg-3);
    padding: 1px 5px;
    border-radius: 8px;
    font-weight: 600;
}

.nav-topic-mastery {
    width: 22px;
    height: 2px;
    background: var(--bg-3);
    border-radius: 1px;
    overflow: hidden;
    flex-shrink: 0;
}

.nav-topic-mastery-fill {
    height: 100%;
    background: var(--green);
    border-radius: 1px;
    transition: width 0.4s;
}

/* Sidebar footer */
.sidebar-footer {
    border-top: 1px solid var(--border);
}

.sidebar-stats {
    display: flex;
    justify-content: space-around;
    padding: 10px 12px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.stat-icon {
    font-size: 13px;
}

.stat-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-0);
}

.stat-label {
    font-size: 8px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.sidebar-actions {
    display: flex;
    gap: 4px;
    padding: 6px 12px 10px;
}

.sidebar-action-btn {
    flex: 1;
    padding: 5px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-2);
    font-family: inherit;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.12s;
    text-align: center;
}

.sidebar-action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-0);
}

/* ===== MAIN ===== */
.main {
    margin-left: var(--sidebar-w);
    margin-right: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s, margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.ai-open .main {
    margin-right: 400px;
}

.topbar {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 10px;
    border-bottom: 1px solid var(--border);
    background: var(--topbar-bg);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: background 0.3s;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--text-1);
    border-radius: 1px;
}

.topbar-title {
    flex: 1;
}

.topbar-title h2 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-0);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Pomodoro */
.pomodoro {
    position: relative;
}

.pomo-btn {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-1);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.12s;
    white-space: nowrap;
}

.pomo-btn:hover {
    background: var(--bg-hover);
}

.pomo-btn.running {
    border-color: var(--red);
    color: var(--red);
}

.pomo-btn.break {
    border-color: var(--green);
    color: var(--green);
}

.pomo-controls {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px;
    display: flex;
    gap: 4px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.pomo-ctrl {
    padding: 4px 10px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-1);
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.12s;
}

.pomo-ctrl:hover {
    background: var(--bg-hover);
    color: var(--text-0);
}

/* Mode Tabs */
.mode-switcher {
    display: flex;
    gap: 1px;
    background: var(--bg-2);
    padding: 3px;
    border-radius: 6px;
}

.mode-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-2);
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.12s;
    white-space: nowrap;
}

.mode-btn:hover {
    color: var(--text-1);
}

.mode-btn.active {
    background: var(--bg-3);
    color: var(--text-0);
}

.mode-icon {
    font-size: 11px;
}

/* Views */
.view {
    display: none;
    padding: 16px;
    flex: 1;
}

.view.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===== DASHBOARD ===== */
.dashboard-hero {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.gradient-text {
    color: var(--blue);
}

.hero-subtitle {
    color: var(--text-2);
    font-size: 13px;
    max-width: 520px;
    margin-bottom: 14px;
}

.hero-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 16px;
}

.method-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-1);
}

.hero-actions {
    display: flex;
    gap: 8px;
}

.hero-btn {
    padding: 8px 16px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-1);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s;
}

.hero-btn:hover {
    background: var(--bg-hover);
    color: var(--text-0);
}

.hero-btn.primary {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.hero-btn.primary:hover {
    opacity: 0.9;
}

.hero-btn span {
    font-size: 11px;
    color: var(--text-3);
}

/* Activity Chart */
.activity-chart {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
    padding: 8px 0;
    max-width: 100%;
}

.chart-day {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: var(--bg-3);
    transition: background 0.15s;
}

.chart-day.l1 {
    background: rgba(79, 143, 247, 0.25);
}

.chart-day.l2 {
    background: rgba(79, 143, 247, 0.45);
}

.chart-day.l3 {
    background: rgba(79, 143, 247, 0.65);
}

.chart-day.l4 {
    background: var(--blue);
}

.chart-day[title] {
    cursor: help;
}

.dashboard-section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-0);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}

.category-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    cursor: pointer;
    transition: all 0.15s;
}

.category-card:hover {
    background: var(--bg-hover);
    border-color: var(--border-active);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.card-icon {
    font-size: 18px;
}

.card-level {
    font-size: 9px;
    font-weight: 600;
    color: var(--blue);
    background: var(--blue-dim);
    padding: 2px 6px;
    border-radius: 4px;
}

.card-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--text-0);
}

.card-category {
    font-size: 10px;
    color: var(--text-3);
    margin-bottom: 8px;
}

.card-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-count {
    font-size: 10px;
    color: var(--text-3);
}

.card-mastery-bar {
    width: 50px;
    height: 2px;
    background: var(--bg-3);
    border-radius: 1px;
    overflow: hidden;
}

.card-mastery-fill {
    height: 100%;
    background: var(--green);
    border-radius: 1px;
    transition: width 0.4s;
}

/* Due cards */
.due-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 6px;
}

.due-card {
    background: var(--bg-surface);
    border: 1px solid var(--amber-dim);
    border-radius: var(--radius);
    padding: 10px;
    cursor: pointer;
}

.due-card:hover {
    background: var(--amber-dim);
}

/* ===== STUDY VIEW ===== */
.study-container {
    max-width: 760px;
    margin: 0 auto;
}

.study-header {
    margin-bottom: 16px;
}

.study-topic-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.study-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.study-meta {
    display: flex;
    gap: 12px;
    color: var(--text-3);
    font-size: 12px;
}

/* Difficulty filter */
.study-filters {
    display: flex;
    gap: 4px;
}

.filter-btn {
    padding: 3px 10px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text-2);
    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s;
}

.filter-btn:hover {
    color: var(--text-0);
}

.filter-btn.active {
    background: var(--blue-dim);
    border-color: var(--blue);
    color: var(--blue);
}

.filter-btn[data-filter="hard"].active {
    background: var(--red-dim);
    border-color: var(--red);
    color: var(--red);
}

.filter-btn[data-filter="medium"].active {
    background: var(--amber-dim);
    border-color: var(--amber);
    color: var(--amber);
}

.filter-btn[data-filter="easy"].active {
    background: var(--green-dim);
    border-color: var(--green);
    color: var(--green);
}

.study-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.study-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.15s;
}

.study-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
}

.study-card.hidden {
    display: none;
}

.study-card-header {
    padding: 12px 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.study-card-num {
    background: var(--bg-3);
    color: var(--text-1);
    font-size: 10px;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    flex-shrink: 0;
}

.study-card-question {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-0);
    flex: 1;
    line-height: 1.5;
}

.study-card-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.study-bookmark-btn {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    opacity: 0.3;
    transition: opacity 0.12s;
    padding: 0 2px;
}

.study-bookmark-btn.bookmarked {
    opacity: 1;
}

.study-card-toggle {
    color: var(--text-3);
    font-size: 13px;
    transition: transform 0.15s;
    flex-shrink: 0;
    margin-top: 2px;
}

.study-card.expanded .study-card-toggle {
    transform: rotate(180deg);
}

.study-card-answer {
    display: none;
    padding: 0 14px 14px 46px;
    color: var(--text-1);
    font-size: 13px;
    line-height: 1.7;
}

.study-card.expanded .study-card-answer {
    display: block;
}

.study-card-answer p {
    margin-bottom: 6px;
}

.study-card-answer pre,
.study-card-answer pre[class*="language-"] {
    background: var(--bg-2) !important;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 6px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.5;
    border: 1px solid var(--border);
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===== FLASHCARD VIEW ===== */
.flashcard-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.flashcard-progress {
    text-align: center;
}

.flashcard-counter {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
    margin-bottom: 6px;
}

.flashcard-progress-bar {
    width: 100%;
    height: 3px;
    background: var(--bg-3);
    border-radius: 2px;
    overflow: hidden;
}

.flashcard-progress-fill {
    height: 100%;
    background: var(--blue);
    border-radius: 2px;
    transition: width 0.25s;
}

.flashcard-deck {
    perspective: 1000px;
    min-height: 280px;
}

.flashcard {
    width: 100%;
    min-height: 280px;
    cursor: pointer;
}

.flashcard-inner {
    width: 100%;
    min-height: 280px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.flashcard.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    min-height: 280px;
    backface-visibility: hidden;
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.flashcard-front {
    background: var(--bg-surface);
    border: 1px solid var(--border);
}

.flashcard-back {
    background: var(--bg-2);
    border: 1px solid var(--border-active);
    transform: rotateY(180deg);
    align-items: flex-start;
    text-align: left;
    overflow-y: auto;
    max-height: 440px;
}

.flashcard-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--blue);
    margin-bottom: 14px;
    align-self: center;
}

.flashcard-front .flashcard-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-0);
    line-height: 1.5;
    max-width: 480px;
}

.flashcard-back .flashcard-text {
    font-size: 13px;
    color: var(--text-1);
    line-height: 1.7;
    width: 100%;
    white-space: pre-wrap;
    word-break: break-word;
}

.flashcard-hint {
    margin-top: 16px;
    font-size: 11px;
    color: var(--text-3);
}

.flashcard-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.fc-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-1);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.12s;
}

.fc-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-active);
    color: var(--text-0);
}

.fc-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.fc-confidence {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.conf-label {
    font-size: 10px;
    color: var(--text-3);
}

.conf-buttons {
    display: flex;
    gap: 5px;
}

.conf-btn {
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-surface);
    color: var(--text-1);
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.12s;
}

.conf-hard:hover {
    border-color: var(--red);
    background: var(--red-dim);
    color: var(--red);
}

.conf-medium:hover {
    border-color: var(--amber);
    background: var(--amber-dim);
    color: var(--amber);
}

.conf-easy:hover {
    border-color: var(--green);
    background: var(--green-dim);
    color: var(--green);
}

.flashcard-actions {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.action-btn {
    padding: 6px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-1);
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.12s;
}

.action-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-active);
    color: var(--text-0);
}

.action-btn.primary {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
}

.action-btn.primary:hover {
    opacity: 0.9;
}

.bookmark-toggle.bookmarked {
    border-color: var(--amber);
    color: var(--amber);
    background: var(--amber-dim);
}

/* ===== QUIZ VIEW ===== */
.quiz-container {
    max-width: 640px;
    margin: 0 auto;
}

.quiz-setup-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
}

.quiz-setup-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
}

.quiz-option {
    margin-bottom: 20px;
}

.quiz-option label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 8px;
}

.quiz-num-btns {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
}

.qnum-btn,
.qtype-btn {
    padding: 6px 14px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-1);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s;
}

.qnum-btn:hover,
.qtype-btn:hover {
    border-color: var(--blue);
}

.qnum-btn.active,
.qtype-btn.active {
    background: var(--blue-dim);
    border-color: var(--blue);
    color: var(--blue);
}

.quiz-start-btn {
    padding: 9px 32px;
    background: var(--blue);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.12s;
}

.quiz-start-btn:hover {
    opacity: 0.9;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--text-3);
    font-weight: 600;
}

.quiz-progress-bar {
    width: 100%;
    height: 3px;
    background: var(--bg-3);
    border-radius: 2px;
    margin-bottom: 16px;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: var(--blue);
    border-radius: 2px;
    transition: width 0.25s;
}

.quiz-question-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.quiz-question-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-0);
    margin-bottom: 16px;
    line-height: 1.5;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quiz-option-btn {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-1);
    font-family: inherit;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.12s;
    width: 100%;
    line-height: 1.5;
}

.quiz-option-btn:hover:not(.disabled) {
    border-color: var(--border-active);
    background: var(--blue-dim);
    color: var(--text-0);
}

.quiz-option-btn .opt-letter {
    width: 22px;
    height: 22px;
    background: var(--bg-3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 10px;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.quiz-option-btn .opt-text {
    flex: 1;
    padding-top: 1px;
}

.quiz-option-btn.correct {
    border-color: var(--green);
    background: var(--green-dim);
    color: var(--green);
}

.quiz-option-btn.correct .opt-letter {
    background: var(--green);
    color: #fff;
    border-color: var(--green);
}

.quiz-option-btn.wrong {
    border-color: var(--red);
    background: var(--red-dim);
    color: var(--red);
}

.quiz-option-btn.wrong .opt-letter {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

.quiz-option-btn.disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

/* Fill in blank */
.quiz-fill-blank {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.quiz-fill-blank input {
    flex: 1;
    padding: 10px 12px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-0);
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.quiz-fill-blank input:focus {
    border-color: var(--blue);
}

.quiz-feedback {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-top: 10px;
    text-align: center;
}

.feedback-icon {
    font-size: 28px;
    margin-bottom: 4px;
}

.feedback-text {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feedback-explanation {
    font-size: 12px;
    color: var(--text-1);
    text-align: left;
    line-height: 1.6;
    max-height: 140px;
    overflow-y: auto;
    padding: 8px;
    background: var(--bg-2);
    border-radius: 6px;
    margin-bottom: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.quiz-next-btn {
    padding: 7px 20px;
    background: var(--blue);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.12s;
}

.quiz-next-btn:hover {
    opacity: 0.9;
}

/* Results */
.results-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
}

.results-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

.results-score-circle {
    width: 90px;
    height: 90px;
    margin: 0 auto 16px;
}

.results-score-circle svg {
    transform: rotate(-90deg);
}

.results-fill {
    fill: none;
    stroke: var(--blue);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.8s;
}

.results-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
}

.result-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rs-num {
    font-size: 18px;
    font-weight: 700;
}

.result-stat.correct .rs-num {
    color: var(--green);
}

.result-stat.wrong .rs-num {
    color: var(--red);
}

.result-stat.time .rs-num {
    color: var(--blue);
}

.rs-label {
    font-size: 9px;
    color: var(--text-3);
    text-transform: uppercase;
}

.results-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 12px;
}

.results-review {
    text-align: left;
    margin-top: 10px;
    max-height: 350px;
    overflow-y: auto;
}

.review-item {
    background: var(--bg-2);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 6px;
    border-left: 3px solid var(--green);
}

.review-item.wrong {
    border-left-color: var(--red);
}

.review-item-q {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-0);
    margin-bottom: 4px;
}

.review-item-a {
    font-size: 11px;
    color: var(--text-1);
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===== SEARCH OVERLAY ===== */
.search-overlay {
    position: fixed;
    top: 0;
    left: var(--sidebar-w);
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 200;
    display: flex;
    justify-content: center;
    padding-top: 50px;
}

.search-results-container {
    width: 100%;
    max-width: 560px;
    max-height: 65vh;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.search-results-header h3 {
    font-size: 13px;
    font-weight: 600;
}

.close-search {
    background: none;
    border: none;
    color: var(--text-2);
    font-size: 14px;
    cursor: pointer;
}

.search-results-list {
    overflow-y: auto;
    padding: 6px;
    flex: 1;
}

.search-result-item {
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 2px;
}

.search-result-item:hover {
    background: var(--bg-2);
}

.search-result-topic {
    font-size: 9px;
    color: var(--blue);
    font-weight: 600;
    margin-bottom: 2px;
}

.search-result-question {
    font-size: 12px;
    color: var(--text-0);
    font-weight: 500;
}

mark {
    background: rgba(79, 143, 247, 0.25);
    color: var(--text-0);
    padding: 0 2px;
    border-radius: 2px;
}

/* ===== KEYBOARD SHORTCUTS MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 420px;
    max-width: 90vw;
    max-height: 80vh;
    overflow: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 14px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-2);
    font-size: 16px;
    cursor: pointer;
}

.modal-body {
    padding: 14px 18px;
}

.shortcut-group {
    margin-bottom: 14px;
}

.shortcut-group h4 {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.shortcut-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.shortcut-row kbd {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-1);
    min-width: 36px;
    text-align: center;
}

.shortcut-row span {
    font-size: 12px;
    color: var(--text-1);
}

/* Mix header */
.mix-header {
    text-align: center;
    margin-bottom: 4px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    }

    .sidebar-close {
        display: block;
    }

    .main {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .search-overlay {
        left: 0;
    }

    .mode-btn {
        padding: 4px 6px;
        font-size: 10px;
    }

    .study-header-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .view {
        padding: 10px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        padding: 16px;
    }

    .hero-title {
        font-size: 16px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .flashcard-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .fc-confidence {
        order: 3;
        width: 100%;
    }
}

/* ===== PRINT ===== */
@media print {

    .sidebar,
    .topbar,
    .flashcard-controls,
    .flashcard-actions,
    .mode-switcher,
    .pomodoro,
    .quiz-feedback,
    .quiz-setup,
    .search-overlay,
    .modal-overlay,
    .sidebar-footer {
        display: none !important;
    }

    .main {
        margin-left: 0 !important;
    }

    .view {
        display: block !important;
        padding: 0 !important;
    }

    .study-card {
        break-inside: avoid;
        border: 1px solid #ccc !important;
        margin-bottom: 8px;
    }

    .study-card-answer {
        display: block !important;
    }

    .study-card-toggle {
        display: none;
    }

    body {
        background: #fff;
        color: #000;
        font-size: 12px;
    }

    .study-card-num {
        background: #eee !important;
        color: #333 !important;
    }

    .study-filters {
        display: none;
    }
}

/* ===== AI CHAT PANEL ===== */
.ai-chat-panel {
    position: fixed;
    right: -400px;
    top: 0;
    bottom: 0;
    width: 400px;
    background: var(--bg-1);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 250;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.ai-open .ai-chat-panel {
    right: 0;
}

.ai-chat-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-chat-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-chat-title span {
    font-size: 20px;
}

.ai-chat-title h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-0);
}

.ai-provider-label {
    font-size: 10px;
    color: var(--text-3);
}

.ai-chat-header-actions {
    display: flex;
    gap: 4px;
}

.ai-chat-context {
    padding: 6px 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-2);
    font-size: 11px;
    color: var(--text-2);
}

.ai-context-icon {
    font-size: 10px;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-welcome {
    text-align: center;
    padding: 30px 16px;
}

.ai-welcome-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.ai-welcome h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-0);
}

.ai-welcome p {
    font-size: 12px;
    color: var(--text-2);
    margin-bottom: 14px;
}

.ai-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}

.ai-suggestion {
    padding: 5px 10px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 10px;
    color: var(--text-1);
    cursor: pointer;
    transition: all 0.12s;
}

.ai-suggestion:hover {
    border-color: var(--blue);
    color: var(--blue);
    background: var(--blue-dim);
}

.ai-msg {
    max-width: 95%;
    animation: fadeIn 0.2s ease;
}

.ai-msg.user {
    align-self: flex-end;
}

.ai-msg.assistant {
    align-self: flex-start;
}

.ai-msg-bubble {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    line-height: 1.6;
}

.ai-msg.user .ai-msg-bubble {
    background: var(--blue);
    color: #fff;
    border-bottom-right-radius: 2px;
}

.ai-msg.assistant .ai-msg-bubble {
    background: var(--bg-2);
    color: var(--text-1);
    border-bottom-left-radius: 2px;
    border: 1px solid var(--border);
}

.ai-msg.assistant .ai-msg-bubble p {
    margin-bottom: 6px;
}

.ai-msg.assistant .ai-msg-bubble p:last-child {
    margin-bottom: 0;
}

.ai-msg.assistant .ai-msg-bubble code {
    background: var(--bg-3);
    padding: 1px 4px;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
}

.ai-msg.assistant .ai-msg-bubble pre {
    background: var(--bg-3);
    padding: 8px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 6px 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    line-height: 1.4;
    border: 1px solid var(--border);
}

.ai-msg.assistant .ai-msg-bubble ul,
.ai-msg.assistant .ai-msg-bubble ol {
    padding-left: 16px;
    margin: 4px 0;
}

.ai-msg.assistant .ai-msg-bubble li {
    margin-bottom: 2px;
}

.ai-msg.assistant .ai-msg-bubble strong {
    color: var(--text-0);
}

.ai-msg-label {
    font-size: 9px;
    color: var(--text-3);
    margin-bottom: 2px;
    padding: 0 4px;
}

.ai-msg.user .ai-msg-label {
    text-align: right;
}

/* Typing indicator */
.ai-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
}

.ai-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-3);
    animation: typingBounce 1.2s infinite;
}

.ai-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.3;
    }

    30% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.ai-chat-input-area {
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 6px;
    align-items: flex-end;
}

.ai-chat-input-area textarea {
    flex: 1;
    padding: 8px 10px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-0);
    font-family: inherit;
    font-size: 12px;
    outline: none;
    resize: none;
    max-height: 100px;
    line-height: 1.4;
}

.ai-chat-input-area textarea:focus {
    border-color: var(--blue);
}

.ai-chat-input-area textarea::placeholder {
    color: var(--text-3);
}

.ai-stt-btn {
    width: 34px;
    height: 34px;
    background: var(--bg-3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-0);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ai-stt-btn:hover {
    background: var(--bg-hover);
}

.ai-stt-btn.recording {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
    animation: pulse 1.5s infinite;
}

.ai-send-btn {
    width: 34px;
    height: 34px;
    background: var(--blue);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.12s;
    flex-shrink: 0;
}

.ai-send-btn:hover {
    opacity: 0.85;
}

.ai-send-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Floating AI Button */
.ai-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--blue);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(79, 143, 247, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: fabPulse 3s infinite;
}

.ai-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(79, 143, 247, 0.5);
}

.ai-fab.hidden {
    display: none;
}

@keyframes fabPulse {

    0%,
    100% {
        box-shadow: 0 4px 16px rgba(79, 143, 247, 0.4);
    }

    50% {
        box-shadow: 0 4px 24px rgba(79, 143, 247, 0.6);
    }
}

/* AI Settings modal extras */
.ai-setting-group {
    margin-bottom: 14px;
}

.ai-setting-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 5px;
}

.ai-select,
.ai-input {
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-0);
    font-family: inherit;
    font-size: 12px;
    outline: none;
}

.ai-select:focus,
.ai-input:focus {
    border-color: var(--blue);
}

.ai-select option {
    background: var(--bg-2);
    color: var(--text-0);
}

.ai-key-row {
    display: flex;
    gap: 4px;
}

.ai-key-row .ai-input {
    flex: 1;
}

.ai-help-text {
    font-size: 10px;
    color: var(--text-3);
    margin-top: 4px;
}

.ai-help-text a {
    color: var(--blue);
    text-decoration: none;
}

.ai-setting-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 16px;
}

.ai-test-result {
    margin-top: 10px;
    padding: 8px;
    border-radius: 6px;
    font-size: 11px;
    display: none;
}

.ai-test-result.success {
    display: block;
    background: var(--green-dim);
    color: var(--green);
}

.ai-test-result.error {
    display: block;
    background: var(--red-dim);
    color: var(--red);
}

/* Ask AI button on study cards */
.ask-ai-btn {
    background: none;
    border: none;
    font-size: 13px;
    cursor: pointer;
    opacity: 0.3;
    transition: opacity 0.12s;
    padding: 0 2px;
}

.ask-ai-btn:hover {
    opacity: 1;
}

@media (max-width: 900px) {
    body.ai-open .main {
        margin-right: 0;
    }

    body.ai-open .ai-chat-panel {
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    }
}

@media (max-width: 600px) {
    .ai-chat-panel {
        width: 100%;
        right: -100%;
    }

    body.ai-open .ai-chat-panel {
        right: 0;
    }

    .ai-fab {
        bottom: 14px;
        right: 14px;
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

/* ===== INTERVIEW VIEW ===== */
.interview-container {
    max-width: 800px;
    margin: 40px auto;
    width: 90%;
}

.interview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.interview-badge {
    background: var(--red);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

.interview-main {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin-bottom: 20px;
}

.interview-topic-label {
    font-size: 12px;
    color: var(--blue);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.interview-question {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-0);
    line-height: 1.4;
    margin-bottom: 30px;
}

.interview-hint {
    color: var(--text-2);
    font-size: 14px;
    font-style: italic;
}

.interview-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.interview-btn-action {
    font-size: 16px;
    padding: 12px 32px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.interview-btn-end {
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 20px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.2s;
}

.interview-btn-end:hover {
    background: var(--red);
    color: #fff;
    border-color: var(--red);
}

/* ===== AI REPORT MODAL ===== */
.ai-report-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-0);
}

.ai-report-content h1,
.ai-report-content h2,
.ai-report-content h3 {
    color: var(--blue);
    margin-bottom: 12px;
    margin-top: 24px;
}

.ai-report-content h1:first-child,
.ai-report-content h2:first-child {
    margin-top: 0;
}

.ai-report-content p {
    margin-bottom: 16px;
}

.ai-report-content ul,
.ai-report-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.ai-report-content li {
    margin-bottom: 8px;
}

.ai-report-content strong {
    color: #fff;
}

.ai-report-content blockquote {
    border-left: 4px solid var(--blue);
    padding-left: 16px;
    color: var(--text-2);
    margin-bottom: 16px;
    background: var(--bg-1);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
}