/* =========================================================================
   RECALL: DARING FIREBALL EDITION (JOHN GRUBER AESTHETIC STYLE)
   ========================================================================= */

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

:root {
    /* John Gruber / Daring Fireball Curated Warm Dark Slate & Orange Palette */
    --bg-primary: #15161a;
    --bg-sidebar: #1b1c21;
    --card-bg: #22242a;
    --card-border: #32353e;
    --card-highlight: #3c3f4a;
    
    /* The Iconic Fireball Orange Accent */
    --accent-orange: #ff5300;
    --accent-orange-hover: #ff6a22;
    --accent-blue: #4a75a0;
    --accent-green: #2e7d32;
    --accent-red: #c62828;
    
    /* Premium Typography Font stacks */
    --font-serif: "Lora", "Georgia", "Hoefler Text", "Times New Roman", serif;
    --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Text colors (refined high-contrast off-whites) */
    --text-main: #f0f2f5;
    --text-sub: #a0aab8;
    --text-muted: #6b7787;
    --text-orange: #ff6a22;
    --text-green: #66bb6a;
    --text-red: #ef5350;
    
    /* Classic, Understated Geometry (cleaner, less round) */
    --border-radius-lg: 8px;
    --border-radius-md: 6px;
    --border-radius-sm: 4px;
    
    /* Flat & clean lighting (no massive neon shadows) */
    --shadow-main: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-inset: inset 0 1px 2px rgba(255, 255, 255, 0.05);
    
    --transition-fast: 0.12s ease;
    --transition-smooth: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- GENERAL RESET & FONTS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-sans);
    overflow: hidden;
    height: 100vh;
}

/* =========================================================================
   MAIN APP GRID LAYOUT
   ========================================================================= */
.app-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    width: 100%;
    height: 100vh;
}

/* =========================================================================
   SIDEBAR NAVIGATION (Clean Slate, Minimalist)
   ========================================================================= */
.sidebar {
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 0 20px;
    margin-bottom: 40px;
}

.brand-icon {
    font-size: 24px;
    margin-right: 10px;
    color: var(--accent-orange);
}

.brand-text h1 {
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.5px;
}

.sub-brand {
    font-family: var(--font-sans);
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    display: block;
    margin-top: 2px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 12px;
}

.nav-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-sub);
    font-size: 13px;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    transition: var(--transition-fast);
}

.nav-icon {
    color: var(--text-muted);
    transition: var(--transition-fast);
}

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

.nav-btn:hover .nav-icon {
    color: var(--text-sub);
}

.nav-btn.active {
    color: var(--text-main);
    background-color: var(--card-border);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-btn.active .nav-icon {
    color: var(--accent-orange);
}

.sidebar-footer {
    margin-top: auto;
    padding: 0 16px;
}

.class-picker-widget {
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.widget-title {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.active-class-display {
    font-size: 12px;
    font-weight: 700;
    background-color: var(--bg-primary);
    padding: 10px;
    border-radius: var(--border-radius-sm);
    color: var(--text-main);
    text-align: center;
    border: 1px solid var(--card-border);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.active-class-display.empty {
    color: #f59e0b;
    background-color: rgba(245, 158, 11, 0.03);
    border-color: rgba(245, 158, 11, 0.15);
}

.active-class-display.loaded {
    color: var(--text-green);
    background-color: rgba(102, 187, 106, 0.03);
    border-color: rgba(102, 187, 106, 0.15);
}

.select-folder-label {
    background-color: #272930;
    color: var(--text-main);
    font-size: 12px;
    font-weight: 700;
    padding: 10px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--card-border);
    transition: var(--transition-fast);
}

.select-folder-label:hover {
    background-color: #2f323b;
    border-color: var(--card-highlight);
}

/* =========================================================================
   MAIN DISPLAY CANVAS
   ========================================================================= */
.main-canvas {
    padding: 30px;
    height: 100vh;
    overflow-y: auto;
}

.tab-content {
    display: none;
    height: 100%;
}

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

/* Gruber Minimalist Containers */
.glass-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-main);
    position: relative;
}

.glass-border {
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
}

/* Typography styles inside views */
h2 {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-main);
}

.subtitle {
    font-family: var(--font-sans);
    font-size: 12px;
    color: var(--text-sub);
    margin-top: 4px;
    line-height: 1.5;
}

