/* style.css - Premium Modern Design System for Saarthi Internship Portal */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Default: Light Theme Colors */
    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-card-opaque: #ffffff;
    --border-light: rgba(15, 23, 42, 0.08);
    --border-glow: rgba(99, 102, 241, 0.2);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    /* Elegant Accents */
    --accent-indigo: #4f46e5;
    --accent-violet: #7c3aed;
    --accent-emerald: #059669;
    --accent-rose: #d90429;
    --accent-amber: #d97706;
    
    /* Gradients */
    --grad-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --grad-emerald: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --grad-amber: linear-gradient(135deg, #b45309 0%, #d97706 100%);
    --grad-rose: linear-gradient(135deg, #be123c 0%, #e11d48 100%);
    
    /* Shadows */
    --shadow-md: 0 8px 32px 0 rgba(15, 23, 42, 0.06);
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.08);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --header-bg: rgba(255, 255, 255, 0.8);
    --input-bg: rgba(255, 255, 255, 0.9);
    --sidebar-bg: rgba(15, 23, 42, 0.03);
    --th-bg: rgba(15, 23, 42, 0.05);
    --option-bg: rgba(15, 23, 42, 0.04);

    /* Light Theme Badge Colors */
    --badge-emerald-text: #047857;
    --badge-emerald-bg: rgba(4, 120, 87, 0.08);
    --badge-emerald-border: rgba(4, 120, 87, 0.15);

    --badge-amber-text: #b45309;
    --badge-amber-bg: rgba(180, 83, 9, 0.08);
    --badge-amber-border: rgba(180, 83, 9, 0.15);

    --badge-rose-text: #b91c1c;
    --badge-rose-bg: rgba(185, 28, 28, 0.08);
    --badge-rose-border: rgba(185, 28, 28, 0.15);

    --badge-indigo-text: #4338ca;
    --badge-indigo-bg: rgba(67, 56, 202, 0.08);
    --badge-indigo-border: rgba(67, 56, 202, 0.15);
}

html[data-theme="dark"] {
    /* Dark Theme Overrides */
    --bg-main: #0a0e1a;
    --bg-card: rgba(16, 24, 48, 0.45);
    --bg-card-opaque: #0f162a;
    --border-light: rgba(255, 255, 255, 0.07);
    --border-glow: rgba(99, 102, 241, 0.25);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Elegant Accents */
    --accent-indigo: #6366f1;
    --accent-violet: #8b5cf6;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    --accent-amber: #f59e0b;
    
    /* Gradients */
    --grad-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --grad-emerald: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --grad-amber: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    --grad-rose: linear-gradient(135deg, #e11d48 0%, #f43f5e 100%);
    
    /* Shadows */
    --shadow-md: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.15);
    
    --header-bg: rgba(10, 14, 26, 0.8);
    --input-bg: rgba(10, 14, 26, 0.6);
    --sidebar-bg: rgba(16, 24, 48, 0.25);
    --th-bg: rgba(16, 24, 48, 0.75);
    --option-bg: rgba(10, 14, 26, 0.4);

    /* Dark Theme Badge Colors */
    --badge-emerald-text: #6ee7b7;
    --badge-emerald-bg: rgba(16, 185, 129, 0.12);
    --badge-emerald-border: rgba(16, 185, 129, 0.25);

    --badge-amber-text: #fde047;
    --badge-amber-bg: rgba(245, 158, 11, 0.12);
    --badge-amber-border: rgba(245, 158, 11, 0.25);

    --badge-rose-text: #fca5a5;
    --badge-rose-bg: rgba(244, 63, 94, 0.12);
    --badge-rose-border: rgba(244, 63, 94, 0.25);

    --badge-indigo-text: #a5b4fc;
    --badge-indigo-bg: rgba(99, 102, 241, 0.12);
    --badge-indigo-border: rgba(99, 102, 241, 0.25);
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.1) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(16, 185, 129, 0.04) 0px, transparent 50%);
    background-attachment: fixed;
}

