/* 
 * Speak Flow Premium Design System
 * State-of-the-art clean glassmorphism educational portal styling.
 */

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

:root {
    --bg-primary: #FAFAFA; /* Ultra light cool grey */
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F4F4F5;
    
    --accent-primary: #4F46E5; /* Rich Indigo */
    --accent-secondary: #0EA5E9; /* Premium Cyan */
    --accent-purple: #7C3AED; /* Deep Violet */
    
    --text-main: #0F172A; /* Slate 900 */
    --text-muted: #475569; /* Slate 600 */
    --text-light: #94A3B8; /* Slate 400 */
    
    --success: #10B981;
    --success-light: #ECFDF5;
    --error: #EF4444;
    --error-light: #FEF2F2;
    --warning: #F59E0B;
    --warning-light: #FFFBEB;
    
    --border-color: rgba(226, 232, 240, 0.6); /* Softer borders */
    
    /* Premium layered shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-main: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    
    --orange-tint: #FFF7ED;
    --orange-accent: #EA580C;
    --pink-tint: #FDF2F8;
    --pink-accent: #DB2777;
    --green-tint: #ECFDF5;
    --green-accent: #059669;
    
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Smoother premium easing */
    
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 28px;
    --radius-xl: 36px;
}

/* Base resets */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    -webkit-font-smoothing: antialiased; /* Crisper text rendering */
    -moz-osx-font-smoothing: grayscale;
}

/* Glowing blur orbs for backdrop (Premium Softness) */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(160px);
    opacity: 0.12; /* Softer opacity */
    z-index: -1;
    pointer-events: none;
    animation: floatOrb 15s ease-in-out infinite alternate;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-primary) 0%, var(--accent-purple) 100%);
    top: -100px;
    left: -100px;
}
.orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-secondary) 0%, var(--accent-primary) 100%);
    bottom: -150px;
    right: -100px;
    animation-delay: -4s;
}
.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--pink-accent) 0%, var(--accent-purple) 100%);
    top: 40%;
    left: 10%;
    animation-delay: -8s;
}

@keyframes floatOrb {
    0%, 100% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) scale(1.08) rotate(10deg);
    }
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-purple) 50%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--accent-purple);
}

/* Floating Glass Navbar */
.navbar {
    position: sticky;
    top: 1rem;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 99px; /* Pill shape for premium feel */
    margin-top: 1.5rem;
    margin-bottom: 4rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.nav-links-desktop {
    display: none;
    gap: 2rem;
    align-items: center;
}
.nav-links-desktop a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}
.nav-links-desktop a:hover, .nav-links-desktop a.active {
    color: var(--text-main);
}
.nav-links-desktop a.pricing-nav-link {
    background: var(--text-main);
    color: #ffffff !important;
    padding: 0.5rem 1.5rem;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}
.nav-links-desktop a.pricing-nav-link:hover {
    background: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}
@media (min-width: 992px) {
    .nav-links-desktop {
        display: flex;
    }
}

/* Logo */
.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    letter-spacing: -0.02em;
}
.logo span {
    background: linear-gradient(135deg, var(--text-main) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.logo::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    border-radius: 50%;
    margin-right: 0.25rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    border-radius: 99px; /* Pill buttons */
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--text-main); /* Dark, premium primary buttons like Stripe/Apple */
    color: white;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.2);
}
.btn-primary:hover {
    background: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.35);
}
.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: #CBD5E1;
    transform: translateY(-2px);
    box-shadow: var(--shadow-main);
}
.btn-secondary:active {
    transform: translateY(0);
}

/* Frosted Glass Cards */
.glass-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(24px) saturate(150%);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}
.glass-card:hover {
    box-shadow: var(--shadow-hover);
}

/* Forms */
.form-card {
    max-width: 460px;
    margin: 5rem auto;
    padding: 3rem;
}
.form-group {
    margin-bottom: 1.5rem;
}
.form-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.form-control {
    width: 100%;
    padding: 0.85rem 1.2rem;
    border-radius: var(--radius-md);
    background: rgba(248, 250, 252, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.alert-error {
    background: var(--error-light);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: var(--error);
}
.alert-success {
    background: var(--success-light);
    border: 1px solid rgba(16, 185, 129, 0.15);
    color: var(--success);
}

/* Landing Page Hero Layout */
.hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 5rem;
    align-items: center;
    padding: 2rem 0 6rem 0;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.04em;
    color: var(--text-main);
}
.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    font-weight: 400;
}

