/* 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: 450px;
    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;
}

/* Custom Premium Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.6);
}

/* Scroll-wise Resource Grid for Notes */
.resource-grid {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 0.5rem 0.25rem 1.25rem 0.25rem;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) rgba(255, 255, 255, 0.02);
}

.resource-card {
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.resource-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.resource-body {
    flex: 1;
    overflow-y: auto;
    max-height: 160px;
    margin-bottom: 1rem;
    padding-right: 0.25rem;
}

.resource-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-light);
    padding-top: 0.75rem;
    margin-top: auto;
}

/* ==========================================================================
   UPGRADED ADVANCED CODING GAME DESIGN SYSTEM
   ========================================================================== */

/* Progress Tracker Updates */
.game-progress-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--shadow-md), var(--shadow-glow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.game-progress-bar-container {
    width: 100%;
    height: 14px;
    background: rgba(15, 23, 42, 0.2);
    border: 1px solid var(--border-light);
    border-radius: 50px;
    overflow: hidden;
    position: relative;
    margin-top: 0.5rem;
}

.game-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #7c3aed, #ec4899, #10b981);
    background-size: 300% 100%;
    animation: progressGlow 4s ease infinite, progressStripes 1.2s linear infinite;
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 40px 40px, 300% 100%;
    border-radius: 50px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes progressGlow {
    0% { background-position: 0% 50%, 0 0; }
    50% { background-position: 100% 50%, 0 0; }
    100% { background-position: 0% 50%, 0 0; }
}

@keyframes progressStripes {
    from { background-position: 0 0, 0% 50%; }
    to { background-position: 40px 0, 0% 50%; }
}

/* Language Selector Buttons */
.game-lang-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.game-lang-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 0.8rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.game-lang-btn:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--accent-indigo);
    color: var(--text-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.15);
}

.game-lang-btn.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.35), 0 0 15px rgba(139, 92, 246, 0.2);
}

/* Level Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1.25rem;
    margin-bottom: 4rem;
}

/* Level Card */
.game-level-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: 1.25rem;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    user-select: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* States */
.game-level-card.locked {
    opacity: 0.35;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.25);
    border-style: dashed;
}

.game-level-card:not(.locked):hover {
    border-color: var(--accent-indigo);
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.25), 0 0 15px rgba(99, 102, 241, 0.15);
    background: rgba(255, 255, 255, 0.04);
}

.game-level-card.completed {
    border-color: var(--accent-emerald);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(5, 150, 105, 0.08) 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1), inset 0 0 12px rgba(16, 185, 129, 0.05);
}

.game-level-card.completed:hover {
    border-color: var(--accent-emerald);
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.25), 0 0 15px rgba(16, 185, 129, 0.15);
}

