/**
 * Premium Modern Academy Stylesheet - style.css
 * Built with standard HSL tokens matching AM Institute of Professional Skills
 * Supports elegant Light/Dark mode transitions, custom glassmorphism, 
 * responsive grid structures, and professional widgets.
 */

/* Import Premium Fonts - Moved to HTML head as preconnected async load for FCP performance */
/* @import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300..900&family=Plus+Jakarta+Sans:ital,wght@0,300..800;1,300..800&display=swap"); */

:root {
    /* Color Tokens (Light Mode Default) */
    --background: 220 20% 97%;      /* Sleek light gray-blue canvas */
    --foreground: 220 47% 10%;      /* Deep slate dark-gray */
    --primary: 174 85% 32%;        /* Rich Emerald-Teal */
    --primary-hover: 174 85% 26%;
    --primary-rgb: 12, 122, 108;
    --primary-foreground: 0 0% 100%;
    --secondary: 220 30% 20%;     /* Soft dark slate */
    --secondary-foreground: 0 0% 100%;
    --accent: 38 92% 50%;          /* Amber orange */
    --accent-foreground: 220 47% 12%;
    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 100%;
    --muted: 220 15% 94%;
    --muted-foreground: 220 15% 40%;
    --card: 0 0% 100%;             /* Pure white for cards */
    --card-foreground: 220 47% 10%;
    --popover: 0 0% 100%;
    --popover-foreground: 220 47% 10%;
    --border: 220 20% 90%;
    --input: 220 20% 90%;
    --ring: 174 85% 32%;
    --radius: 16px;

    /* Shadow styles */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.03);
    --shadow: 0 4px 18px -1px rgba(15, 23, 42, 0.05), 0 2px 8px -2px rgba(15, 23, 42, 0.03);
    --shadow-md: 0 8px 24px -3px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 40px -5px rgba(15, 23, 42, 0.1), 0 8px 16px -6px rgba(15, 23, 42, 0.06);
    --shadow-xl: 0 30px 60px -12px rgba(15, 23, 42, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.75); /* High transparency glass */
    --glass-border: rgba(12, 122, 108, 0.08);
}

/* Dark Mode Tokens */
.dark-theme {
    --background: 224 45% 5%;      /* Ultra Deep Navy Black */
    --foreground: 210 40% 98%;
    --primary: 174 80% 40%;        /* Vibrant Teal: #1aa694 */
    --primary-hover: 174 80% 48%;
    --primary-rgb: 26, 166, 148;
    --primary-foreground: 224 45% 5%;
    --secondary: 224 30% 12%;
    --secondary-foreground: 210 40% 98%;
    --accent: 38 92% 50%;
    --accent-foreground: 224 45% 5%;
    --destructive: 0 75% 45%;
    --destructive-foreground: 210 40% 98%;
    --muted: 224 30% 12%;
    --muted-foreground: 215 20% 70%;
    --card: 224 45% 8%;            /* Dark Cosmic Card */
    --card-foreground: 210 40% 98%;
    --popover: 224 45% 8%;
    --popover-foreground: 210 40% 98%;
    --border: 224 30% 16%;
    --input: 224 30% 16%;
    --ring: 174 80% 40%;
    
    --glass-bg: rgba(9, 13, 26, 0.7);
    --glass-border: rgba(26, 166, 148, 0.16);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 18px -1px rgba(0, 0, 0, 0.4), 0 2px 8px -2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px -3px rgba(0, 0, 0, 0.45), 0 4px 12px -2px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 40px -5px rgba(0, 0, 0, 0.5), 0 8px 16px -6px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.25;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: 100%;
    color: inherit;
    outline: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: hsl(var(--muted));
}
::-webkit-scrollbar-thumb {
    background: hsl(var(--primary) / 0.4);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: hsl(var(--primary));
}

/* Typography Helpers */
.text-gradient {
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.grid-cols-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-weight: 600;
    border-radius: var(--radius);
    font-size: 15px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground)) !important;
}
.btn-primary:hover {
    background-color: hsl(var(--primary-hover));
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(var(--primary-rgb), 0.3);
}

.btn-secondary {
    background-color: hsl(var(--muted));
    border: 1px solid hsl(var(--border));
    color: hsl(var(--foreground));
}
.btn-secondary:hover {
    background-color: hsl(var(--border));
    transform: translateY(-2px);
}

.btn-accent {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}
.btn-accent:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.3);
}

/* Glassmorphism Styles */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius);
}

/* Glass panel enhancements for supreme Light Mode contrast and readability */
body:not(.dark-theme) .glass-panel {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 117, 103, 0.12) !important;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

/* Dynamic theme overrides for secure auth and guest overlays (#admin-login-overlay, #otp-verification-overlay, #guest-name-overlay) */
#admin-login-overlay .glass-panel,
#otp-verification-overlay .glass-panel,
#guest-name-overlay .glass-panel {
    background: var(--glass-bg) !important;
    border-color: var(--glass-border) !important;
    box-shadow: var(--shadow-xl) !important;
}
body:not(.dark-theme) #admin-login-overlay .glass-panel,
body:not(.dark-theme) #otp-verification-overlay .glass-panel,
body:not(.dark-theme) #guest-name-overlay .glass-panel {
    background: #ffffff !important;
    border-color: rgba(0, 117, 103, 0.15) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12) !important;
}
#admin-login-overlay .glass-panel h3,
#otp-verification-overlay .glass-panel h3,
#guest-name-overlay .glass-panel h3 {
    color: hsl(var(--foreground)) !important;
}
body:not(.dark-theme) #guest-name-overlay .glass-panel h3 {
    color: #0f172a !important;
}
#admin-login-overlay .glass-panel p,
#otp-verification-overlay .glass-panel p,
#guest-name-overlay .glass-panel p {
    color: hsl(var(--foreground) / 0.7) !important;
}
body:not(.dark-theme) #guest-name-overlay .glass-panel p {
    color: #475569 !important;
}
#admin-login-overlay .glass-panel label,
#otp-verification-overlay .glass-panel label,
#guest-name-overlay .glass-panel label {
    color: hsl(var(--foreground) / 0.8) !important;
}
body:not(.dark-theme) #guest-name-overlay .glass-panel label {
    color: #334155 !important;
}
#admin-login-overlay .glass-panel .form-control,
#otp-verification-overlay .glass-panel .form-control,
#guest-name-overlay .glass-panel .form-control {
    background: hsl(var(--background)) !important;
    border-color: hsl(var(--border)) !important;
    color: hsl(var(--foreground)) !important;
}
body:not(.dark-theme) #admin-login-overlay .glass-panel .form-control,
body:not(.dark-theme) #otp-verification-overlay .glass-panel .form-control,
body:not(.dark-theme) #guest-name-overlay .glass-panel .form-control {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}
#otp-verification-overlay .glass-panel strong {
    color: hsl(var(--primary)) !important;
}
#otp-verification-overlay .glass-panel .btn-secondary {
    border-color: hsl(var(--border)) !important;
    color: hsl(var(--foreground) / 0.8) !important;
}
#otp-verification-overlay .glass-panel .btn-secondary:hover {
    background: hsl(var(--foreground) / 0.05) !important;
}

/* Floating Blurred Circles for Aesthetics */
.blur-bg-circle {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: hsl(var(--primary) / 0.15);
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    animation: float-orb 25s infinite alternate ease-in-out;
}

@keyframes float-orb {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(60px, -80px) scale(1.15);
        opacity: 1;
    }
    100% {
        transform: translate(-40px, 40px) scale(0.9);
        opacity: 0.7;
    }
}

/* 1. Header Navigation */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 76px;
    background: hsl(var(--background) / 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid hsl(var(--border));
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: hsl(var(--primary));
    font-family: 'Outfit', sans-serif;
}

.nav-logo-img {
    height: 44px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover .nav-logo-img {
    transform: scale(1.03);
}
.logo-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: hsl(var(--primary));
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 900;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-link {
    font-size: 15px;
    font-weight: 600;
    color: hsl(var(--foreground) / 0.8);
    transition: color 0.2s;
    cursor: pointer;
}
.nav-link:hover, .nav-link.active {
    color: hsl(var(--primary));
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Theme Switcher Button */
.theme-switch-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: hsl(var(--muted));
    border: 1px solid hsl(var(--border));
    color: hsl(var(--foreground));
    cursor: pointer;
}
.theme-switch-btn:hover {
    background: hsl(var(--border));
}

/* 2. Hero Section */
.hero {
    position: relative;
    padding: 100px 0 80px 0;
    overflow: hidden;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 60px;
}

.hero-text h1 {
    font-size: 54px;
    margin-bottom: 24px;
    letter-spacing: -1.5px;
    color: hsl(var(--foreground));
}

.hero-text p {
    font-size: 18px;
    color: hsl(var(--muted-foreground));
    margin-bottom: 36px;
    max-width: 580px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 40px;
    border-top: 1px solid hsl(var(--border));
    padding-top: 24px;
}

.stat-item h3 {
    font-size: 32px;
    color: hsl(var(--primary));
    margin-bottom: 4px;
}

.stat-item p {
    font-size: 14px;
    color: hsl(var(--muted-foreground));
    margin: 0;
}

.hero-image-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    aspect-ratio: 4/3;
    border: 4px solid hsl(var(--card));
}
.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 3. Courses Catalog Grid */
.section {
    padding: 80px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}
.section-header h2 {
    font-size: 36px;
    margin-bottom: 12px;
}
.section-header p {
    color: hsl(var(--muted-foreground));
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* Filters and Search Control Panel */
.control-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.search-bar {
    width: 100%;
    position: relative;
}
.search-bar input {
    width: 100%;
    padding: 16px 24px 16px 54px;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background: hsl(var(--card));
    box-shadow: var(--shadow-sm);
    font-size: 15px;
    color: hsl(var(--foreground));
}
.search-bar input:focus {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.15);
}
.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: hsl(var(--muted-foreground));
}