/* =========================================================================
   VIEW: TAB 1 - PLAY GAME
   ========================================================================= */
#tab-play {
    max-width: 780px;
    margin: 0 auto;
}

.view-panel {
    padding: 35px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* --- PLAY: START SCREEN --- */
#play-start-screen {
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.start-banner h2 {
    font-size: 28px;
}

.start-banner .subtitle {
    font-size: 14px;
    max-width: 500px;
    margin: 8px auto 0 auto;
}

.pulse-ring {
    font-size: 32px;
    width: 64px;
    height: 64px;
    background-color: rgba(255, 83, 0, 0.08);
    border: 1.5px solid rgba(255, 83, 0, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--accent-orange);
}

.mode-selector-card {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 24px;
    text-align: left;
    width: 100%;
    max-width: 520px;
}

.mode-selector-card h3 {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mode-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mode-radio-label {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
}

.mode-radio-label input[type="radio"] {
    display: none;
}

.custom-radio {
    width: 16px;
    height: 16px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    margin-top: 3px;
    position: relative;
    transition: var(--transition-fast);
}

.mode-radio-label input[type="radio"]:checked + .custom-radio {
    border-color: var(--accent-orange);
}

.mode-radio-label input[type="radio"]:checked + .custom-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background-color: var(--accent-orange);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.mode-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mode-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.mode-desc {
    font-size: 11px;
    color: var(--text-sub);
    line-height: 1.5;
}

/* Button UI Components */
.action-btn {
    border: none;
    outline: none;
    color: var(--text-main);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-weight: 700;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-btn:active {
    transform: scale(0.98);
}

.start-btn {
    background-color: var(--accent-orange);
    padding: 14px 35px;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.start-btn:hover {
    background-color: var(--accent-orange-hover);
}

/* --- PLAY: ACTIVE GAMEPLAY SCREEN --- */
#play-active-screen {
    justify-content: space-between;
}

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

.quiz-progress-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.badge {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    padding: 4px 12px;
    border-radius: var(--border-radius-sm);
    font-size: 11px;
    font-weight: 700;
}

.mode-badge {
    color: var(--text-sub);
    font-size: 11px;
    font-weight: 700;
}

.accuracy-green {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-green);
}

/* Photo Card centering */
.portrait-card-container {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.portrait-card {
    width: 260px;
    height: 260px;
    background: #0f1013;
    border: 1.5px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-main);
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#quiz-student-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
}

.loading-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-muted);
    font-size: 12px;
    z-index: 1;
    background-color: #0f1013;
}

.placeholder-icon {
    font-size: 28px;
}

/* Study countdown progress bar */
.countdown-bar-container {
    width: 100%;
    max-width: 360px;
    margin: 5px auto 20px auto;
    text-align: center;
}

.countdown-label {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.countdown-track {
    width: 100%;
    height: 4px;
    background-color: #101115;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.02);
}

.countdown-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 0.1s linear;
}

.study-color {
    background-color: var(--accent-blue);
}

.guess-color {
    background-color: var(--accent-orange);
}

/* Option Buttons Grid */
.options-grid-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.option-btn {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    font-size: 12.5px;
    font-weight: 700;
    padding: 12px 10px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    text-align: center;
    outline: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: var(--transition-fast);
}

.option-btn:hover:not(:disabled) {
    background-color: var(--card-highlight);
    border-color: var(--text-muted);
}

.option-btn:disabled {
    cursor: default;
    opacity: 0.55;
}

/* Correct/Incorrect review banner */
.review-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 12px 20px;
    margin-top: 20px;
}

.review-status-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-icon {
    font-size: 16px;
}

.status-message {
    font-size: 13px;
    font-weight: 700;
}

.next-btn {
    background-color: var(--accent-blue);
    padding: 8px 20px;
    font-size: 12px;
}

.next-btn:hover {
    filter: brightness(1.15);
}

/* --- PLAY: GAMEOVER SCREEN --- */
#play-gameover-screen {
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.gameover-banner .trophy-icon {
    font-size: 36px;
    color: #f59e0b;
    margin-bottom: 10px;
}

.gameover-banner h2 {
    font-size: 28px;
    font-weight: 700;
}

.gameover-banner p {
    font-size: 13px;
    color: var(--text-sub);
}

.scorecard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 14px;
    width: 100%;
    max-width: 440px;
}