@media (max-width: 960px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    .hero-title {
        font-size: 3rem;
    }
    .hero-subtitle {
        font-size: 1.15rem;
    }
    .hero > div {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

/* Pricing Card (CTA Box) */
.cta-box {
    padding: 3rem;
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15); /* Deep premium shadow */
}
.cta-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, var(--text-main), var(--accent-primary));
}
.price-tag {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    margin: 1.5rem 0;
    letter-spacing: -0.05em;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.75rem;
    color: var(--text-main);
}
.price-tag span.original {
    font-size: 1.5rem;
    color: var(--text-light);
    text-decoration: line-through;
    font-weight: 600;
}

.benefit-list {
    list-style: none;
    text-align: left;
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.benefit-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 0.95rem;
}
.benefit-list li::before {
    content: "✓";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--success-light);
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 800;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin: 6rem 0;
}
.feature-card {
    padding: 3rem 2.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(99, 102, 241, 0.2);
}
.feature-icon {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: var(--bg-primary);
}

/* Dashboard Sidebar Layout */
.app-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}
@media (max-width: 1024px) {
    .app-layout {
        grid-template-columns: 1fr;
    }
}

/* Sleek Left Sidebar */
.sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 2.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 10;
}
@media (max-width: 1024px) {
    .sidebar {
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1.5rem;
        gap: 1.5rem;
    }
}

.sidebar-logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 900;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
    letter-spacing: -0.03em;
}
.sidebar-logo span {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.sidebar-logo::before {
    content: "⚡";
    font-size: 1.35rem;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-grow: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 1.25rem;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}
.sidebar-link:hover {
    background: var(--bg-primary);
    color: var(--text-main);
}
.sidebar-link.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.sidebar-user-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Dashboard Layout Grid */
.dashboard-container {
    padding: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}
@media (max-width: 600px) {
    .dashboard-container {
        padding: 1.5rem;
    }
}

/* Header Ribbon */
.course-resume-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    box-shadow: var(--shadow-card);
}
@media (max-width: 768px) {
    .course-resume-card {
        flex-direction: column;
        text-align: center;
    }
}

/* Streak Flame Badge */
.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: var(--orange-tint);
    border: 1px solid rgba(249, 115, 22, 0.15);
    color: var(--orange-accent);
    font-family: var(--font-heading);
    font-weight: 700;
    border-radius: 50px;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.05);
}

/* Status Cards Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.status-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.status-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.status-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
}
.status-card:nth-child(1)::before { background: var(--orange-accent); }
.status-card:nth-child(2)::before { background: var(--pink-accent); }
.status-card:nth-child(3)::before { background: var(--green-accent); }

.status-info h3 {
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
}
.status-info p {
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0.5rem;
}
.status-info small {
    display: block;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Circular Progress Rings */
.progress-ring {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.progress-ring svg {
    transform: rotate(-90deg);
}
.progress-ring-circle {
    fill: none;
    stroke-width: 6;
    stroke-linecap: round;
}
.progress-ring-bg {
    stroke: var(--bg-tertiary);
}

/* Dashboard Panel Container */
.panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-card);
    margin-bottom: 2rem;
}

/* Video Container styling */
.video-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: #090d16;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
}
.video-vsl-container iframe,
.video-container iframe {
    position: absolute !important;
    top: -18% !important;
    left: -18% !important;
    width: 136% !important;
    height: 136% !important;
    border: none !important;
}
.video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 2rem;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    text-align: center;
}
.video-placeholder-icon {
    font-size: 3.5rem;
    color: var(--accent-primary);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1rem;
    animation: pulsePlay 2s infinite;
}
.video-placeholder-icon:hover {
    transform: scale(1.15);
    color: var(--accent-secondary);
}