.filter-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
}
.filter-tab {
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--radius);
    background: hsl(var(--muted));
    border: 1px solid hsl(var(--border));
    white-space: nowrap;
    transition: all 0.2s;
}
.filter-tab:hover {
    background: hsl(var(--border));
}
.filter-tab.active {
    background: hsl(var(--primary));
    color: white;
    border-color: hsl(var(--primary));
}

/* Course Card Details */
.course-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    height: 100%;
    transform: translateZ(0);
}
.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: hsl(var(--primary) / 0.3);
}

.course-image {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-bottom: 1px solid hsl(var(--border));
}

.course-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.course-badge {
    align-self: flex-start;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 100px;
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
    margin-bottom: 14px;
}

.course-body h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: hsl(var(--foreground));
}

.course-body p {
    font-size: 14px;
    color: hsl(var(--muted-foreground));
    margin-bottom: 20px;
    flex-grow: 1;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid hsl(var(--border));
    padding-top: 16px;
    margin-top: auto;
}

.course-duration {
    font-size: 13px;
    color: hsl(var(--muted-foreground));
    display: flex;
    align-items: center;
    gap: 6px;
}

.course-price {
    font-size: 18px;
    font-weight: 800;
    color: hsl(var(--primary));
}

.course-footer-btn {
    width: 100%;
    margin-top: 16px;
}

/* 4. Why Choose Us / Testimonials */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
}

.feature-card {
    padding: 32px;
    border-radius: var(--radius);
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    box-shadow: var(--shadow);
}
.feature-card:hover {
    border-color: hsl(var(--primary) / 0.3);
}
.feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
}
.feature-card p {
    font-size: 14px;
    color: hsl(var(--muted-foreground));
}

.testimonials-slider {
    margin-top: 40px;
}

.testimonial-card {
    padding: 36px;
    border-radius: 20px;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    box-shadow: var(--shadow-md);
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-quote {
    font-size: 18px;
    font-style: italic;
    margin-bottom: 24px;
    position: relative;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.testimonial-author img {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    font-size: 16px;
    margin-bottom: 2px;
}

.author-info p {
    font-size: 13px;
    color: hsl(var(--muted-foreground));
}

.badge-result {
    margin-left: auto;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    background: hsl(var(--accent) / 0.1);
    color: hsl(var(--accent));
}

/* 5. FAQs Accordion Layout */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background: hsl(var(--card));
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-question {
    padding: 20px 24px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.faq-question:hover {
    background: hsl(var(--muted));
}

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    color: hsl(var(--muted-foreground));
    font-size: 15px;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), padding 0.3s;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
    padding: 0 24px 20px 24px;
    transition: max-height 0.3s cubic-bezier(1, 0, 1, 0), padding 0.3s;
}

.faq-question::after {
    content: "+";
    font-size: 20px;
    font-weight: 700;
    color: hsl(var(--primary));
    transition: transform 0.2s;
}
.faq-item.active .faq-question::after {
    content: "-";
    transform: rotate(180deg);
}

/* 6. Form Styling (Admissions / Login / Contact) */
.form-card {
    max-width: 580px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 20px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: hsl(var(--foreground));
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-size: 15px;
}
.form-control:focus {
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 12px;
}

.form-subtitle {
    text-align: center;
    color: hsl(var(--muted-foreground));
    font-size: 15px;
    margin-bottom: 32px;
}

.form-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: hsl(var(--muted-foreground));
}
.form-footer a {
    color: hsl(var(--primary));
    font-weight: 700;
}
.form-footer a:hover {
    text-decoration: underline;
}

/* Toast Message Notification UI */
.toast-msg {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 28px;
    border-radius: var(--radius);
    background: #0f172a !important;
    color: white !important;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast-msg.show {
    transform: translateY(0);
    opacity: 1;
}

/* 7. LMS Student Dashboard Layout */
body.lms-body {
    overflow-y: auto !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.lms-body .header {
    flex-shrink: 0;
}

.lms-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    flex-grow: 1;
    height: 0;
    min-height: 0;
    overflow: hidden;
}

.lms-sidebar {
    background: hsl(var(--card));
    border-right: 1px solid hsl(var(--border));
    padding: 32px 16px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.lms-user-info {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 1px solid hsl(var(--border));
    margin-bottom: 24px;
}

.lms-user-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    font-weight: 800;
    margin: 0 auto 12px auto;
    font-family: 'Outfit', sans-serif;
}

.lms-user-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
}

.lms-user-role {
    font-size: 12px;
    color: hsl(var(--muted-foreground));
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.lms-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lms-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
}
.lms-menu-item:hover, .lms-menu-item.active {
    background: hsl(var(--primary) / 0.08);
    color: hsl(var(--primary));
}
.lms-menu-item.logout {
    margin-top: auto;
}
.lms-menu-item.logout:hover {
    background: hsl(var(--destructive) / 0.08);
    color: hsl(var(--destructive));
}

.lms-content {
    padding: 40px;
    overflow-y: auto;
    background: hsl(var(--muted) / 0.3);
}

.lms-view {
    display: none;
}
.lms-view.active {
    display: block;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: hsl(var(--muted));
    border-radius: 100px;
    overflow: hidden;
    margin-top: 10px;
}
.progress-bar-fill {
    height: 100%;
    background: hsl(var(--primary));
    border-radius: 100px;
}

/* Widescreen Video Lecture Screen */
.lecture-player-grid {
    display: grid;
    grid-template-columns: 1.6fr 0.9fr;
    gap: 32px;
    margin-top: 24px;
}

.video-container {
    width: 100%;
    background: black;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16/9;
    box-shadow: var(--shadow-md);
    position: relative;
}
.video-container video {
    width: 100%;
    height: 100%;
}

.lecture-playlist-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    max-height: 480px;
}

.playlist-header {
    padding: 20px;
    border-bottom: 1px solid hsl(var(--border));
    font-weight: 700;
}

.playlist-items {
    overflow-y: auto;
    flex-grow: 1;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid hsl(var(--border));
    cursor: pointer;
}
.playlist-item:hover {
    background: hsl(var(--muted));
}
.playlist-item.active {
    background: hsl(var(--primary) / 0.05);
    border-left: 4px solid hsl(var(--primary));
}

.playlist-item-info {
    flex-grow: 1;
}
.playlist-item-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}
.playlist-item-meta {
    font-size: 12px;
    color: hsl(var(--muted-foreground));
}

/* Widescreen Live Lecture Screen */
.live-lecture-container {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.live-badge-glow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 100px;
    background: hsl(var(--destructive) / 0.1);
    color: hsl(var(--destructive));
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 24px;
    animation: pulse 2.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

.live-icon-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: hsl(var(--destructive));
    box-shadow: 0 0 10px hsl(var(--destructive));
}

/* Embedded Class Room for Zoom / Meet / Jitsi */
.embed-live-screen {
    width: 100%;
    background: #111b27;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    border: 2px dashed hsl(var(--primary) / 0.4);
}

/* Countdown Clock */
.countdown-clock {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin: 24px 0;
}
.countdown-box {
    padding: 16px 20px;
    border-radius: var(--radius);
    background: hsl(var(--muted));
    border: 1px solid hsl(var(--border));
    min-width: 80px;
    text-align: center;
}
.countdown-number {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 800;
    color: hsl(var(--primary));
}
.countdown-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: hsl(var(--muted-foreground));
}

/* 8. Admin Control Panel Dashboard styles */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 36px;
}

.admin-stat-card {
    padding: 24px;
    border-radius: var(--radius);
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    box-shadow: var(--shadow-sm);
}

.admin-stat-card h4 {
    font-size: 13px;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
    margin-bottom: 8px;
    font-weight: 600;
}
.admin-stat-value {
    font-size: 32px;
    font-weight: 800;
    color: hsl(var(--primary));
    font-family: 'Outfit', sans-serif;
}

/* Interactive tables */
.table-card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 40px;
}

.table-header {
    padding: 20px 24px;
    border-bottom: 1px solid hsl(var(--border));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

table.admin-table th {
    padding: 16px 24px;
    border-bottom: 2px solid hsl(var(--border));
    font-size: 13px;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
    font-weight: 700;
}

table.admin-table td {
    padding: 16px 24px;
    border-bottom: 1px solid hsl(var(--border));
    font-size: 14px;
}

table.admin-table tr:last-child td {
    border-bottom: none;
}

table.admin-table tr:hover td {
    background: hsl(var(--muted) / 0.2);
}

/* Badge status indicators */
.badge-status {
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.status-approved {
    background: rgb(220, 252, 231);
    color: rgb(22, 163, 74);
}
.status-pending {
    background: rgb(254, 243, 199);
    color: rgb(217, 119, 6);
}
.status-rejected {
    background: rgb(254, 226, 226);
    color: rgb(220, 38, 38);
}

/* Modal form popup style */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: hsl(var(--muted) / 0.5);
    z-index: 200;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}
.modal.open {
    display: flex;
}
.modal-content {
    background: hsl(var(--card));
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    padding: 36px;
    box-shadow: var(--shadow-xl);
    position: relative;
    border: 1px solid hsl(var(--border));
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: hsl(var(--muted-foreground));
}

/* Footer Section */
.footer {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    padding: 60px 0 30px 0;
    font-size: 15px;
    border-top: 1px solid hsl(var(--border) / 0.1);
}

.footer-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 0.8fr 1.2fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 18px;
    margin-bottom: 20px;
    font-family: 'Outfit', sans-serif;
}