h1, h2, h3, h4, .brand-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Header & Navigation Bar */
header {
    background-color: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.brand-logo {
    width: 2.25rem;
    height: 2.25rem;
    background: var(--grad-primary);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    color: #fff;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.brand-text {
    font-size: 1.35rem;
    color: var(--text-primary);
    background: linear-gradient(120deg, var(--text-primary) 40%, var(--accent-indigo) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background: var(--grad-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5), var(--shadow-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 0.5rem;
}

/* Glassmorphic Panel/Card */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: var(--transition);
}

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

/* Login Wrapper Layout */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    padding: 2rem 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Forms & Controls */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--input-bg);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-indigo);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Alerts */
.alert {
    padding: 0.85rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid transparent;
}

.alert-danger {
    background: rgba(244, 63, 94, 0.1);
    color: var(--accent-rose);
    border-color: rgba(244, 63, 94, 0.2);
}

/* Dashboard Container */
.container {
    max-width: 1360px;
    width: 100%;
    margin: 1.5rem auto;
    padding: 0 1.5rem;
    flex: 1;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 2rem;
    gap: 0.25rem;
    border: 1px solid transparent;
}

.badge-emerald {
    background: var(--badge-emerald-bg);
    color: var(--badge-emerald-text);
    border-color: var(--badge-emerald-border);
}

.badge-amber {
    background: var(--badge-amber-bg);
    color: var(--badge-amber-text);
    border-color: var(--badge-amber-border);
}

.badge-rose {
    background: var(--badge-rose-bg);
    color: var(--badge-rose-text);
    border-color: var(--badge-rose-border);
}

.badge-indigo {
    background: var(--badge-indigo-bg);
    color: var(--badge-indigo-text);
    border-color: var(--badge-indigo-border);
}

/* Data Table Grid */
.detail-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.detail-table tr {
    border-bottom: 1px solid var(--border-light);
}

.detail-table tr:last-child {
    border-bottom: none;
}

.detail-table td {
    padding: 1rem 0;
    vertical-align: top;
}

.detail-table td.label-col {
    width: 30%;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.detail-table td.value-col {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Course Highlight Banner */
.course-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.course-banner-text {
    flex: 1;
}

.course-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #a5b4fc;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.course-title {
    font-size: 1.2rem;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* SVG icons helpers */
.svg-icon {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
    display: inline-block;
    vertical-align: middle;
}

/* ==========================================================================
   DASHBOARD GRID & SIDEBAR LAYOUT
   ========================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
    align-items: start;
}

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

.sidebar {
    background: var(--sidebar-bg);
    border: 1px solid var(--border-light);
    border-radius: 1.25rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.sidebar-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin: 1rem 0 0.5rem 0.5rem;
}

.sidebar-section-title:first-of-type {
    margin-top: 0.25rem;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

.sidebar-item svg {
    flex-shrink: 0;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    transform: translateX(3px);
}

.sidebar-item.active {
    background: var(--grad-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.workspace {
    flex: 1;
    min-width: 0; /* Prevents overflow issues in flex layout */
}

/* ==========================================================================
   STATISTICS GRID & CARDS
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem !important;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.stat-val {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    line-height: 1.2;
}

.stat-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.stat-icon.indigo {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
}

.stat-icon.emerald {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

.stat-icon.amber {
    background: rgba(245, 158, 11, 0.15);
    color: #fde047;
}

.stat-icon.rose {
    background: rgba(244, 63, 94, 0.15);
    color: #fca5a5;
}

/* ==========================================================================
   DATA TABLES (ADMIN SECTION)
   ========================================================================== */
.table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 0.75rem;
    border: 1px solid var(--border-light);
    background: rgba(10, 14, 26, 0.35);
    margin-top: 1rem;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table-container th {
    background: var(--th-bg);
    padding: 1rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border-light);
}

.table-container td {
    padding: 1rem 1.25rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.table-container tr:last-child td {
    border-bottom: none;
}

.table-container tr {
    transition: var(--transition);
}

.table-container tr:hover td {
    background: rgba(255, 255, 255, 0.015);
}

/* ==========================================================================
   CARDS COMMON LAYOUTS
   ========================================================================== */
.card-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    opacity: 0.7;
}

/* ==========================================================================
   TASK SUBMISSIONS CARDS (ADMIN REVIEW)
   ========================================================================== */
.submission-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    transition: var(--transition);
}

.submission-card:hover {
    border-color: var(--border-glow);
    background: rgba(255, 255, 255, 0.025);
}