@keyframes pulsePlay {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
    }
    50% {
        transform: scale(1.08);
        text-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
    }
}

/* Checklist Styling */
.checklist-section {
    margin: 2.5rem 0;
}
.checklist-title {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
}
.checklist-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: var(--bg-primary);
    padding: 1.15rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    cursor: pointer;
    margin-bottom: 0.85rem;
    transition: var(--transition);
}
.checklist-item:hover {
    border-color: var(--accent-primary);
    background: var(--bg-secondary);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}
.checkbox-custom {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    background: white;
    flex-shrink: 0;
}
.checklist-item.checked .checkbox-custom {
    background: var(--success);
    border-color: var(--success);
    color: white;
}
.checklist-item.checked .checkbox-custom::before {
    content: "✓";
    font-weight: 900;
    font-size: 0.85rem;
}
.checklist-item.checked .checklist-text {
    text-decoration: line-through;
    color: var(--text-light);
}
.checklist-text {
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

/* Shadows practice recorder */
.recorder-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: var(--radius-md);
    margin: 2.5rem 0;
}

/* Calendar styling */
.calendar-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-card);
}
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 800;
}
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    text-align: center;
}
.calendar-day-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    padding-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.calendar-date {
    font-size: 0.85rem;
    font-weight: 600;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-main);
    transition: var(--transition);
    cursor: pointer;
}
.calendar-date.active-study {
    background: var(--success-light);
    color: var(--success);
    font-weight: 700;
    border: 1.5px solid var(--success);
}
.calendar-date.today {
    background: var(--accent-primary);
    color: white;
    font-weight: 700;
}

/* Quiz Card widget */
.quiz-card {
    background: var(--orange-tint);
    border: 1px solid rgba(249, 115, 22, 0.15);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin: 2.5rem 0;
}
.quiz-question {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}
.quiz-option-btn {
    text-align: left;
    width: 100%;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}
.quiz-option-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
}
.quiz-option-btn.selected {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* Discussion / comments feed */
.comments-section {
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 3rem;
}
.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.comment-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.comment-item:hover {
    border-color: rgba(99, 102, 241, 0.15);
    background: var(--bg-secondary);
}
.comment-item.instructor-reply {
    border-left: 4px solid var(--accent-purple);
    background: #fbfbfe;
}
.comment-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}
.comment-body {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.6;
}
.instructor-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    background: #e0e7ff;
    color: #4f46e5;
    margin-left: 0.25rem;
}

/* Badges Unlocked Sidebar tray */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(45px, 1fr));
    gap: 0.75rem;
}
.badge-slot {
    aspect-ratio: 1;
    border-radius: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
    cursor: help;
}
.badge-slot:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.badge-slot.locked {
    opacity: 0.25;
    background: #f1f5f9;
}