.footer-col p {
    color: hsl(var(--secondary-foreground) / 0.7);
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: hsl(var(--secondary-foreground) / 0.7);
    transition: color 0.2s;
}
.footer-link:hover {
    color: hsl(var(--primary));
}

.footer-bottom {
    border-top: 1px solid hsl(var(--secondary-foreground) / 0.1);
    padding-top: 30px;
    text-align: center;
    color: hsl(var(--secondary-foreground) / 0.5);
    font-size: 14px;
}

/* Responsive adjustments */
@media(max-width: 991px) {
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .hero-text p {
        margin: 0 auto 36px auto;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-stats {
        justify-content: center;
    }
    .footer-layout {
        grid-template-columns: 1fr 1fr;
    }
    body.lms-body {
        overflow: auto !important;
        height: auto !important;
    }
    .lms-layout {
        grid-template-columns: 1fr;
        height: auto !important;
        flex-grow: 0 !important;
        overflow: visible !important;
    }
    .lms-sidebar {
        border-right: none;
        border-bottom: 1px solid hsl(var(--border));
        height: auto !important;
        overflow-y: visible !important;
    }
    .lms-content {
        height: auto !important;
        overflow-y: visible !important;
    }
    .lecture-player-grid {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 767px) {
    .hero-text h1 {
        font-size: 38px;
    }
    .footer-layout {
        grid-template-columns: 1fr;
    }
    .form-card {
        padding: 24px;
    }
    .lms-content {
        padding: 20px 16px;
    }
    .admin-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
 * PREMIUM EXPERIMENTAL & UPGRADE UI CLASSES
 * ========================================== */

/* Login Split Layout Grid */
.login-split-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: stretch;
}

@media (max-width: 991px) {
    .login-split-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Demo Login Buttons */
.demo-login-btn {
    background: hsl(var(--muted)/0.35);
    border: 1px solid hsl(var(--border));
    padding: 18px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.demo-login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, hsl(var(--primary)/0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.demo-login-btn:hover {
    transform: translateY(-3px) scale(1.02);
    background: hsl(var(--card));
    border-color: hsl(var(--primary)/0.4);
    box-shadow: 0 12px 20px -5px rgba(var(--primary-rgb), 0.15);
}

.demo-login-btn:hover::before {
    transform: translateX(100%);
}

.demo-login-btn:active {
    transform: translateY(-1px) scale(0.99);
}

/* Modern Dark-Room Live Class Workspace */
.live-lecture-container.dark-theme-classroom {
    background: hsl(var(--background));
    border-color: rgba(26, 166, 148, 0.2);
    color: #f1f5f9;
    padding: 30px;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
    position: relative;
}

/* Custom WebRTC Screen Preview & Stream Boxes */
.webrtc-stream-box {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
}

.webrtc-stream-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

.stream-overlay-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(11, 19, 41, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid hsl(var(--foreground) / 0.1);
    color: hsl(var(--foreground));
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}

/* Live Control Round Toolbar Buttons */
.live-control-toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding: 16px;
    background: hsl(var(--card)/0.03);
    border-top: 1px solid hsl(var(--border)/0.2);
    border-radius: var(--radius);
    flex-wrap: wrap;
}

.control-circle-btn {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: #64748b !important;
    border: 1px solid #475569 !important;
    color: #ffffff !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    position: relative !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.control-pill-btn {
    border-radius: 30px !important;
    width: auto !important;
    padding: 12px 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    font-weight: 700 !important;
    font-family: Outfit, sans-serif !important;
    font-size: 14px !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    border: 1px solid transparent;
}
.control-pill-btn:hover {
    transform: translateY(-3px) scale(1.05) !important;
}
.control-pill-btn svg {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
}

.control-circle-btn:hover {
    transform: translateY(-3px) scale(1.08) !important;
    background: #475569 !important;
    border-color: #334155 !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2) !important;
}

.control-circle-btn.btn-active {
    background: #10b981 !important; /* Premium Emerald/Teal green */
    color: white !important;
    border-color: #10b981 !important;
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.4) !important;
}

.control-circle-btn.media-muted {
    background: #ef4444 !important; /* Premium Red */
    color: white !important;
    border-color: #ef4444 !important;
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.4) !important;
}

.control-circle-btn.btn-danger {
    background: #ef4444 !important;
    color: white !important;
    border-color: #ef4444 !important;
}

.control-circle-btn.btn-danger:hover {
    background: #dc2626 !important;
    filter: brightness(1.1) !important;
    box-shadow: 0 8px 12px -3px rgba(220, 38, 38, 0.3) !important;
}

.control-circle-btn svg {
    width: 20px !important;
    height: 20px !important;
}

/* Interactive Whiteboard overlay panel */
.whiteboard-panel-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background: #ffffff;
    display: none;
    flex-direction: column;
}

.whiteboard-controls-header {
    background: #f1f5f9;
    border-bottom: 1px solid #cbd5e1;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #1e293b;
}

.whiteboard-toolbar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.whiteboard-tool-btn {
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    cursor: pointer;
}

.whiteboard-tool-btn.active {
    background: hsl(var(--primary));
    color: white;
    border-color: hsl(var(--primary));
}

.color-dot-picker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s;
}
.color-dot-picker:hover, .color-dot-picker.active {
    transform: scale(1.2);
    border-color: #0f172a;
}

/* Classroom Side Tabs: Chat Panel Bubble styling */
.classroom-chat-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    background: hsl(var(--muted) / 0.15);
    border-radius: var(--radius);
    margin-bottom: 12px;
    border: 1px solid hsl(var(--foreground) / 0.05);
    min-height: 0;
    scroll-behavior: smooth;
}
/* Scrollbar styling for chat */
.classroom-chat-feed::-webkit-scrollbar { width: 4px; }
.classroom-chat-feed::-webkit-scrollbar-track { background: transparent; }
.classroom-chat-feed::-webkit-scrollbar-thumb { background: rgba(26,166,148,0.4); border-radius: 4px; }
.classroom-chat-feed::-webkit-scrollbar-thumb:hover { background: rgba(26,166,148,0.7); }

/* ---- Chat Bubble Wrapper ---- */
.chat-bubble-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: slideInUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Sender row (name + timestamp) ---- */
.chat-bubble-sender {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    display: flex !important;
    justify-content: space-between !important;
}
.dark-theme .chat-bubble-sender {
    color: rgba(210, 225, 249, 0.5) !important;
}

/* ---- Received message bubble — Light Mode ---- */
.chat-bubble-text {
    background: #f1f5f9 !important;
    padding: 10px 14px !important;
    border-radius: 12px !important;
    border-top-left-radius: 0px !important;
    color: #0f172a !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    word-break: break-word !important;
    border: 1px solid #e2e8f0 !important;
}

/* ---- Received message bubble — Dark Mode ---- */
.dark-theme .chat-bubble-text {
    background: rgba(210, 225, 249, 0.07) !important;
    color: #d2e1f9 !important;
    border: 1px solid rgba(210, 225, 249, 0.1) !important;
}

/* ---- SENT (self) message — teal bg, white text, both themes ---- */
.chat-bubble-item.self-message {
    align-items: flex-end !important;
}
.chat-bubble-item.self-message .chat-bubble-text {
    background: #0c7a6c !important;
    color: #ffffff !important;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 0px !important;
    border: none !important;
}
.dark-theme .chat-bubble-item.self-message .chat-bubble-text {
    background: #1aa694 !important;
    color: #ffffff !important;
}
.chat-bubble-item.self-message .chat-bubble-sender {
    text-align: right !important;
    justify-content: flex-end !important;
    color: #64748b !important;
}
.dark-theme .chat-bubble-item.self-message .chat-bubble-sender {
    color: rgba(210, 225, 249, 0.5) !important;
}

/* Hand Raise notifications overlay */
.hand-raise-alert-overlay {
    position: absolute;
    top: 24px;
    right: 24px;
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
    padding: 12px 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 50;
    animation: bounceUpDown 1s infinite alternate;
}

@keyframes bounceUpDown {
    0% { transform: translateY(0); }
    100% { transform: translateY(-6px); }
}

/* Simulated Participant grid layout cards */
.participants-compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid hsl(var(--foreground) / 0.05);
}

.peer-card-mini {
    background: hsl(var(--foreground) / 0.05);
    border: 1px solid hsl(var(--foreground) / 0.05);
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    transition: all 0.2s;
}

.peer-card-mini.active-speaker {
    border-color: hsl(var(--accent));
    box-shadow: 0 0 10px hsl(var(--accent)/0.3);
}

.peer-avatar-mini {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin: 0 auto 6px auto;
    background: hsl(var(--foreground) / 0.1);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 12px;
}

.peer-name-mini {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: hsl(var(--foreground) / 0.8);
}

/* ==========================================
 * HIGH-FIDELITY SIDE PANEL TABS & SCROLL FIXES
 * ========================================== */

.classroom-side-panel {
    /* Height is controlled per breakpoint: 100% on desktop, 400px on mobile */
    padding: 16px;
    background: hsl(var(--card) / 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-left: 3px solid hsl(var(--primary));
    border-radius: var(--radius);
    color: hsl(var(--foreground));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(26, 166, 148, 0.15);
}

/* Classroom Tab Button Toggles */
.classroom-tabs-header {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid hsl(var(--foreground) / 0.1);
    padding-bottom: 8px;
}

.classroom-tab-btn {
    flex: 1;
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 700;
    color: hsl(var(--foreground) / 0.6);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.classroom-tab-btn:hover {
    color: hsl(var(--foreground));
    background: hsl(var(--foreground) / 0.05);
}

.classroom-tab-btn.active {
    color: white !important;
    background: hsl(var(--primary)) !important;
    border-color: hsl(var(--primary));
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.2);
}

#class-content-chat, #class-content-attendees {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.classroom-chat-feed {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: hsl(var(--muted) / 0.25);
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid hsl(var(--foreground) / 0.05);
    min-height: 0;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.participants-compact-grid {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    padding: 4px;
    min-height: 0; /* Forces flex child to scroll correctly without overflowing parent */
}

/* Pulsating active dot for peer cards */
.pulsating-active-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    position: absolute;
    top: 8px;
    right: 8px;
    box-shadow: 0 0 8px #10b981;
    animation: activeGlowPulse 1.8s infinite ease-in-out;
}