/* Card Content styling */
.game-level-number {
    font-size: 2.25rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.game-level-card.completed .game-level-number {
    color: var(--accent-emerald);
    text-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.game-level-status {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-top: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.game-level-card.completed .game-level-status {
    color: var(--accent-emerald);
}

.game-level-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
}

/* Mac-like Code Editor Window */
.code-window {
    background: #090c16;
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.code-window-header {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.code-window-dots {
    display: flex;
    gap: 6px;
}

.code-window-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.code-window-dot.red { background: #ff5f56; }
.code-window-dot.yellow { background: #ffbd2e; }
.code-window-dot.green { background: #27c93f; }

.code-window-title {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}

.game-code-container {
    padding: 1.25rem;
    overflow-x: auto;
    max-height: 280px;
    margin: 0;
}

.game-code {
    font-family: 'Fira Code', 'Consolas', 'Courier New', monospace;
    font-size: 0.9rem;
    color: #e2e8f0;
    line-height: 1.6;
    white-space: pre;
}

/* MCQ Option Items */
.game-option-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}

.game-option-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: 1rem;
    padding: 1.1rem 1.25rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.game-option-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateX(4px);
}

.game-option-item.selected {
    border-color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.06);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.1);
}

.game-option-item.correct {
    border-color: var(--accent-emerald) !important;
    background: rgba(16, 185, 129, 0.08) !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15) !important;
    animation: correctPulse 0.4s ease;
}

.game-option-item.incorrect {
    border-color: var(--accent-rose) !important;
    background: rgba(244, 63, 94, 0.08) !important;
    box-shadow: 0 4px 15px rgba(244, 63, 94, 0.15) !important;
    animation: shakeError 0.4s ease;
}

.game-option-letter {
    font-weight: 800;
    color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.1);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.game-option-item.selected .game-option-letter {
    background: var(--accent-indigo);
    color: #fff;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.game-option-item.correct .game-option-letter {
    background: var(--accent-emerald);
    color: #fff;
}

.game-option-item.incorrect .game-option-letter {
    background: var(--accent-rose);
    color: #fff;
}

.game-option-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.4;
    transition: all 0.2s ease;
}

.game-option-item.selected .game-option-text {
    color: var(--text-primary);
    font-weight: 500;
}

/* Animations */
@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Feedback Styling */
.game-feedback {
    padding: 1.25rem;
    border-radius: 1rem;
    margin-bottom: 1.75rem;
    font-size: 0.95rem;
    line-height: 1.6;
    animation: slideInFeedback 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.game-feedback.success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #a7f3d0;
}

html[data-theme="light"] .game-feedback.success {
    color: #065f46;
    background: #ecfdf5;
}

.game-feedback.error {
    background: rgba(244, 63, 94, 0.08);
    border: 1px solid rgba(244, 63, 94, 0.25);
    color: #fecdd3;
}

html[data-theme="light"] .game-feedback.error {
    color: #9f1239;
    background: #fff5f5;
}

/* ==========================================================================
   MOBILE & RESPONSIVE DESIGN UPGRADES
   ========================================================================== */

/* 1. Responsive Grid Helpers to replace inline styles */
.responsive-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.responsive-grid.gap-sm { gap: 1rem; }
.responsive-grid.gap-lg { gap: 2rem; }
.responsive-grid.col-1-15 { grid-template-columns: 1fr 1.5fr; }
.responsive-grid.col-12-1 { grid-template-columns: 1.2fr 1fr; }
.responsive-grid.col-2-1 { grid-template-columns: 2fr 1fr; }

/* 2. Responsive viewports */
@media (max-width: 850px) {
    /* Stack Dashboard grid layout */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Convert admin & student sidebar into a horizontal swipeable container */
    .sidebar {
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        padding: 0.75rem;
        border-radius: 0.75rem;
        gap: 0.5rem;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .sidebar::-webkit-scrollbar {
        display: none;
    }
    .sidebar-section-title {
        display: none !important;
    }
    .sidebar-item {
        flex-shrink: 0;
        padding: 0.5rem 0.85rem;
        font-size: 0.8rem;
    }
    .sidebar-item:hover {
        transform: none; /* disable translate translation on swipe container */
    }
}

@media (max-width: 768px) {
    /* Collapse Header into stack layout */
    header {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.75rem;
        padding: 0.75rem 1rem !important;
    }
    header .brand {
        justify-content: center;
    }
    .user-nav-actions {
        display: flex !important;
        align-items: center;
        gap: 0.5rem !important;
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
        padding-bottom: 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .user-nav-actions::-webkit-scrollbar {
        display: none;
    }
    .user-nav-actions .btn,
    .user-nav-actions .badge,
    .user-nav-actions button {
        flex-shrink: 0;
    }

    /* Collapse all helper grids to single column */
    .responsive-grid,
    .responsive-grid.col-1-15,
    .responsive-grid.col-12-1,
    .responsive-grid.col-2-1 {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Video player details stack */
    .video-list-container {
        max-height: 320px; /* Save vertical space on mobile */
    }
}

@media (max-width: 580px) {
    /* Modals */
    .modal-content {
        width: 95% !important;
        border-radius: 0.75rem;
    }
    .modal-body {
        padding: 1rem !important;
    }
    .option-item {
        padding: 0.5rem 0.75rem !important;
    }

    /* Coding Logic Game Grid */
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr)) !important;
        gap: 0.75rem !important;
        margin-bottom: 2rem !important;
    }
    .game-level-card {
        border-radius: 0.75rem !important;
        padding: 0.5rem !important;
    }
    .game-level-number {
        font-size: 1.6rem !important;
    }
    .game-level-status {
        font-size: 0.65rem !important;
    }
    .game-level-badge {
        font-size: 0.55rem !important;
        top: 4px !important;
        right: 4px !important;
        padding: 0.1rem 0.35rem !important;
    }

    /* Coding terminal details scaling */
    .game-code-container {
        padding: 0.75rem !important;
        max-height: 220px !important;
    }
    .game-code {
        font-size: 0.75rem !important;
    }
    .game-option-item {
        padding: 0.8rem 1rem !important;
    }
    .game-option-text {
        font-size: 0.85rem !important;
    }
    .game-option-letter {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    /* Small layout stats grid */
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem !important;
    }
    .stat-card {
        padding: 0.85rem 1rem !important;
    }
    .stat-val {
        font-size: 1.35rem !important;
    }
    .stat-icon {
        width: 2.25rem;
        height: 2.25rem;
    }
    .stat-icon svg {
        width: 1.15rem;
        height: 1.15rem;
    }

    /* Lecture playlist controller bar inside student video module */
    #saarthiControlsContainer {
        padding: 0.35rem 0.5rem 0.2rem !important;
    }
    #saarthiControlsContainer select, 
    #saarthiControlsContainer button {
        font-size: 0.75rem !important;
    }
    #sTimeCurrent, #sTimeTotal {
        font-size: 0.7rem !important;
    }

    /* Resource notes cards spacing */
    .resource-card {
        flex: 0 0 280px !important;
        min-height: 240px !important;
        padding: 1rem !important;
    }
    .resource-body {
        max-height: 120px !important;
    }
}