/* Timeline vertical list selector */
.timeline-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}
.timeline-item:hover {
    border-color: var(--accent-primary);
    background: var(--bg-primary);
    transform: translateX(4px);
}
.timeline-item.active {
    background: var(--bg-secondary);
    border: 2px solid var(--accent-primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.08);
}
.timeline-item.locked {
    opacity: 0.55;
    background: var(--bg-tertiary);
    cursor: not-allowed;
}
.timeline-item.locked:hover {
    transform: none;
    border-color: var(--border-color);
}
.timeline-status {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
}
.timeline-status.complete {
    background: var(--success-light);
    color: var(--success);
}
.timeline-status.progress {
    background: #eff6ff;
    color: #2563eb;
}
.timeline-status.lock {
    background: #f1f5f9;
    color: #94a3b8;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Layout spacing */
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Premium Flashcard Widget */
.flashcard-section {
    margin: 2.5rem 0;
}
.flashcard-container {
    perspective: 1000px;
    width: 100%;
    height: 200px;
    cursor: pointer;
    margin-top: 1rem;
}
.flashcard {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.flashcard.flipped {
    transform: rotateY(180deg);
}
.flashcard-front, .flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-md);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
    border: 1px solid var(--border-color);
    text-align: center;
}
.flashcard-front {
    background: rgba(255, 107, 107, 0.03);
    border-color: rgba(255, 107, 107, 0.15);
}
.flashcard-back {
    background: rgba(46, 213, 115, 0.03);
    border-color: rgba(46, 213, 115, 0.2);
    transform: rotateY(180deg);
}
.flashcard-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    margin-bottom: 1rem;
}
.flashcard-front .flashcard-tag {
    background: rgba(255, 107, 107, 0.1);
    color: #ff4757;
}
.flashcard-back .flashcard-tag {
    background: rgba(46, 213, 115, 0.1);
    color: #2ed573;
}
.flashcard-phrase {
    font-size: 1.4rem;
    font-weight: 800;
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
    color: var(--text-main);
}
.flashcard-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Leaderboard Widget */
.leaderboard-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    margin-top: 1.5rem;
}
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
}
.leaderboard-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}
.leaderboard-row:hover {
    border-color: var(--accent-primary);
    transform: translateX(4px);
}
.leaderboard-row.user-row {
    background: rgba(99, 102, 241, 0.03);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.04);
}
.leaderboard-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.leaderboard-rank {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    background: var(--bg-tertiary);
    color: var(--text-muted);
}
.leaderboard-row:nth-child(1) .leaderboard-rank { background: #ffd700; color: #7f6a00; } /* Gold */
.leaderboard-row:nth-child(2) .leaderboard-rank { background: #c0c0c0; color: #5c5c5c; } /* Silver */
.leaderboard-row:nth-child(3) .leaderboard-rank { background: #cd7f32; color: #6d4117; } /* Bronze */

.leaderboard-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}
.leaderboard-xp {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.08);
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
}

/* Analytics Widget */
.analytics-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    margin-top: 1.5rem;
}
.analytics-chart {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 120px;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}
.analytics-bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
    height: 100%;
    justify-content: flex-end;
    gap: 0.5rem;
}
.analytics-bar-fill {
    width: 18px;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-purple));
    border-radius: 4px 4px 0 0;
    transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: help;
}
.analytics-bar-fill::after {
    content: attr(data-value) "m";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, -4px) scale(0.85);
    background: #0f172a;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
    white-space: nowrap;
}
.analytics-bar-fill:hover::after {
    opacity: 1;
    transform: translate(-50%, -4px) scale(1);
}
.analytics-bar-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* XP floating animation */
.xp-pop {
    position: fixed;
    color: #2ed573;
    font-size: 1.25rem;
    font-weight: 900;
    pointer-events: none;
    z-index: 9999;
    animation: fadeUpPop 1s ease-out forwards;
}
@keyframes fadeUpPop {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-30px); opacity: 0; }
}

/* ==========================================================================
   Comprehensive Mobile Responsiveness & Layout Overrides
   ========================================================================== */

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Mobile Header Top Bar */
.mobile-header {
    display: none;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.25rem;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    box-shadow: var(--shadow-main);
}
.menu-toggle-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.menu-toggle-btn:hover {
    background: var(--bg-tertiary);
}
.mobile-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--text-main);
    text-decoration: none;
}
.mobile-logo span {
    color: var(--accent-primary);
}