@keyframes activeGlowPulse {
    0% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 4px #10b981; }
    50% { transform: scale(1.2); opacity: 1; box-shadow: 0 0 10px #10b981; }
    100% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 4px #10b981; }
}
/* Multi-User Classroom Upgrade Styles */

.instructor-pip-card {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 150px;
    height: 110px;
    border-radius: 8px;
    border: 2px solid hsl(var(--primary));
    z-index: 100;
    object-fit: cover;
    background: #000;
    box-shadow: 0 10px 15px rgba(0,0,0,0.5);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.instructor-pip-card:hover {
    width: 220px;
    height: 160px;
    transform: scale(1.05);
}

.waiting-room-overlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 15, 30, 0.96);
    backdrop-filter: blur(12px);
    z-index: 150;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 24px;
    border-radius: var(--radius);
}

.attendee-actions-panel {
    display: flex;
    gap: 4px;
    align-items: center;
}

.mod-btn-action {
    background: hsl(var(--foreground) / 0.05);
    border: 1px solid hsl(var(--foreground) / 0.1);
    color: hsl(var(--foreground) / 0.8);
    border-radius: 6px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 11px;
}
.mod-btn-action:hover {
    background: hsl(var(--primary));
    color: white;
    border-color: hsl(var(--primary));
    transform: translateY(-1px);
}
.mod-btn-action.action-kick:hover {
    background: hsl(var(--destructive));
    color: white;
    border-color: hsl(var(--destructive));
}
.mod-btn-action.action-disabled {
    color: hsl(var(--destructive)) !important;
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
}

/* Custom layout for attendees list to allow full row details */
.participants-compact-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    padding-right: 4px;
}
.peer-card-mini {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 12px;
    background: hsl(var(--foreground) / 0.02);
    border: 1px solid hsl(var(--foreground) / 0.04);
    border-radius: 8px;
    position: relative;
    box-sizing: border-box;
}
.peer-avatar-mini {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    margin-right: 10px;
    flex-shrink: 0;
}
.peer-name-mini {
    font-size: 13px;
    color: hsl(var(--foreground));
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}
.peer-status-indicator {
    font-size: 11px;
    color: hsl(var(--foreground) / 0.4);
    margin-right: 12px;
}

/* ==========================================
 * MOBILE RESPONSIVENESS OVERRIDES FOR CLASSROOM
 * ========================================== */
@media (max-width: 768px) {
    .classroom-grid-layout {
        grid-template-columns: 1fr !important; /* Stack columns on mobile */
        gap: 15px !important;
    }
    
    .classroom-side-panel {
        height: 400px !important;
        min-height: 400px !important;
        max-height: 400px !important;
    }
    
    .embed-live-screen {
        height: 280px !important; /* Compact video player on mobile */
    }
    
    .live-control-toolbar {
        padding: 12px !important;
        gap: 10px !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        background: rgba(15, 23, 42, 0.4) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        border-radius: 30px !important;
        margin: 10px auto !important;
        width: fit-content !important;
        max-width: 95% !important;
    }
    
    .control-circle-btn {
        width: 44px !important;
        height: 44px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        display: inline-flex !important;
        justify-content: center !important;
        align-items: center !important;
        flex-shrink: 0 !important;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    }
    
    .control-circle-btn span {
        display: none !important; /* Hide long button texts on mobile to prevent squashing! */
    }
    
    .control-circle-btn svg {
        width: 20px !important;
        height: 20px !important;
        margin: 0 !important;
    }
    
    /* Adjust Zoom Grid cards on mobile to fit nicely */
    #classroom-gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
        gap: 10px !important;
        padding: 10px !important;
    }
}

/* ==========================================
 * PREMIUM BRAND PRELOADER OVERLAY
 * ========================================== */
#site-preloader {
    position: fixed;
    inset: 0;
    background: hsl(var(--background)); /* Sleek dark space background */
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
#site-preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.preloader-brand-logo {
    font-size: 48px;
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
    color: #1aa694;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: preloaderPulse 1.5s infinite ease-in-out;
}
.preloader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(26, 166, 148, 0.1);
    border-top-color: #1aa694;
    border-radius: 50%;
    margin-top: 24px;
    animation: preloaderSpin 1s infinite linear;
}
@keyframes preloaderPulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; text-shadow: 0 0 15px rgba(26, 166, 148, 0.4); }
    100% { transform: scale(0.95); opacity: 0.8; }
}
@keyframes preloaderSpin {
    to { transform: rotate(360deg); }
}

/* Mobile Responsive Overrides for Top Navigation & Lobby Layout */
@media (max-width: 600px) {
    /* Hide top clock and user info texts on mobile to prevent header overflow */
    #meet-top-clock,
    #user-info-text-block {
        display: none !important;
    }
    
    /* Clamp clock font-size in lobby */
    #lobby-big-clock {
        font-size: clamp(36px, 10vw, 54px) !important;
    }
    
    /* Reduce container margins and padding on mobile */
    .container {
        padding: 0 16px !important;
    }
    
    /* Adjust lobby grid columns */
    .login-split-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Keep footer brand logo and copyrights centered on mobile */
    footer .container {
        align-items: center !important;
        text-align: center !important;
    }
    footer div {
        justify-content: center !important;
    }
}

/* ==========================================================================
   CLASSROOM MEETING ACTIVE VIEWPORT & SCROLL LOCK SYSTEM
   Mobile-safe defaults — desktop overrides are in @media(min-width:769px)
   ========================================================================== */
body.meeting-active {
    overflow: auto !important;
    width: 100% !important;
}

/* Mobile: classroom view scrolls naturally */
body.meeting-active #meet-classroom-view {
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
}

body.meeting-active .classroom-grid-layout {
    height: auto !important;
    overflow: visible !important;
}

body.meeting-active .classroom-side-panel {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

body.meeting-active #class-content-attendees {
    flex-direction: column !important;
    flex: 1 1 0% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

body.meeting-active #class-content-chat {
    flex-direction: column !important;
    flex: 1 1 0% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
}

body.meeting-active #chat-messages-wrap {
    flex-grow: 1 !important;
    overflow-y: auto !important;
}

/* Toast Message Priority Layer Z-Index */
.toast-msg {
    z-index: 999999 !important; /* Forces toast to pop up on top of any profile modals */
}

/* Rotated Landscape Simulation Fallback (mainly for iOS / Safari / Portrait Lock) */
#classroom-video-container.force-landscape-simulated {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    width: 100vh !important;
    height: 100vw !important;
    transform: translate(-50%, -50%) rotate(90deg) !important;
    z-index: 99999 !important;
    background: #000 !important;
    border-radius: 0 !important;
    border: none !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 10px !important;
    box-sizing: border-box !important;
    gap: 10px !important;
}

#classroom-video-container.force-landscape-simulated #live-jitsi-embed {
    width: 100% !important;
    height: calc(100% - 70px) !important;
    flex-grow: 1 !important;
}

#classroom-video-container.force-landscape-simulated .live-control-toolbar {
    position: relative !important;
    bottom: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 100% !important;
    max-width: 340px !important;
    margin: 0 auto !important;
    z-index: 100000 !important;
    background: rgba(15, 23, 42, 0.85) !important;
    border-radius: 20px !important;
    padding: 6px 12px !important;
    gap: 8px !important;
}

/* HTML5 Native Fullscreen Override Styles */
#classroom-video-container:fullscreen {
    display: flex !important;
    flex-direction: column !important;
    padding: 15px !important;
    background: #090d16 !important;
    gap: 15px !important;
    width: 100% !important;
    height: 100% !important;
    box-sizing: border-box !important;
}
#classroom-video-container:fullscreen #live-jitsi-embed {
    flex-grow: 1 !important;
    height: calc(100% - 80px) !important;
    width: 100% !important;
}
#classroom-video-container:fullscreen .live-control-toolbar {
    position: relative !important;
    bottom: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 100% !important;
    max-width: 600px !important;
    margin: 0 auto !important;
    background: rgba(15, 23, 42, 0.9) !important;
    border-radius: 40px !important;
    padding: 10px 20px !important;
}

/* ==========================================================================
   PREMIUM ADAPTIVE MOBILE UI/UX DESIGN SYSTEM (NATIVE ZOOM/MEET LOOK)
   ========================================================================== */