/* ==========================================================================
   PREMIUM SUPPORT CHAT INTERFACE
   ========================================================================== */
.chat-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    height: 600px;
    margin-top: 1rem;
}
@media (max-width: 768px) {
    .chat-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
}
.chat-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 1.25rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    max-height: 100%;
}
.chat-student-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.chat-student-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.01);
}
.chat-student-card:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-light);
}
.chat-student-card.active {
    background: var(--grad-primary);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}
.chat-student-card.active .chat-student-meta {
    color: rgba(255, 255, 255, 0.75);
}
.chat-student-name {
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-student-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.chat-main {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 1.25rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.chat-header {
    padding: 1rem 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);
}
.chat-header-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
}
.chat-messages-container {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.05);
}
.chat-bubble {
    max-width: 70%;
    padding: 0.85rem 1.25rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
    word-break: break-word;
}
.chat-bubble.sent {
    align-self: flex-end;
    background: var(--grad-primary);
    color: #fff;
    border-bottom-right-radius: 0.25rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}
.chat-bubble.received {
    align-self: flex-start;
    background: var(--option-bg);
    color: var(--text-primary);
    border-bottom-left-radius: 0.25rem;
    border: 1px solid var(--border-light);
}
.chat-bubble-time {
    font-size: 0.7rem;
    margin-top: 0.35rem;
    display: block;
    text-align: right;
    opacity: 0.7;
}
.chat-bubble.received .chat-bubble-time {
    color: var(--text-muted);
}
.chat-input-form {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 0.75rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
}
.chat-input-textarea {
    flex: 1;
    background: var(--input-bg);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    resize: none;
    height: 44px;
    line-height: 1.4;
    transition: var(--transition);
}
.chat-input-textarea:focus {
    outline: none;
    border-color: var(--accent-indigo);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

@media (max-width: 768px) {
    .chat-sidebar {
        max-height: 200px !important;
        overflow-y: auto !important;
    }
}