/* Collapsible Sidebar Drawer on Mobile & Tablets */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }
    .sidebar {
        position: fixed;
        top: 0;
        left: -280px; /* Hidden by default */
        width: 280px;
        height: 100vh;
        z-index: 1100;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        background: var(--bg-secondary);
        border-right: 1px solid var(--border-color);
        box-shadow: 0 0 40px rgba(15, 23, 42, 0.15);
        padding: 2.5rem 1.5rem;
        gap: 1.5rem;
    }
    .sidebar.open {
        transform: translateX(280px); /* Slide in from left */
    }
    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(15, 23, 42, 0.4);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 1050;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    .sidebar-backdrop.show {
        opacity: 1;
        visibility: visible;
    }
    .sidebar-close-btn {
        display: flex !important;
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: none;
        border: none;
        font-size: 1.25rem;
        color: var(--text-muted);
        cursor: pointer;
        padding: 0.25rem;
    }
    .sidebar-logo {
        margin-bottom: 2rem;
    }
    .sidebar-menu {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: auto;
    }
    .sidebar-link {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        gap: 0.75rem;
    }
    .sidebar-footer {
        border-top: 1px solid var(--border-color);
        padding-top: 1.5rem;
        margin-top: 1.5rem;
    }
    .sidebar-user-info {
        display: block;
        margin-bottom: 0.5rem;
    }

    /* Shift main content on mobile */
    .app-layout {
        grid-template-columns: 1fr !important;
        display: block !important;
    }
    .dashboard-container {
        padding: 1.25rem;
        margin-top: 0;
    }
    
    /* Panel Padding Reductions to maximize content width */
    .panel {
        padding: 1.25rem;
    }
    .course-resume-card {
        padding: 1.25rem;
        gap: 1rem;
    }
    .flashcard-section {
        margin-top: 1.5rem;
        padding: 1rem !important;
    }
    
    /* Landing page navbar & banner mobile refinements */
    .navbar {
        padding: 0.75rem 1.25rem;
        margin-top: 1rem;
        margin-bottom: 2rem;
    }
    .navbar .logo {
        font-size: 1.4rem;
    }
    .navbar .logo::before {
        font-size: 1.25rem;
    }
    #nav-login-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    .urgency-banner {
        font-size: 0.8rem;
        padding: 0.6rem 0.75rem;
        margin-bottom: 1.5rem;
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }

    /* Container padding reduction for mobile */
    .container {
        padding: 0 1.25rem;
    }

    /* Hero section mobile */
    .hero {
        gap: 2rem;
        padding: 1rem 0 2rem 0;
    }
    .hero-title {
        font-size: 2.25rem;
        line-height: 1.2;
    }
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    .cta-box {
        padding: 2rem 1.5rem;
    }
    .price-tag {
        font-size: 2.75rem;
    }

    /* All section margins reduced on mobile */
    .problem-solution-section,
    .testimonials-section,
    .faq-section {
        margin: 3rem 0;
    }
    section[style*="margin: 6rem 0"] {
        margin-top: 3rem !important;
        margin-bottom: 3rem !important;
    }

    /* Section heading sizes on mobile */
    h2[style*="font-size: 2.2rem"] {
        font-size: 1.65rem !important;
    }

    /* Features grid: single column on mobile */
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
        margin: 3rem 0;
    }
    .feature-card {
        padding: 2rem 1.5rem;
    }

    /* Comparison cards */
    .comp-card {
        padding: 1.5rem;
    }
    .comp-card h4 {
        font-size: 1.1rem;
    }
    .comp-list li {
        font-size: 0.88rem;
    }

    /* Syllabus grid */
    .syllabus-grid {
        grid-template-columns: 1fr !important;
        padding: 0.5rem;
        gap: 1rem;
    }
    .syllabus-day-card {
        padding: 1.25rem;
    }

    /* Testimonials */
    .testimonial-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }
    .test-card {
        padding: 1.5rem;
    }

    /* FAQ */
    .faq-list {
        margin-top: 2rem !important;
    }

    /* Final CTA glass card */
    section.glass-card {
        padding: 2rem 1.5rem !important;
        margin: 3rem 0 !important;
    }
    section.glass-card h2 {
        font-size: 1.65rem !important;
    }
    section.glass-card p {
        font-size: 0.95rem !important;
    }
    section.glass-card .btn-primary {
        font-size: 1.05rem !important;
        padding: 0.85rem 2rem !important;
        width: 100%;
    }

    /* Footer */
    footer {
        padding: 2rem 0 !important;
        font-size: 0.85rem !important;
    }
}

/* Compact status cards grid and fonts on smaller mobile screens */
@media (max-width: 600px) {
    .status-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .status-card {
        padding: 1rem 0.75rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }
    .status-card::before {
        width: 100%;
        height: 3px;
        left: 0;
        top: 0;
    }
    .status-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .status-info h3 {
        font-size: 1.35rem;
    }
    .status-info p {
        font-size: 0.75rem;
        margin-top: 0.2rem;
    }
    .status-info small {
        font-size: 0.65rem;
    }
    .progress-ring {
        width: 48px;
        height: 48px;
    }
    .progress-ring svg {
        width: 48px;
        height: 48px;
    }
    
    /* Center text inside voice recorder & details */
    .video-placeholder h3 {
        font-size: 1.1rem;
    }
}