@media (max-width: 768px) {
    
    body.meeting-active {
        overflow: auto !important;
        height: auto !important;
        max-height: none !important;
        position: relative !important;
    }
    
    body.meeting-active main {
        padding: 0 !important;
    }
    
    body.meeting-active #meet-classroom-view {
        height: auto !important;
        max-height: none !important;
    }
    
    body.meeting-active #classroom-grid-layout {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        gap: 16px !important;
        overflow: visible !important;
    }
    
    body.meeting-active #classroom-grid-layout > div:first-child {
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        position: relative !important;
    }
    
    body.meeting-active #live-jitsi-embed {
        height: 320px !important;
        border-radius: 16px !important;
        border: 1px solid rgba(26, 166, 148, 0.25) !important;
        overflow: hidden !important;
        background: #000 !important;
    }
    
    /* Sleek Native Mobile Bar for controls */
    .live-control-toolbar {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        transform: none !important;
        background: hsl(var(--card) / 0.8) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border: 1px solid hsl(var(--border)) !important;
        border-radius: 16px !important;
        padding: 12px !important;
        gap: 10px !important;
        z-index: 1000 !important;
        box-shadow: var(--shadow-sm) !important;
        width: 100% !important;
        max-width: 100% !important;
        justify-content: center !important;
        margin: 15px 0 0 0 !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
    }
    
    .control-circle-btn,
    .control-pill-btn {
        width: 40px !important;
        height: 40px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        justify-content: center !important;
        align-items: center !important;
        flex-shrink: 0 !important;
    }
    
    .control-circle-btn span,
    .control-pill-btn span {
        display: none !important; /* Hide labels on mobile to keep it ultra compact */
    }
    
    .control-circle-btn svg,
    .control-pill-btn svg {
        width: 18px !important;
        height: 18px !important;
    }
    
    /* Mobile Slide-Up Native Bottom Sheet for Chat and Attendees */
    body.meeting-active .classroom-side-panel {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 75vh !important;
        background: hsl(var(--card)) !important;
        border-top: 1px solid rgba(26, 166, 148, 0.25) !important;
        border-radius: 24px 24px 0 0 !important;
        z-index: 2000 !important;
        transform: translateY(100%) !important;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: 0 -15px 45px rgba(0,0,0,0.5) !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 16px 20px 24px 20px !important;
    }
    
    /* Slide bottom-sheet up when active */
    body.meeting-active .classroom-side-panel.mobile-sheet-open {
        transform: translateY(0) !important;
    }
    
    /* Bottom Sheet Native Draggable Close Handle Indicator */
    body.meeting-active .classroom-side-panel::before {
        content: "" !important;
        display: block !important;
        width: 48px !important;
        height: 5px !important;
        background: hsl(var(--foreground) / 0.18) !important;
        border-radius: 3px !important;
        margin: 0 auto 15px auto !important;
        cursor: pointer !important;
    }
    .mobile-sheet-close-btn {
        display: block !important;
    }
    .srv-desc {
        display: none !important;
    }
    .server-switch-btn {
        padding: 4px 8px !important;
        font-size: 11px !important;
        border-radius: 12px !important;
        gap: 4px !important;
    }
    #live-server-switcher-panel {
        gap: 6px !important;
        justify-content: center !important;
    }
}

/* Video Server Switcher Buttons */
.server-switch-btn {
    border-radius: 30px;
    width: auto;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 700;
    font-family: Outfit, sans-serif;
    font-size: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid transparent;
}
.server-switch-btn:hover {
    transform: translateY(-2px) scale(1.03);
}
.srv-desc {
    font-weight: 500;
    opacity: 0.85;
}

.switch-container input:checked + .slider {
    background-color: #1aa694 !important;
}
.switch-container .slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
.switch-container input:checked + .slider:before {
    transform: translateX(14px);
}

/* ==========================================
   MINT/SLATE NEW REFERENCE DESIGN COMPONENTS
   ========================================== */

/* Brand Theme Variable Overrides (Ensure Light theme has standard mint/slate and Dark theme is beautiful navy) */
:root {
    --brand-primary: #007567;
    --brand-primary-hover: #005c51;
    --brand-light-bg: #f8fafc;
    --brand-card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04), 0 2px 8px -1px rgba(15, 23, 42, 0.02);
}

.dark-theme {
    --brand-primary: #1aa694;
    --brand-primary-hover: #148f7f;
    --brand-light-bg: #060b18;
}

/* General Layouts & Containers */
.brand-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Landing Page Header Styles */
.nav-logo-text {
    font-size: 22px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.custom-nav-link {
    font-size: 14px;
    font-weight: 600;
    color: hsl(var(--foreground) / 0.65);
    transition: color 0.25s ease;
}

.custom-nav-link:hover {
    color: var(--brand-primary);
}

/* Badge Tags */
.premium-badge {
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 100px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
    margin-bottom: 20px;
}

.badge-mint {
    background: rgba(0, 117, 103, 0.08);
    color: #007567;
}
.dark-theme .badge-mint {
    background: rgba(26, 166, 148, 0.15);
    color: #1aa694;
}

.badge-blue {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
}
.dark-theme .badge-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.badge-purple {
    background: rgba(139, 92, 246, 0.08);
    color: #8b5cf6;
}

.badge-green {
    background: rgba(16, 185, 129, 0.08);
    color: #10b981;
}

/* Landing Page Visual active call preview */
.landing-call-screen-mockup {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.08);
    display: grid;
    grid-template-columns: 2.3fr 1fr;
    gap: 16px;
    padding: 16px;
    width: 100%;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.dark-theme .landing-call-screen-mockup {
    background: #0d1224;
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.mock-call-main-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mock-video-canvas-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 2.2fr 1fr;
    gap: 12px;
    flex-grow: 1;
}

.mock-video-canvas-grid-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mock-call-video-tile {
    background: #0f172a;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mock-call-video-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mock-call-tag-name {
    position: absolute;
    bottom: 8px;
    left: 8px;
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 3px 8px;
    border-radius: 6px;
}

.mock-call-icon-floating {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.6);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
    backdrop-filter: blur(4px);
}

.mock-call-participants-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 8px 12px;
    width: fit-content;
    box-sizing: border-box;
    transition: background-color 0.3s ease;
}

.dark-theme .mock-call-participants-inline {
    background: rgba(255,255,255,0.05);
}

.mock-avatar-stack {
    display: flex;
    align-items: center;
}

.mock-stack-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid #ffffff;
    margin-left: -6px;
    background-size: cover;
    background-position: center;
}
.mock-stack-avatar:first-child {
    margin-left: 0;
}

.mock-stack-text {
    font-size: 10px;
    font-weight: 700;
    color: hsl(var(--foreground) / 0.7);
}

.mock-call-bottom-toolbar {
    background: #f8fafc;
    border-radius: 16px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    transition: background-color 0.3s ease;
}

.dark-theme .mock-call-bottom-toolbar {
    background: rgba(255,255,255,0.02);
}

.mock-toolbar-center-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mock-toolbar-round-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.dark-theme .mock-toolbar-round-btn {
    background: #1e293b;
    border-color: rgba(255,255,255,0.08);
}

.mock-toolbar-round-btn:hover {
    transform: scale(1.08);
}

.mock-toolbar-round-btn.active {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
}

.mock-toolbar-round-btn.destructive {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fee2e2;
}

.dark-theme .mock-toolbar-round-btn.destructive {
    background: rgba(239, 68, 68, 0.2);
}

.mock-sidebar-chat-drawer {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.dark-theme .mock-sidebar-chat-drawer {
    background: #111827;
    border-color: rgba(255, 255, 255, 0.06);
}

.mock-sidebar-chat-header {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px;
    gap: 8px;
}

.dark-theme .mock-sidebar-chat-header {
    border-color: rgba(255, 255, 255, 0.06);
}

.mock-sidebar-tab {
    flex: 1;
    font-size: 11px;
    font-weight: 700;
    padding: 6px;
    text-align: center;
    border-radius: 8px;
    color: hsl(var(--foreground) / 0.5);
    cursor: pointer;
}

.mock-sidebar-tab.active {
    background: rgba(0, 117, 103, 0.08);
    color: var(--brand-primary);
}

.mock-sidebar-chat-messages {
    flex-grow: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}

.mock-chat-bubble-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
}

.mock-chat-sender-info {
    font-size: 9px;
    font-weight: 700;
    color: hsl(var(--foreground) / 0.5);
    display: flex;
    justify-content: space-between;
}

.mock-chat-bubble-bubble {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 11px;
    color: hsl(var(--foreground));
    word-break: break-word;
    border-top-left-radius: 2px;
}

.dark-theme .mock-chat-bubble-bubble {
    background: #1f2937;
}

.mock-chat-bubble-bubble.self {
    background: rgba(0, 117, 103, 0.08);
    border-top-left-radius: 12px;
    border-top-right-radius: 2px;
    align-self: flex-end;
}

.dark-theme .mock-chat-bubble-bubble.self {
    background: rgba(26, 166, 148, 0.15);
}

.mock-chat-file-card {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 700;
    transition: background-color 0.3s ease;
}

.dark-theme .mock-chat-file-card {
    background: rgba(255,255,255,0.02);
    border-color: rgba(255,255,255,0.1);
}

.mock-sidebar-chat-input-area {
    padding: 10px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 6px;
    align-items: center;
}

.dark-theme .mock-sidebar-chat-input-area {
    border-color: rgba(255, 255, 255, 0.06);
}

.mock-sidebar-chat-input-area input {
    flex-grow: 1;
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 11px;
}

.dark-theme .mock-sidebar-chat-input-area input {
    background: #1f2937;
}

.mock-sidebar-send-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--brand-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Feature highlight cards at bottom of landing page */
.landing-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    width: 100%;
    margin-top: 40px;
}

.landing-footer-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    text-align: left;
    transition: all 0.25s ease;
    box-shadow: var(--brand-card-shadow);
}

.dark-theme .landing-footer-card {
    background: #0d1224;
    border-color: rgba(255, 255, 255, 0.06);
}

.landing-footer-card:hover {
    transform: translateY(-4px);
    border-color: var(--brand-primary);
}

.landing-card-icon-wrapper {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(0, 117, 103, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 16px;
}

.dark-theme .landing-card-icon-wrapper {
    background: rgba(26, 166, 148, 0.15);
}

.landing-card-title {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 6px;
}

.landing-card-desc {
    font-size: 11px;
    line-height: 1.5;
    color: hsl(var(--foreground) / 0.6);
}

/* Dashboard Action Cards (LMS Lobby) */
.dashboard-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .dashboard-actions-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.dashboard-action-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    text-align: left;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--brand-card-shadow);
}

.dark-theme .dashboard-action-card {
    background: #0d1224;
    border-color: rgba(255, 255, 255, 0.06);
}