.score-main-card {
    background-color: rgba(102, 187, 106, 0.02);
    border: 1px solid var(--card-border);
    padding: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-md);
}

.score-main-card h3 {
    font-size: 40px;
    font-weight: 800;
    color: var(--text-green);
}

.score-detail-card {
    background-color: rgba(0, 0, 0, 0.1);
    border: 1px solid var(--card-border);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-md);
}

.score-detail-card h4 {
    font-size: 18px;
    font-weight: 700;
    margin-top: 4px;
}

.scorecard-grid .label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.gameover-actions {
    display: flex;
    gap: 15px;
}

.secondary-btn {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    padding: 11px 22px;
    font-size: 12.5px;
}

.secondary-btn:hover {
    background-color: var(--card-highlight);
}

/* =========================================================================
   VIEW: TAB 2 - CLASS ROSTER
   ========================================================================= */
.roster-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.roster-titles h2 {
    font-size: 24px;
}

.search-input {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    color: var(--text-main);
    font-size: 13px;
    padding: 10px 16px;
    width: 260px;
    outline: none;
    transition: var(--transition-fast);
}

.search-input:focus {
    border-color: var(--accent-orange);
}

.roster-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.export-btn {
    background-color: rgba(255, 83, 0, 0.1);
    border: 1px solid rgba(255, 83, 0, 0.2);
    color: var(--text-orange);
    padding: 10px 16px;
    font-size: 13px;
    height: 38px;
}

.export-btn:hover:not(:disabled) {
    background-color: var(--accent-orange);
    color: var(--text-main);
}

.export-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Scroll Grid card elements */
.roster-scroll-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
    padding-bottom: 40px;
}

.student-roster-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow-main);
    transition: var(--transition-fast);
}

.student-roster-card:hover {
    border-color: var(--text-muted);
}

.student-card-photo-box {
    width: 90px;
    height: 90px;
    background-color: #0f1013;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.student-card-photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-names-wrapper {
    text-align: center;
    margin-bottom: 10px;
}

.student-card-pref-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    display: block;
}

.student-card-orig-name {
    font-size: 10px;
    color: var(--text-muted);
    display: block;
    margin-top: 1px;
}

.student-badge-stat {
    font-size: 9.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 14px;
    display: inline-block;
}

.badge-mastered {
    background-color: rgba(102, 187, 106, 0.05);
    color: var(--text-green);
    border: 1px solid rgba(102, 187, 106, 0.15);
}

.badge-struggling {
    background-color: rgba(245, 158, 11, 0.05);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.badge-unseen {
    background-color: rgba(255, 255, 255, 0.02);
    color: var(--text-sub);
    border: 1px solid var(--card-border);
}

.edit-name-btn {
    background-color: rgba(74, 117, 160, 0.08);
    border: 1px solid rgba(74, 117, 160, 0.15);
    color: #8bb3db;
    font-size: 10.5px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.edit-name-btn:hover {
    background-color: rgba(74, 117, 160, 0.18);
    border-color: #8bb3db;
    color: var(--text-main);
}

/* Empty states */
.roster-empty-state, .list-empty {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
    background-color: rgba(0, 0, 0, 0.1);
    border: 1px dashed var(--card-border);
    border-radius: var(--border-radius-md);
    color: var(--text-sub);
    font-size: 13px;
    font-weight: 700;
}

/* =========================================================================
   VIEW: TAB 3 - STATS DASHBOARD
   ========================================================================= */
.stats-header {
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.stats-header h2 {
    font-size: 24px;
}

/* KPI metrics grids */
.metrics-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--shadow-main);
}

.kpi-title {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.8px;
}

.kpi-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
}

/* Charts Analytics Layout */
.analytics-layout {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 20px;
}

.analytics-card {
    padding: 24px;
    min-height: 330px;
}