/* Comment date wrapping and primary button centering on narrow screens */
@media (max-width: 480px) {
    .comment-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    .comment-meta span {
        font-size: 0.75rem;
    }
    .comment-item {
        padding: 1rem;
    }
    
    /* Make hero page primary button full-width */
    .hero #cta-buy-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    /* Adjust FAQ trigger items padding */
    .faq-question {
        padding: 1rem !important;
        font-size: 0.95rem;
    }

    /* Form Card responsiveness on small screens */
    .form-card {
        padding: 2.25rem 1.5rem !important;
        margin: 3rem auto !important;
        width: 100% !important;
    }
}

/* Recent Activity Log */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
}
.activity-icon {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-tertiary);
}
.activity-details {
    flex-grow: 1;
}
.activity-text {
    font-size: 0.85rem;
    color: var(--text-main);
    font-weight: 500;
}
.activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* Daily Fluency Tip */
.tip-card {
    border: 1px solid rgba(249, 115, 22, 0.2);
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.03), rgba(249, 115, 22, 0.01));
}
.tip-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.tip-title {
    font-size: 1.1rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: #f97316;
}
.tip-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
@media (max-width: 600px) {
    .tip-comparison-grid {
        grid-template-columns: 1fr;
    }
}
.tip-box {
    padding: 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    line-height: 1.4;
}
.tip-box.wrong {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #ef4444;
}
.tip-box.right {
    background: rgba(34, 197, 94, 0.05);
    border: 1px solid rgba(34, 197, 94, 0.15);
    color: #22c55e;
}
.tip-box-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}
.tip-explanation {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-muted);
    border-left: 3px solid #f97316;
    padding-left: 0.75rem;
}

/* FAQ Accordion */
.faq-search-wrapper {
    margin-bottom: 1.5rem;
}
.faq-filter-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.faq-filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}
.faq-filter-btn:hover, .faq-filter-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    overflow: hidden;
    transition: var(--transition);
}
.faq-item.active {
    border-color: var(--accent-primary);
}
.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    font-family: var(--font-heading);
}
.faq-question:hover {
    background: var(--bg-tertiary);
}
.faq-question-arrow {
    transition: transform 0.3s ease;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.faq-item.active .faq-question-arrow {
    transform: rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    padding: 0 1.5rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
    background: var(--bg-secondary);
}
.faq-item.active .faq-answer {
    max-height: 500px;
    padding-bottom: 1.25rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

@media (prefers-reduced-motion: reduce) {
    .orb {
        animation: none !important;
        transform: none !important;
        transition: none !important;
    }
}

/* 
 * Dark Mode Theme Overrides
 */
body.dark-mode {
    --bg-primary: #0f172a; /* Slate 900 */
    --bg-secondary: #1e293b; /* Slate 800 */
    --bg-tertiary: #334155; /* Slate 700 */
    
    --accent-primary: #818cf8; /* Light Indigo */
    --accent-secondary: #22d3ee; /* Light Cyan */
    --accent-purple: #a78bfa; /* Light Violet */
    
    --text-main: #f8fafc; /* Slate 50 */
    --text-muted: #94a3b8; /* Slate 400 */
    --text-light: #64748b; /* Slate 500 */
    
    --border-color: rgba(51, 65, 85, 0.5); /* Slate 700 soft */
    
    --shadow-main: 0 4px 20px -2px rgba(0, 0, 0, 0.3), 0 2px 6px -1px rgba(0, 0, 0, 0.2);
    --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 10px 15px -5px rgba(0, 0, 0, 0.3);
    
    --orange-tint: #2d1e10;
    --pink-tint: #2d1020;
    --green-tint: #062e1e;
}

/* Additional Dark Mode Fixes */
body.dark-mode .sidebar {
    background: #0f172a;
    border-right: 1px solid rgba(51, 65, 85, 0.5);
}
body.dark-mode .glass-card, body.dark-mode .panel, body.dark-mode .form-card, body.dark-mode .course-resume-card {
    background: #1e293b;
    border-color: rgba(51, 65, 85, 0.5);
}
body.dark-mode .form-control {
    background: #0f172a;
    border-color: rgba(51, 65, 85, 0.5);
    color: #f8fafc;
}
body.dark-mode .form-control::placeholder {
    color: #475569;
}
body.dark-mode .comment-item {
    background: #0f172a;
    border-color: rgba(51, 65, 85, 0.5);
}
body.dark-mode .comment-item.instructor-reply {
    background: rgba(139, 92, 246, 0.05);
    border-color: rgba(139, 92, 246, 0.4);
}
body.dark-mode .week-header {
    background: #334155;
    border-color: rgba(51, 65, 85, 0.5);
}
body.dark-mode .week-header:hover {
    background: #1e293b;
}
body.dark-mode .timeline-item {
    background: #0f172a;
}
body.dark-mode .timeline-item:hover {
    background: #334155;
}
body.dark-mode .timeline-item.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--accent-primary);
}
body.dark-mode .calendar-date {
    background: #0f172a;
    border-color: rgba(51, 65, 85, 0.3);
}
body.dark-mode .calendar-date.active-study {
    background: rgba(249, 115, 22, 0.2);
    border-color: var(--orange-accent);
}
body.dark-mode .calendar-date.clickable-day:hover {
    background: var(--bg-tertiary);
}
body.dark-mode .flashcard-inner {
    background: #1e293b;
    border-color: rgba(51, 65, 85, 0.5);
}
body.dark-mode .flashcard-front, body.dark-mode .flashcard-back {
    background: #1e293b;
    color: #f8fafc;
}
body.dark-mode .flashcard-icon-hint {
    background: #334155;
    color: #f8fafc;
}