.dashboard-action-card:hover {
    transform: translateY(-3px);
    border-color: var(--brand-primary);
    box-shadow: 0 12px 24px -10px rgba(0, 117, 103, 0.15);
}

.dashboard-action-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.dashboard-action-title {
    font-size: 14px;
    font-weight: 800;
    color: hsl(var(--foreground));
    margin-bottom: 4px;
}

.dashboard-action-desc {
    font-size: 11px;
    color: hsl(var(--foreground) / 0.6);
    line-height: 1.4;
}

/* Dashboard cPanel stats grid */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    width: 100%;
    margin-top: 30px;
}

@media (max-width: 991px) {
    .dashboard-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 575px) {
    .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--brand-card-shadow);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--brand-primary);
    box-shadow: 0 12px 24px -10px rgba(0, 117, 103, 0.12);
}

.dark-theme .dashboard-stat-card {
    background: #0d1224;
    border-color: rgba(255, 255, 255, 0.06);
}

.dashboard-stat-icon-wrapper {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.dashboard-stat-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.dashboard-stat-value {
    font-size: 20px;
    font-weight: 800;
    color: hsl(var(--foreground));
    line-height: 1.2;
}

.dashboard-stat-label {
    font-size: 11px;
    font-weight: 700;
    color: hsl(var(--foreground) / 0.5);
    margin-bottom: 2px;
}

.dashboard-stat-trend {
    font-size: 9px;
    font-weight: 700;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* cPanel iOS Switches */
.ios-settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    box-sizing: border-box;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.dark-theme .ios-settings-item {
    background: rgba(255,255,255,0.02);
    border-color: rgba(255, 255, 255, 0.06);
}

.ios-settings-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: hsl(var(--foreground));
}

.ios-settings-sub {
    font-size: 9px;
    font-weight: 500;
    color: hsl(var(--foreground) / 0.5);
    margin-left: 20px;
    text-align: left;
    margin-top: 1px;
}

/* cPanel Recent Rooms Row */
.recent-rooms-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 20px 24px;
    margin-top: 30px;
    box-shadow: var(--brand-card-shadow);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.dark-theme .recent-rooms-panel {
    background: #0d1224;
    border-color: rgba(255, 255, 255, 0.06);
}

.recent-rooms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.recent-rooms-title {
    font-size: 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recent-rooms-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 991px) {
    .recent-rooms-grid {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 575px) {
    .recent-rooms-grid {
        grid-template-columns: 1fr;
    }
}

.recent-room-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.dark-theme .recent-room-card {
    background: rgba(255,255,255,0.02);
    border-color: rgba(255, 255, 255, 0.06);
}

.recent-room-card:hover {
    border-color: var(--brand-primary);
    transform: translateY(-2px);
}

.recent-room-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.recent-room-info {
    text-align: left;
    overflow: hidden;
}

.recent-room-name {
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.recent-room-time {
    font-size: 10px;
    color: hsl(var(--foreground) / 0.5);
    margin-top: 1px;
}

.recent-room-status-badge {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    width: fit-content;
    margin-top: 4px;
}

.status-live {
    background: #d1fae5;
    color: #065f46;
}

.status-ended {
    background: #e2e8f0;
    color: #475569;
}

.dark-theme .status-ended {
    background: rgba(255,255,255,0.08);
    color: #94a3b8;
}

/* Split Auth Layout (Sign Up / Log In) */
.auth-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    width: 100%;
}

@media (max-width: 991px) {
    .auth-split-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.auth-benefits-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
    margin-top: 24px;
}

.auth-benefit-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--brand-card-shadow);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.dark-theme .auth-benefit-item {
    background: #0d1224;
    border-color: rgba(255, 255, 255, 0.06);
}

.auth-benefit-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(0, 117, 103, 0.08);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.dark-theme .auth-benefit-icon {
    background: rgba(26, 166, 148, 0.15);
}

.auth-benefit-title {
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 2px;
}

.auth-benefit-desc {
    font-size: 10px;
    color: hsl(var(--foreground) / 0.5);
    line-height: 1.4;
}

.auth-form-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.06);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.dark-theme .auth-form-card {
    background: #0d1224;
    border-color: rgba(255, 255, 255, 0.06);
}

.auth-form-title {
    font-size: 24px;
    font-weight: 800;
    text-align: left;
    margin-bottom: 2px;
}

.auth-form-subtitle {
    font-size: 12px;
    color: hsl(var(--foreground) / 0.5);
    text-align: left;
    margin-bottom: 24px;
}

/* cPanel inputs styling */
.brand-form-group {
    margin-bottom: 16px;
    text-align: left;
}

.brand-form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: hsl(var(--foreground) / 0.7);
    margin-bottom: 6px;
}

.brand-form-control {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    color: hsl(var(--foreground));
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 10px;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.dark-theme .brand-form-control {
    background: #111827;
    border-color: rgba(255, 255, 255, 0.08);
}

.brand-form-control:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(0, 117, 103, 0.12);
}

.dark-theme .brand-form-control:focus {
    box-shadow: 0 0 0 3px rgba(26, 166, 148, 0.15);
}

.brand-form-control::placeholder {
    color: hsl(var(--foreground) / 0.35);
}

.brand-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    color: hsl(var(--foreground) / 0.6);
    margin-bottom: 20px;
    text-align: left;
}

.brand-checkbox-row input {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1.5px solid #cbd5e1;
    cursor: pointer;
}

.brand-teal-btn {
    width: 100%;
    background: var(--brand-primary);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.brand-teal-btn:hover {
    background: var(--brand-primary-hover);
    transform: translateY(-1px);
}

.brand-outlined-btn {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    color: hsl(var(--foreground));
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dark-theme .brand-outlined-btn {
    background: #0d1224;
    border-color: rgba(255, 255, 255, 0.08);
}

.brand-outlined-btn:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

/* Custom dropdown menu in header */
.profile-dropdown-wrapper {
    position: relative;
    cursor: pointer;
}

.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 180px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
}

.dark-theme .profile-dropdown-menu {
    background: #0d1224;
    border-color: rgba(255, 255, 255, 0.08);
}

.profile-dropdown-item {
    font-size: 12px;
    font-weight: 600;
    padding: 10px 14px;
    text-align: left;
    color: hsl(var(--foreground));
    transition: background-color 0.2s ease;
}

.profile-dropdown-item:hover {
    background: #f1f5f9;
}

.dark-theme .profile-dropdown-item:hover {
    background: rgba(255,255,255,0.04);
}

@media (max-width: 768px) {
    #live-server-switcher-panel-top {
        display: none !important;
    }
}

/* ==========================================================================
   COMPREHENSIVE MOBILE RESPONSIVENESS — ALL PAGES
   ========================================================================== */

/* ── MOBILE NAV BAR ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    /* Top nav: shrink logo and hide clock text */
    .nav-top-bar {
        padding: 0 12px !important;
        height: 54px !important;
    }

    #meet-top-clock {
        display: none !important;
    }

    /* Search input shrinks nicely */
    #lobby-search-input {
        max-width: 140px !important;
        font-size: 10px !important;
    }

    /* Join with Code button compact */
    .nav-top-bar .brand-outlined-btn {
        font-size: 10px !important;
        padding: 5px 8px !important;
    }

    /* User avatar text hidden, keep avatar circle */
    #user-info-text-block {
        display: none !important;
    }

    /* ── LOBBY PAGE LAYOUT ─────────────────────────────────────────────────── */

    /* Hero clock area */
    #lobby-big-clock {
        font-size: clamp(28px, 8vw, 44px) !important;
        text-align: center !important;
    }

    /* Left/Right grid → single column */
    .login-split-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        padding: 16px !important;
    }

    /* Welcome header */
    #meet-lobby-section h2 {
        font-size: 22px !important;
    }

    /* Action cards: 2 per row on mobile */
    .lobby-action-cards-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    .dashboard-action-card {
        padding: 14px 10px !important;
    }

    .dashboard-action-card .action-card-icon {
        font-size: 22px !important;
    }

    .dashboard-action-card h3 {
        font-size: 11px !important;
    }

    /* Participant entrance input area */
    .join-code-input-wrap {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .join-code-input-wrap input {
        font-size: 13px !important;
    }

    /* Host controls box: smaller padding */
    .ios-settings-card {
        padding: 12px !important;
    }

    /* Stats grid: 2 columns on mobile */
    .dashboard-stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    .dashboard-stat-card {
        padding: 12px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    .dashboard-stat-value {
        font-size: 24px !important;
    }

    /* Recent rooms: single column */
    #lobby-recent-rooms-grid {
        grid-template-columns: 1fr !important;
    }

    /* ── MEETING/CLASSROOM PAGE ────────────────────────────────────────────── */

    /* Room info bar: compact */
    #meet-room-info-bar {
        flex-wrap: wrap !important;
        padding: 8px 12px !important;
        gap: 6px !important;
    }

    #live-room-code-display {
        font-size: 11px !important;
    }

    /* Classroom grid: video on top, controls below */
    .classroom-grid-layout {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto !important;
        height: auto !important;
    }

    /* Video area fills screen width */
    #live-jitsi-embed,
    .classroom-video-area {
        height: 55vw !important;
        min-height: 220px !important;
        max-height: 340px !important;
    }

    /* Side panel becomes bottom drawer on mobile */
    .classroom-side-panel {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        height: 60vh !important;
        border-radius: 16px 16px 0 0 !important;
        z-index: 500 !important;
        transform: translateY(100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: 0 -8px 32px rgba(0,0,0,0.25) !important;
    }

    .classroom-side-panel.mobile-sheet-open {
        transform: translateY(0) !important;
    }

    /* Control bar at bottom of screen */
    .live-controls-bar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 400 !important;
        padding: 8px 12px !important;
        border-radius: 0 !important;
        background: hsl(var(--card)) !important;
        border-top: 1px solid hsl(var(--border)) !important;
    }

    .live-control-btn span.live-btn-label {
        display: none !important;
    }

    .live-control-btn {
        min-width: 40px !important;
        padding: 8px !important;
    }

    /* End Meeting button: smaller on mobile */
    #live-btn-end-meeting {
        font-size: 11px !important;
        padding: 6px 10px !important;
    }

    /* ── SIGN UP / LOGIN PAGES ─────────────────────────────────────────────── */

    .auth-split-layout,
    .login-split-layout {
        grid-template-columns: 1fr !important;
    }

    .auth-left-panel,
    .login-left-panel {
        display: none !important;
    }

    .auth-right-panel,
    .login-right-panel {
        padding: 24px 16px !important;
        min-height: auto !important;
    }

    .auth-form-card,
    .login-form-card {
        padding: 24px 16px !important;
        border-radius: 12px !important;
    }

    /* ── MODALS ON MOBILE ──────────────────────────────────────────────────── */

    .modal-content {
        margin: 12px !important;
        max-width: calc(100vw - 24px) !important;
        padding: 20px 16px !important;
    }

    #lobby-schedule-modal .modal-content {
        padding: 20px 16px !important;
    }

    /* ── ADMIN PAGE ────────────────────────────────────────────────────────── */

    .admin-main-grid {
        grid-template-columns: 1fr !important;
    }

    .admin-sidebar {
        position: static !important;
        height: auto !important;
        border-radius: 8px !important;
        margin-bottom: 12px !important;
    }

    /* ── GENERAL CONTAINER ─────────────────────────────────────────────────── */

    .container {
        padding: 0 14px !important;
    }

    /* Footer: center everything on mobile */
    footer .container > div:first-child {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 12px !important;
    }

    footer .container > div:first-child > div:last-child {
        justify-content: center !important;
        flex-wrap: wrap !important;
    }
}