.submission-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.submission-text-content {
    font-family: 'Consolas', 'Fira Code', 'Courier New', monospace;
    white-space: pre-wrap;
    background: rgba(0, 0, 0, 0.4);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    color: #e2e8f0;
    max-height: 250px;
    overflow-y: auto;
    line-height: 1.4;
}

/* ==========================================================================
   STUDENT PORTAL CLASSROOM & LECTURES LIST
   ========================================================================== */
.player-flex-container {
    display: flex;
    gap: 1.5rem;
}

.player-flex-container > div:first-child {
    flex: 1.7;
    min-width: 0;
}

.player-flex-container > div:last-child {
    flex: 1;
    min-width: 0;
}

@media (max-width: 850px) {
    .player-flex-container {
        flex-direction: column;
    }
}

.video-player-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-light);
    background: #000;
    box-shadow: var(--shadow-md);
}

.video-player-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.locked-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 26, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    z-index: 10;
}

.locked-screen-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: lockPulse 2s infinite ease-in-out;
}

@keyframes lockPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

.active-video-details {
    margin-top: 1.25rem;
}

.active-video-details h2 {
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
}

.active-video-details p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.video-list-container {
    max-height: 480px;
    overflow-y: auto;
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 0.5rem;
    background: rgba(10, 14, 26, 0.4);
}

.video-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 0.35rem;
    border: 1px solid transparent;
    text-decoration: none;
    color: inherit;
}

.video-item:last-child {
    margin-bottom: 0;
}

.video-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.video-item.active {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

.video-info {
    flex: 1;
    min-width: 0;
}

.video-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.video-status {
    flex-shrink: 0;
}

/* ==========================================================================
   BUTTON VARIANT (EMERALD)
   ========================================================================== */
.btn-emerald {
    background: var(--grad-emerald);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-emerald:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* ==========================================================================
   LOCK / UNLOCK TOGGLE BUTTONS
   ========================================================================== */
.lock-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
    text-decoration: none;
    outline: none;
    width: 120px;
}

.lock-toggle-btn.locked {
    background: rgba(244, 63, 94, 0.12);
    color: var(--accent-rose);
    border-color: rgba(244, 63, 94, 0.25);
}

.lock-toggle-btn.locked:hover {
    background: rgba(244, 63, 94, 0.2);
    border-color: var(--accent-rose);
}

.lock-toggle-btn.unlocked {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-emerald);
    border-color: rgba(16, 185, 129, 0.25);
}

.lock-toggle-btn.unlocked:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--accent-emerald);
}

/* ==========================================================================
   MCQ QUESTION BUILDER BLOCKS
   ========================================================================== */
.question-builder-block {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   MODAL DIALOG (QUIZ INTERFACE)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 7, 12, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.25s ease;
}

.modal-content {
    background: var(--bg-card-opaque);
    border: 1px solid var(--border-glow);
    border-radius: 1.25rem;
    width: 90%;
    max-width: 580px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--accent-rose);
}

.modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   QUIZ QUESTION CARDS (INSIDE MODAL)
   ========================================================================== */
.quiz-question-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.question-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.5rem;
    background: var(--option-bg);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: var(--transition);
}

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

.option-item input[type="radio"] {
    accent-color: var(--accent-indigo);
    cursor: pointer;
}

.option-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.option-item input[type="radio"]:checked ~ .option-label {
    color: var(--text-primary);
}

/* Responsive Grid Helper for Mobile Devices */
@media (max-width: 580px) {
    div[style*="grid-template-columns: 1fr 1fr"],
    div[style*="grid-template-columns: 1.2fr 1fr"],
    div[style*="grid-template-columns: 2fr 1fr"],
    div[style*="grid-template-columns: 1fr 1.5fr"] {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
}

/* Theme Switch Button Styling */
.theme-switch-btn {
    background: rgba(128, 128, 128, 0.08);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    font-size: 1.1rem;
    user-select: none;
    line-height: 1;
}

.theme-switch-btn:hover {
    background: rgba(128, 128, 128, 0.15);
    border-color: var(--accent-indigo);
    transform: scale(1.08);
}

/* Premium Footer Styling */
footer {
    text-align: center;
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--border-light);
    margin-top: 3rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    background-color: rgba(10, 14, 26, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

footer a {
    color: var(--accent-indigo);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

footer a:hover {
    color: var(--accent-violet);
    text-decoration: underline;
}