/* Waveform for recording */
.waveform {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 20px;
}
.wave-bar {
    width: 3px;
    height: 100%;
    background: #ef4444;
    border-radius: 1px;
    animation: bounceWave 0.6s ease-in-out infinite alternate;
}
@keyframes bounceWave {
    from { height: 4px; }
    to { height: 20px; }
}

/* Toast System */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 10000;
}
.toast {
    background: var(--bg-secondary);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 400px;
    transform: translateY(50px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}
.toast.show {
    transform: translateY(0);
    opacity: 1;
}
.toast-success {
    border-left: 4px solid var(--success);
}
.toast-error {
    border-left: 4px solid var(--error);
}
.toast-warning {
    border-left: 4px solid var(--warning);
}

/* Checklist Updating / Lock State */
.checklist-item.updating {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}
.checklist-item.updating::after {
    content: '⏳';
    position: absolute;
    right: 1rem;
    animation: rotateHourglass 1.2s linear infinite;
}
@keyframes rotateHourglass {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
    100% { transform: rotate(180deg); }
}

/* Week Accordion styles */
.week-header {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    width: 100%;
    text-align: left;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: var(--transition);
    font-family: var(--font-heading);
}
.week-header:hover {
    background: var(--bg-primary);
}
.week-content {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0.25rem;
}
.week-content.show {
    display: flex;
}
.week-header .chevron {
    transition: transform 0.3s;
    font-size: 0.75rem;
}
.week-group.open .week-header .chevron {
    transform: rotate(180deg);
}

/* Accessibility: Focus visible outline states for interactive elements */
button:focus-visible, 
a:focus-visible, 
input:focus-visible, 
textarea:focus-visible, 
select:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 3px;
}

/* Course Curriculum Page Refactored Layout */