/* Extra-small screens (phones < 420px) */
@media (max-width: 420px) {
    .lobby-action-cards-grid {
        grid-template-columns: 1fr !important;
    }

    .dashboard-stats-grid {
        grid-template-columns: 1fr !important;
    }

    #meet-lobby-section h2 {
        font-size: 18px !important;
    }

    .live-controls-bar {
        gap: 4px !important;
    }

    .live-control-btn {
        min-width: 36px !important;
        padding: 6px !important;
        font-size: 16px !important;
    }
}

/* ==========================================================================
   MOBILE UI/UX RESPONSIVENESS OVERRIDES (Strictly for viewports <= 768px)
   ========================================================================== */
@media (max-width: 768px) {
    /* Viewport scroll lock to eliminate horizontal scrolling completely */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        position: relative !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Ensure all elements fit standard screen widths */
    * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Standardized professional container padding */
    .container, .brand-container {
        padding-left: 16px !important;
        padding-right: 16px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Minimal Sticky Header on Mobile */
    header.header {
        position: sticky !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 60px !important;
        padding: 0 16px !important;
        margin: 0 !important;
        border-radius: 0 !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        z-index: 1000 !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(12px) !important;
        -webkit-backdrop-filter: blur(12px) !important;
        border-bottom: 1px solid var(--border) !important;
    }
    body.dark-theme header.header {
        background: rgba(15, 23, 42, 0.95) !important;
        border-bottom: 1px solid var(--border) !important;
    }
    
    /* Hide desktop scattered items in header */
    header .custom-nav-links,
    header .nav-links,
    header .header-actions,
    header .header-search-clock,
    header .header-user-actions,
    header .brand-container > div:nth-child(2),
    header .brand-container > div:last-child {
        display: none !important;
    }

    /* Hide the PiP/Floating Video button on mobile bottom bar */
    #live-btn-pip,
    .control-pill-btn#live-btn-pip {
        display: none !important;
    }

    /* Active Classroom Room Code & Info Bar overrides */
    .classroom-info-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        margin-bottom: 15px !important;
    }
    .classroom-info-bar > div {
        justify-content: space-between !important;
        width: 100% !important;
        flex-wrap: wrap !important;
    }
    #classroom-room-name-header {
        font-size: 16px !important;
        max-width: 180px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
    .classroom-info-bar button {
        flex-grow: 1 !important;
        font-size: 11px !important;
        min-height: 36px !important;
    }
    
    /* Ensure hamburger toggle is visible */
    .mobile-nav-toggle-btn {
        display: block !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        color: var(--navy) !important;
        padding: 8px !important;
        min-height: 44px !important;
        min-width: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    body.dark-theme .mobile-nav-toggle-btn {
        color: #cbd5e1 !important;
    }

    /* Premium Mobile Menu Drawer */
    .mobile-menu-backdrop {
        position: fixed !important;
        inset: 0 !important;
        background: rgba(9, 13, 22, 0.6) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        z-index: 99999 !important;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .mobile-menu-backdrop.open {
        opacity: 1 !important;
        visibility: visible !important;
    }
    .mobile-menu-drawer {
        position: fixed !important;
        top: 0 !important;
        right: -320px !important;
        width: 320px !important;
        height: 100vh !important;
        background: var(--surface) !important;
        border-left: 1px solid var(--border) !important;
        box-shadow: 0 10px 40px rgba(0,0,0,0.3) !important;
        z-index: 100000 !important;
        display: flex !important;
        flex-direction: column !important;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-sizing: border-box !important;
    }
    body.dark-theme .mobile-menu-drawer {
        background: #0f172a !important;
    }
    .mobile-menu-drawer.open {
        right: 0 !important;
    }
    .mobile-menu-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 16px 20px !important;
        border-bottom: 1px solid var(--border) !important;
        flex-shrink: 0 !important;
    }
    .mobile-menu-close-btn {
        background: transparent !important;
        border: none !important;
        font-size: 24px !important;
        color: hsl(var(--foreground)) !important;
        cursor: pointer !important;
        width: 44px !important;
        height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .mobile-menu-body {
        flex-grow: 1 !important;
        overflow-y: auto !important;
        padding: 24px 20px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }
    .mobile-menu-link {
        font-size: 16px !important;
        font-weight: 600 !important;
        color: hsl(var(--foreground)) !important;
        text-decoration: none !important;
        padding: 12px 0 !important;
        border-bottom: 1px solid hsl(var(--border) / 0.5) !important;
        transition: color 0.2s !important;
        display: flex !important;
        align-items: center !important;
        min-height: 44px !important;
    }
    .mobile-menu-link:hover {
        color: var(--primary) !important;
    }
    .mobile-menu-actions {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        margin-top: auto !important;
        padding-top: 20px !important;
        border-top: 1px solid var(--border) !important;
    }

    /* Thumb-friendly touch targets */
    button, 
    .btn, 
    .brand-teal-btn, 
    .brand-outlined-btn, 
    input[type="text"], 
    input[type="email"], 
    input[type="password"] {
        min-height: 44px !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        box-sizing: border-box !important;
    }

    /* Footer Accordion styling */
    .footer-links-subgrid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .footer-column-links {
        border-bottom: 1px solid var(--border) !important;
        padding-bottom: 12px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
    }
    .footer-column-links:last-child {
        border-bottom: none !important;
    }
    .footer-column-links a {
        display: none !important;
        padding: 8px 12px !important;
        background: hsl(var(--muted) / 0.1) !important;
        border-radius: 6px !important;
        margin: 2px 0 !important;
    }
    .footer-column-links.expanded a {
        display: block !important;
    }
    .footer-column-title {
        cursor: pointer !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 0 !important;
        padding: 8px 0 !important;
        user-select: none !important;
    }
    .footer-column-title::after {
        content: '▼' !important;
        font-size: 9px !important;
        color: var(--muted) !important;
        transition: transform 0.2s ease !important;
    }
    .footer-column-links.expanded .footer-column-title::after {
        transform: rotate(180deg) !important;
    }
}
/* ==========================================================================
   DESKTOP GUARD: Force-hide mobile-only elements on all screens > 768px
   These elements must NEVER be visible on desktop regardless of DOM state
   ========================================================================== */
@media (min-width: 769px) {
    #mobile-menu-drawer,
    .mobile-menu-drawer,
    #mobile-menu-backdrop,
    .mobile-menu-backdrop,
    .mobile-nav-toggle-btn {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }
}

/* ==========================================================================
   DESKTOP DUAL STACKED SIDEBAR LAYOUT (PARTICIPANTS & CHAT TOGETHER)
   ========================================================================== */
@media (min-width: 769px) {
    /* .sidebar-tab-header is no longer hidden on desktop to allow tab switching */

    #classroom-video-container {
        height: 100% !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    #live-jitsi-embed {
        flex: 1 1 0% !important;
        height: 0 !important;
        min-height: 0 !important;
    }

    body.meeting-active .classroom-side-panel,
    .classroom-side-panel {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        min-height: 0 !important;
        max-height: none !important;
        gap: 12px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* Split layout: active when neither tab-participants-active nor tab-chat-active is present (e.g. tab-both-active) */
    body.meeting-active .classroom-side-panel:not(.tab-participants-active):not(.tab-chat-active) #class-content-attendees,
    .classroom-side-panel:not(.tab-participants-active):not(.tab-chat-active) #class-content-attendees {
        display: flex !important;
        flex-direction: column !important;
        flex: 0 0 42% !important;
        height: 42% !important;
        min-height: 200px !important;
        max-height: 45% !important;
        overflow: hidden !important;
        border-bottom: 1.5px solid hsl(var(--border) / 0.8) !important;
        padding-bottom: 10px !important;
        margin-bottom: 2px !important;
    }

    body.meeting-active .classroom-side-panel:not(.tab-participants-active):not(.tab-chat-active) #class-content-chat,
    .classroom-side-panel:not(.tab-participants-active):not(.tab-chat-active) #class-content-chat {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 58% !important;
        height: 58% !important;
        min-height: 260px !important;
        overflow: hidden !important;
    }

    /* Full-height layout rules when specific tabs are active */
    body.meeting-active .classroom-side-panel.tab-participants-active #class-content-attendees,
    .classroom-side-panel.tab-participants-active #class-content-attendees {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: hidden !important;
        border-bottom: none !important;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }

    body.meeting-active .classroom-side-panel.tab-chat-active #class-content-chat,
    .classroom-side-panel.tab-chat-active #class-content-chat {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: hidden !important;
    }

    #attendees-list-wrap {
        flex-grow: 1 !important;
        overflow-y: auto !important;
        min-height: 0 !important;
    }

    #chat-messages-wrap {
        flex-grow: 1 !important;
        overflow-y: auto !important;
        min-height: 0 !important;
    }
}