.analytics-card h3 {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.analytics-card h3.red-glow {
    color: var(--text-red);
}

.chart-container {
    margin-top: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 10px;
}

/* Top 5 hardest names tables */
.hardest-list-container {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hardest-list-row {
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hardest-list-row .student-name {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-main);
}

.hardest-list-row .student-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hardest-list-row .attempts-count {
    font-size: 11px;
    color: var(--text-muted);
}

.hardest-list-row .accuracy-badge {
    background-color: rgba(198, 40, 40, 0.05);
    color: var(--text-red);
    border: 1px solid rgba(198, 40, 40, 0.2);
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--border-radius-sm);
}

/* =========================================================================
   PREFERRED NAME MODAL OVERLAY (Clean Gruber Slate)
   ========================================================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    width: 100%;
    max-width: 440px;
    padding: 26px;
    border: 1.5px solid var(--card-border);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.modal-header h3 {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 700;
}

.close-modal-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-sub);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}

.close-modal-btn:hover {
    color: var(--text-main);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-body p {
    font-size: 11px;
    color: var(--text-sub);
    line-height: 1.5;
}

.modal-student-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: rgba(0, 0, 0, 0.15);
    padding: 12px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--card-border);
}

.modal-image-preview {
    width: 54px;
    height: 54px;
    background-color: #0f1013;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.modal-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-student-names {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.modal-student-names .label {
    font-size: 8px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.modal-student-names .value {
    font-size: 12px;
    color: var(--text-sub);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-sub);
}

.input-group input {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    color: var(--text-main);
    padding: 11px 14px;
    outline: none;
    font-size: 13px;
    transition: var(--transition-fast);
}

.input-group input:focus {
    border-color: var(--accent-orange);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid var(--card-border);
    padding-top: 16px;
    margin-top: 20px;
}

.modal-footer .action-btn {
    padding: 10px 20px;
    font-size: 12px;
}

.save-btn {
    background-color: var(--accent-orange);
}

.save-btn:hover {
    background-color: var(--accent-orange-hover);
}

/* =========================================================================
   UTILITIES
   ========================================================================= */
.hide {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* =========================================================================
   START SCREEN CLASS SELECTION & SETUP
   ========================================================================= */
.setup-section-card {
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    text-align: left;
    width: 100%;
    max-width: 720px;
    transition: var(--transition-smooth);
}

.setup-section-card h3 {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.setup-section-card.disabled {
    opacity: 0.35;
    pointer-events: none;
}

.class-selection-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
}

.class-option-card {
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.class-option-card:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: var(--text-muted);
}

.class-option-card.active {
    border-color: var(--accent-orange);
    background-color: rgba(255, 83, 0, 0.02);
}

.class-option-card.dragging {
    border-color: var(--accent-orange);
    background-color: rgba(255, 83, 0, 0.08);
    box-shadow: 0 0 12px rgba(255, 83, 0, 0.2);
}

.class-option-card.loading {
    pointer-events: none;
    opacity: 0.85;
}

.class-option-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.class-option-icon {
    font-size: 20px;
}

.class-option-title-group {
    display: flex;
    flex-direction: column;
}

.class-option-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.class-option-badge {
    font-size: 9px;
    font-weight: 700;
    color: var(--accent-orange);
    background-color: rgba(255, 83, 0, 0.1);
    padding: 2px 6px;
    border-radius: var(--border-radius-sm);
    display: inline-block;
    align-self: flex-start;
    margin-top: 2px;
}

.class-option-badge.secondary {
    color: var(--text-green);
    background-color: rgba(102, 187, 106, 0.1);
}

.class-option-badge.tertiary {
    color: #8bb3db;
    background-color: rgba(74, 117, 160, 0.15);
}

.class-option-desc {
    font-size: 11px;
    color: var(--text-sub);
    line-height: 1.45;
}

.inline-uploader {
    margin-top: auto;
    width: 100%;
    padding: 8px;
    font-size: 11px;
}

.class-option-card.loading .inline-uploader {
    display: none;
}

.pdf-loading-indicator {
    display: none;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    margin-top: auto;
}

.class-option-card.loading .pdf-loading-indicator {
    display: flex;
}

.pdf-progress-track {
    width: 100%;
    height: 4px;
    background-color: #101115;
    border-radius: 2px;
    overflow: hidden;
}

.pdf-progress-fill {
    height: 100%;
    width: 0%;
    background-color: var(--accent-orange);
    border-radius: 2px;
    transition: width 0.1s ease;
}

.pdf-loading-text {
    font-size: 10px;
    color: var(--text-orange);
    font-weight: 700;
    text-align: center;
}

.pdf-help-text {
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.45;
    border-top: 1px dashed var(--card-border);
    padding-top: 8px;
    margin-top: 4px;
}

.class-option-card.loading .pdf-help-text {
    display: none;
}