/* Timeline top panel grid styling */
.timeline-top-panel .week-accordion {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.timeline-top-panel .week-group {
    display: flex;
    flex-direction: column;
}

.timeline-top-panel .week-content {
    flex-grow: 1;
}

.curriculum-main-focus {
    width: 100%;
    box-sizing: border-box;
}

/* === Video + Timeline Desktop Side-by-Side Layout === */
.video-timeline-desktop-row {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
}

.video-timeline-desktop-row .video-player-panel {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
}

/* Desktop sidebar - hidden by default (mobile first) */
.timeline-desktop-sidebar {
    display: none;
}

/* Desktop: show sidebar, hide mobile panel */
@media (min-width: 1200px) {
    .timeline-mobile-only {
        display: none !important;
    }

    .curriculum-main-focus {
        max-width: none;
    }

    .video-timeline-desktop-row {
        flex-direction: row;
        gap: 1.25rem;
        align-items: stretch;
    }

    .video-timeline-desktop-row .video-player-panel {
        flex: 1 1 63%;
        max-width: 63%;
        margin-bottom: 0 !important;
    }

    .timeline-desktop-sidebar {
        display: flex;
        flex-direction: column;
        flex: 1 1 37%;
        max-width: 37%;
        padding: 1rem 1.25rem;
        position: sticky;
        top: 1rem;
        align-self: flex-start;
        max-height: calc(100vh - 2rem);
        overflow: hidden;
        box-sizing: border-box;
    }

    .timeline-desktop-sidebar .sidebar-week-accordion {
        flex: 1;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: var(--accent-primary) transparent;
    }

    .timeline-desktop-sidebar .sidebar-week-accordion::-webkit-scrollbar {
        width: 4px;
    }
    .timeline-desktop-sidebar .sidebar-week-accordion::-webkit-scrollbar-track {
        background: transparent;
    }
    .timeline-desktop-sidebar .sidebar-week-accordion::-webkit-scrollbar-thumb {
        background: var(--accent-primary);
        border-radius: 4px;
    }

    .timeline-desktop-sidebar .timeline-item {
        border-radius: var(--radius-sm);
        transition: var(--transition);
    }
    .timeline-desktop-sidebar .timeline-item:hover:not(.locked):not(.active) {
        background: var(--bg-secondary);
        transform: translateX(2px);
    }
}

/* Responsive styles for mobile timeline */
@media (max-width: 1199px) {
    .timeline-mobile-only {
        display: block;
    }
}

@media (max-width: 992px) {
    .timeline-top-panel .week-accordion {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .timeline-top-panel .week-accordion {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* ==========================================================================
   Premium Custom Branded Video Player
   ========================================================================== */
.custom-video-player-wrapper {
    position: relative;
    width: 100%;
    background: #000000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.custom-video-player-wrapper:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

/* Click overlay intercepts clicks on iframe to prevent YouTube default behavior */
.video-click-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    cursor: pointer;
}

/* Big center play button */
.center-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
    opacity: 1;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 0px rgba(99, 102, 241, 0.4);
}

.custom-video-player-wrapper.playing .center-play-overlay {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
}

.custom-video-player-wrapper:hover .center-play-overlay {
    background: rgba(99, 102, 241, 0.85);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
}

/* Custom player controls bar */
.custom-player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.6) 60%, transparent 100%);
    padding: 2rem 1.25rem 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 7;
    opacity: 0;
    transform: translateY(5px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.custom-video-player-wrapper:hover .custom-player-controls,
.custom-video-player-wrapper.controls-visible .custom-player-controls {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Custom progress bar elements */
.custom-progress-container {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
    padding: 0.25rem 0;
}

.custom-progress-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    transition: height 0.1s ease;
}

.custom-progress-container:hover .custom-progress-slider {
    height: 7px;
}

.custom-progress-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 100%;
    border-radius: 3px;
}

.custom-progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
    cursor: pointer;
    margin-top: -3.5px;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.custom-progress-container:hover .custom-progress-slider::-webkit-slider-thumb {
    opacity: 1;
}

.custom-progress-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border: none;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.custom-progress-container:hover .custom-progress-slider::-moz-range-thumb {
    opacity: 1;
}

/* Volume Slider styling */
.custom-volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.custom-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
}

.custom-volume-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
}

/* Control Buttons styles */
.player-control-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.15rem;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    transition: background 0.2s ease, transform 0.1s ease;
}

.player-control-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--accent-primary);
    transform: scale(1.05);
}

.player-control-btn:active {
    transform: scale(0.95);
}

.time-display {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    font-weight: 500;
    font-family: monospace, var(--font-body);
    margin-left: 0.5rem;
}