/* Enforce strict scroll-free fit-to-screen layout on desktop — zoom-level agnostic */
@media (min-width: 769px) {
    body.meeting-active {
        overflow-y: hidden !important;
        overflow-x: hidden !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
    }

    body.meeting-active footer.minimal-footer {
        display: none !important;
    }

    /* Main fills exactly below the header */
    body.meeting-active main {
        flex: 1 1 0% !important;
        height: 0 !important;            /* flex child — browser calculates real height */
        min-height: 0 !important;
        padding: 12px 16px 12px 16px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }

    body.meeting-active #main-content-container {
        flex: 1 1 0% !important;
        height: 0 !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
        overflow: hidden !important;
    }

    body.meeting-active #meet-classroom-view {
        flex: 1 1 0% !important;
        height: 0 !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }

    /* Grid fills its parent completely — no fixed px offset needed */
    body.meeting-active .classroom-grid-layout {
        flex: 1 1 0% !important;
        height: 0 !important;            /* flex child: parent defines size */
        min-height: 0 !important;
        margin-top: 0 !important;
        display: grid !important;
        grid-template-rows: none !important;
        align-items: stretch !important; /* both columns same height */
        padding-bottom: 0 !important;
    }

    /* Left column — stretches inside grid row */
    body.meeting-active #classroom-video-container {
        height: 100% !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    /* Video embed eats ALL remaining height after toolbar */
    body.meeting-active #live-jitsi-embed {
        flex: 1 1 0% !important;
        height: 0 !important;            /* flex will expand it */
        min-height: 0 !important;
    }

    /* Right column — same height as left column automatically */
    body.meeting-active .classroom-side-panel {
        height: 100% !important;
        min-height: 0 !important;
        max-height: none !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
}

/* Recording Instruction Modal Styling */
#rec-instruction-modal .glass-panel {
    width: 100% !important;
    max-width: 480px !important;
    padding: 30px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(26, 166, 148, 0.25) !important;
    background: hsl(var(--card)) !important;
    color: hsl(var(--foreground)) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
    text-align: left !important;
}

body.dark-theme #rec-instruction-modal .glass-panel {
    background: rgba(14, 19, 34, 0.98) !important;
    border: 1px solid rgba(26, 166, 148, 0.2) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6) !important;
}

.rec-modal-header {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    margin-bottom: 20px !important;
}

.rec-pulse-dot {
    width: 44px !important;
    height: 44px !important;
    background: rgba(239, 68, 68, 0.12) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #ef4444 !important;
    font-size: 20px !important;
    animation: pulse 1.5s infinite !important;
    flex-shrink: 0 !important;
}

.rec-modal-title {
    font-size: 19px !important;
    font-weight: 800 !important;
    font-family: Outfit, sans-serif !important;
    color: hsl(var(--foreground)) !important;
    margin: 0 !important;
}

body:not(.dark-theme) #rec-instruction-modal h3.rec-modal-title {
    color: #0f172a !important;
}

body.dark-theme .rec-modal-title {
    color: #ffffff !important;
}

.rec-modal-subtitle {
    font-size: 11px !important;
    color: #1aa694 !important;
    margin: 3px 0 0 0 !important;
    text-transform: uppercase !important;
    font-weight: 800 !important;
    letter-spacing: 0.6px !important;
}

.rec-modal-body {
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: hsl(var(--foreground) / 0.8) !important;
    margin-bottom: 24px !important;
}

body:not(.dark-theme) #rec-instruction-modal .rec-modal-body {
    color: #334155 !important;
}

body.dark-theme .rec-modal-body {
    color: #cbd5e1 !important;
}

.rec-modal-info {
    margin: 0 0 12px 0 !important;
}

.rec-instruction-box {
    background: rgba(26, 166, 148, 0.08) !important;
    border-left: 4px solid #1aa694 !important;
    padding: 14px !important;
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

body.dark-theme .rec-instruction-box {
    background: rgba(26, 166, 148, 0.05) !important;
}

.rec-step {
    font-weight: 500 !important;
    color: hsl(var(--foreground)) !important;
}

body:not(.dark-theme) #rec-instruction-modal .rec-step {
    color: #1e293b !important;
}

body.dark-theme .rec-step {
    color: #e2e8f0 !important;
}

.rec-modal-footer {
    display: flex !important;
    gap: 12px !important;
    justify-content: flex-end !important;
}

.rec-btn-cancel {
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 10px 20px !important;
    cursor: pointer !important;
    border: 1px solid hsl(var(--border)) !important;
    border-radius: 8px !important;
    color: hsl(var(--foreground) / 0.8) !important;
    background: hsl(var(--muted) / 0.1) !important;
    transition: all 0.2s ease !important;
}

body:not(.dark-theme) #rec-instruction-modal .rec-btn-cancel {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #475569 !important;
}

body:not(.dark-theme) #rec-instruction-modal .rec-btn-cancel:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
}

.rec-btn-cancel:hover {
    background: hsl(var(--muted) / 0.2) !important;
    color: hsl(var(--foreground)) !important;
    border-color: hsl(var(--border)) !important;
}

body.dark-theme .rec-btn-cancel {
    border-color: rgba(255,255,255,0.15) !important;
    color: #ffffff !important;
    background: transparent !important;
}

body.dark-theme .rec-btn-cancel:hover {
    background: rgba(255,255,255,0.08) !important;
}

.rec-btn-start {
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 10px 24px !important;
    cursor: pointer !important;
    background: #ef4444 !important;
    border: 1px solid #ef4444 !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2) !important;
}

.rec-btn-start:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35) !important;
}

/* Sidebar Panel Toggle Specificity Enforcer */
body.side-panel-hidden .classroom-side-panel {
    display: none !important;
}

body.side-panel-hidden .classroom-grid-layout {
    grid-template-columns: 1fr !important;
}

@media (min-width: 769px) {
    body.meeting-active:not(.side-panel-hidden) .classroom-grid-layout {
        display: grid !important;
        grid-template-columns: 3fr 1.5fr !important;
    }
}


/* ==========================================================================
   MOBILE LIVE CLASSROOM LAYOUT — COMPREHENSIVE FIX (v2.2.4)
   Fixes: horizontal scroll, missing host buttons, layout overflow
   ========================================================================== */
@media (max-width: 768px) {

    /* ── 1. KILL ALL HORIZONTAL SCROLL ─────────────────────────────────── */
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    body.meeting-active,
    body.meeting-active main,
    body.meeting-active #main-content-container,
    body.meeting-active #meet-classroom-view,
    body.meeting-active #classroom-grid-layout {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    /* ── 2. CLASSROOM INFO BAR — MOBILE STACK ───────────────────────────── */
    .classroom-info-bar {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    .classroom-info-bar > div {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
    }

    /* ── 3. HOST BUTTONS — ALWAYS VISIBLE ON MOBILE ─────────────────────── */
    /* End Meeting and Leave buttons — always show on mobile */
    #btn-terminate-live,
    #btn-leave-live {
        display: inline-flex !important;
        align-items: center !important;
        font-size: 11px !important;
        padding: 7px 12px !important;
        border-radius: 8px !important;
        font-weight: 700 !important;
        min-height: 36px !important;
        flex: 1 1 auto !important;
    }
    /* Go Live / Stream button — show for host on mobile too */
    #open-stream-helper-btn {
        font-size: 11px !important;
        padding: 7px 12px !important;
        min-height: 36px !important;
    }

    /* ── 4. DESKTOP SERVER SWITCHER — HIDE ON MOBILE ────────────────────── */
    #live-server-switcher-panel-top,
    .desktop-server-switcher {
        display: none !important;
    }

    /* ── 5. CONTROL TOOLBAR WRAPPING ────────────────────────────────────── */
    .live-control-toolbar {
        flex-wrap: wrap !important;
        gap: 8px !important;
        justify-content: center !important;
        padding: 10px 8px !important;
        overflow-x: visible !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .control-circle-btn,
    .control-pill-btn {
        flex-shrink: 0 !important;
    }

    /* ── 6. VIDEO CONTAINER STRICT WIDTH ────────────────────────────────── */
    #classroom-video-container,
    #live-jitsi-embed,
    #jitsi-frame-container {
        max-width: 100% !important;
        width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    #live-jitsi-embed {
        height: 300px !important;
    }

    /* ── 7. CLASSROOM MEETING HEADER TEXT TRUNCATION ─────────────────────── */
    #classroom-room-name-header {
        max-width: 160px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        font-size: 15px !important;
    }

    /* ── 8. WHITEBOARD TOOLBAR OVERFLOW FIX ──────────────────────────────── */
    .whiteboard-controls-header {
        flex-wrap: wrap !important;
        gap: 4px !important;
        overflow-x: hidden !important;
    }
    .whiteboard-toolbar-inner {
        flex-wrap: wrap !important;
        gap: 4px !important;
    }
}
