/* ==========================================
   AI Classroom - Styles v2.0
   ========================================== */

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

:root {
    /* Enhanced color palette - Cohesive & Professional */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.1);
    --secondary-color: #8b5cf6;
    --secondary-hover: #7c3aed;
    --accent-color: #06b6d4;
    --accent-hover: #0891b2;
    --success-color: #10b981;
    --success-hover: #059669;
    --warning-color: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --error-color: #ef4444;
    --dark-bg: #1e293b;
    --light-bg: #334155;
    --card-bg: #475569;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #64748b;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-hover: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    
    /* Typography Scale - Professional & Consistent */
    --font-xs: 0.75rem;      /* 12px */
    --font-sm: 0.875rem;     /* 14px */
    --font-base: 1rem;       /* 16px */
    --font-lg: 1.125rem;     /* 18px */
    --font-xl: 1.25rem;      /* 20px */
    --font-2xl: 1.5rem;      /* 24px */
    --font-3xl: 1.875rem;    /* 30px */
    --font-4xl: 2.25rem;     /* 36px */
    
    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* Light Mode Variables (when toggled) */
[data-theme="light"] {
    --primary-color: #3b82f6;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] body {
    background-color: var(--light-bg);
}

/* Dark mode body background */
[data-theme="dark"] body {
    background-color: var(--dark-bg);
}

/* Light mode hero section */
[data-theme="light"] .hero {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
}

/* Dark mode for all cards */
[data-theme="dark"] .tech-card,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .progress-card,
[data-theme="dark"] .module-card,
[data-theme="dark"] .demo-card,
[data-theme="dark"] .next-step-card {
    background: var(--card-bg);
}

/* Dark mode for sections */
[data-theme="dark"] .features-section {
    background: var(--light-bg);
}

/* Dark mode for inputs and selects */
[data-theme="dark"] .demo-input,
[data-theme="dark"] .demo-textarea,
[data-theme="dark"] .filter-select,
[data-theme="dark"] .filter-input {
    background: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--border-color);
}

/* Dark mode for message items */
[data-theme="dark"] .message-item {
    background: var(--card-bg);
}

/* Dark mode for learning sidebar */
[data-theme="dark"] .learning-sidebar {
    background: var(--card-bg);
    border-right-color: var(--border-color);
}

[data-theme="dark"] .sidebar-step:hover {
    background: var(--light-bg);
}

/* Dark mode for navbar */
[data-theme="dark"] .navbar {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}

/* Dark mode for footer */
[data-theme="dark"] .footer {
    background: #0a0f1e;
}

/* Dark mode tech cards in hero */
[data-theme="dark"] .tech-card {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(71, 85, 105, 0.4);
}

[data-theme="dark"] .tech-card-primary {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(96, 165, 250, 0.4);
}

/* Dark mode hero callout */
[data-theme="dark"] .hero-callout {
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(71, 85, 105, 0.5);
}

/* Dark mode buttons - keep them visible */
[data-theme="dark"] .btn-primary {
    background: var(--gradient);
    color: white;
}

[data-theme="dark"] .btn-secondary {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Dark mode loading overlay */
[data-theme="dark"] .loading-overlay {
    background: rgba(15, 23, 42, 0.95);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--dark-bg);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark Mode Toggle */
#darkModeToggle {
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

#darkModeToggle:hover {
    transform: scale(1.1);
    transform: rotate(20deg);
}

.theme-icon {
    display: inline-block;
    transition: all 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ========================================== 
   NAVIGATION 
   ========================================== */

.navbar {
    background: var(--card-bg);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.5rem;
    cursor: pointer;
}

.logo {
    font-size: 2rem;
}

.brand-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s;
}

.user-menu-btn:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-xl);
    min-width: 240px;
    display: none;
    z-index: 1001;
}

.user-menu-dropdown.show {
    display: block;
}

.user-menu-header {
    padding: 1rem;
}

.user-menu-name {
    font-weight: 600;
    color: var(--text-primary);
}

.user-menu-email {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.user-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

.user-menu-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 0.9375rem;
}

.user-menu-item:hover {
    background: var(--light-bg);
    color: var(--text-primary);
}

/* ========================================== 
   BUTTONS 
   ========================================== */

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    font-size: var(--font-base);
    line-height: 1.5;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--light-bg);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background 0.2s;
}

.btn-icon:hover {
    background: var(--light-bg);
}

.btn-back {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9375rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.btn-back:hover {
    background: var(--light-bg);
    color: var(--text-primary);
}

/* ========================================== 
   PAGE SECTIONS 
   ========================================== */

.page-section {
    display: none;
    min-height: calc(100vh - 200px);
}

.page-section.active {
    display: block;
}

/* ========================================== 
   HERO SECTION 
   ========================================== */

.hero {
    padding: 5rem 0;
    background: linear-gradient(135deg, #1e3a8a 0%, #312e81 100%);
    color: white;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 1.5rem;
}

.hero-callout {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    margin: 0 auto 2rem;
    max-width: 600px;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

.callout-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.callout-text {
    font-size: 1rem;
    font-weight: 600;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 20px 5px rgba(255, 255, 255, 0.2);
    }
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero .btn-primary {
    background: white;
    color: #1e3a8a;
}

.hero .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: white;
}

[data-theme="light"] .hero .btn-primary {
    color: var(--primary-color);
}

/* Tech Stack Cards */
.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.tech-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s;
    position: relative;
}

.tech-card:hover {
    transform: translateY(-5px);
}

.tech-card-primary {
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.1);
}

.card-badge {
    position: absolute;
    top: -10px;
    right: 10px;
    background: var(--warning-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tech-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.tech-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* ========================================== 
   FEATURES SECTION 
   ========================================== */

.features-section {
    padding: 5rem 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    background: var(--light-bg);
    border-radius: 1rem;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* ========================================== 
   DASHBOARD 
   ========================================== */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
}

.dashboard-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Progress Overview Cards */
.progress-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.progress-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-card-icon {
    font-size: 2.5rem;
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
    border-radius: 0.75rem;
}

.progress-card-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.progress-card-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Continue Section */
.continue-section {
    margin-bottom: 3rem;
}

.continue-section h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.next-step-card {
    background: var(--gradient);
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.next-step-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.next-step-card h3 {
    font-size: 1.875rem;
    margin-bottom: 0.5rem;
}

.next-step-card p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.next-step-card .btn {
    background: white;
    color: var(--primary-color);
}

.completed-card {
    background: var(--success-color);
    color: white;
    padding: 3rem;
    border-radius: 1rem;
    text-align: center;
}

.completed-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* My Classes Section */
.my-classes-section {
    margin-bottom: 3rem;
}

.my-classes-section h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.my-classes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.my-class-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    transition: all 0.3s;
    cursor: pointer;
}

.my-class-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.my-class-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.my-class-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.class-badge {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.my-class-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    min-height: 2.5rem;
}

.class-progress-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.progress-item {
    text-align: center;
    padding: 0.75rem;
    background: var(--light-bg);
    border-radius: 0.5rem;
}

.progress-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.progress-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.my-class-progress-bar {
    height: 8px;
    background: var(--light-bg);
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.my-class-progress-fill {
    height: 100%;
    background: var(--gradient);
    transition: width 0.5s;
}

.my-class-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.class-status {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.certificate-ready {
    background: var(--success-color);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Available Classes Section */
.available-classes-section {
    margin-bottom: 3rem;
}

.available-classes-section h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.available-classes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.available-class-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

.available-class-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.available-class-card.enrolled {
    border-color: var(--success-color);
    background: #ecfdf5;
}

.available-class-card.enrolled p,
.available-class-card.enrolled .available-class-description {
    color: #0f766e;
}

.available-class-header {
    margin-bottom: 1rem;
}

.available-class-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.available-class-trainer {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.available-class-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.available-class-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.class-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.enrolled-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--success-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Dark mode for join class */
[data-theme="dark"] .available-class-card {
    background: var(--card-bg);
}

[data-theme="dark"] .available-class-card.enrolled {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success-color);
}

/* Modules Overview */
.modules-overview {
    margin-bottom: 3rem;
}

.modules-overview h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.modules-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.module-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.module-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.module-card.module-completed {
    border-color: var(--success-color);
    background: linear-gradient(to right, #ecfdf5, white);
}

.badge-completed {
    background: var(--success-color);
    color: white;
}

[data-theme="dark"] .module-card.module-completed {
    background: linear-gradient(to right, rgba(16, 185, 129, 0.1), var(--card-bg));
    border-color: var(--success-color);
}

.module-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.module-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.module-badge {
    background: var(--light-bg);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.module-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.module-progress-bar {
    height: 8px;
    background: var(--light-bg);
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.module-progress-fill {
    height: 100%;
    background: var(--gradient);
    transition: width 0.5s;
}

.module-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.module-progress-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
}

[data-theme="dark"] .empty-state {
    background: var(--card-bg);
}

/* ========================================== 
   LEARNING PAGE 
   ========================================== */

.learning-container {
    display: flex;
    min-height: calc(100vh - 80px);
}

.learning-sidebar {
    width: 320px;
    background: white;
    border-right: 1px solid var(--border-color);
    padding: 2rem 1rem;
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 2rem;
}

.sidebar-module-title {
    font-size: 1.25rem;
    font-weight: 700;
    padding: 0 1rem;
    margin-bottom: 1.5rem;
}

.sidebar-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.sidebar-step:hover {
    background: var(--light-bg);
    color: var(--text-primary);
}

.sidebar-step.active {
    background: var(--primary-color);
    color: white;
}

.sidebar-step.completed {
    color: var(--success-color);
}

.sidebar-step.completed .step-status-icon {
    color: var(--success-color);
}

.sidebar-step.active .step-status-icon,
.sidebar-step.active .step-duration {
    color: white;
}

.step-status-icon {
    font-size: 1.125rem;
    flex-shrink: 0;
}

.step-title {
    flex: 1;
    font-weight: 500;
}

.step-duration {
    font-size: 0.75rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.learning-content {
    flex: 1;
    padding: 3rem;
    overflow-y: auto;
}

.step-content-container {
    max-width: 800px;
    margin: 0 auto;
}

.step-header {
    margin-bottom: 2rem;
}

.step-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.step-badge {
    background: var(--light-bg);
    color: var(--primary-color);
    padding: 0.375rem 0.875rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.step-duration {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.step-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.step-body {
    margin-bottom: 3rem;
}

.content-section {
    margin-bottom: 2rem;
}

.content-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.content-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.content-section ul,
.content-section ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-section li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.tips-box {
    background: #ecfdf5;
    border-left: 4px solid var(--success-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
}

.tips-box strong {
    color: var(--success-color);
    display: block;
    margin-bottom: 0.5rem;
}

.tips-box p,
.tips-box ul,
.tips-box li {
    color: #0f766e;
}

/* Dark mode for tips box */
[data-theme="dark"] .tips-box {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: var(--success-color);
}

[data-theme="dark"] .tips-box strong {
    color: var(--success-color);
}

[data-theme="dark"] .tips-box p,
[data-theme="dark"] .tips-box ul,
[data-theme="dark"] .tips-box li {
    color: var(--text-secondary);
}

.step-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.step-footer-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.completion-notice {
    color: var(--success-color);
    font-weight: 600;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ========================================== 
   COMMUNITY/MESSAGES 
   ========================================== */

.demo-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.demo-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

.demo-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.demo-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.demo-textarea {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s;
}

.demo-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.demo-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.messages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.messages-list {
    max-height: 500px;
    overflow-y: auto;
}

.message-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.message-item:last-child {
    border-bottom: none;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.message-username {
    font-weight: 600;
    color: var(--text-primary);
}

.message-time {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.message-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================== 
   LOADING & UTILITIES 
   ========================================== */

.loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error {
    background: #fee;
    color: #c33;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* ========================================== 
   FOOTER 
   ========================================== */

.footer {
    background: var(--dark-bg);
    color: white;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

/* ========================================== 
   RESPONSIVE DESIGN 
   ========================================== */

@media (max-width: 1024px) {
    .learning-sidebar {
        width: 280px;
    }

    .learning-content {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .tech-stack {
        grid-template-columns: 1fr;
    }

    .progress-overview {
        grid-template-columns: 1fr;
    }

    .demo-container {
        grid-template-columns: 1fr;
    }

    .learning-container {
        flex-direction: column;
    }

    .learning-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .learning-content {
        padding: 1.5rem;
    }

    .modules-list {
        grid-template-columns: 1fr;
    }

    .nav-right {
        gap: 0.5rem;
    }

    .nav-link {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}

/* ========================================== 
   ANIMATIONS 
   ========================================== */

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

.page-section.active {
    animation: fadeIn 0.3s ease-out;
}

.module-card,
.progress-card,
.feature-card {
    animation: fadeIn 0.5s ease-out backwards;
}

.module-card:nth-child(1) { animation-delay: 0.05s; }
.module-card:nth-child(2) { animation-delay: 0.1s; }
.module-card:nth-child(3) { animation-delay: 0.15s; }
.module-card:nth-child(4) { animation-delay: 0.2s; }

/* ========================================== 
   ADMIN DASHBOARD 
   ========================================== */

.admin-badge {
    background: var(--gradient);
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
}

.admin-header {
    margin: 2rem 0 3rem;
    text-align: center;
}

.admin-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.admin-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 2.5rem;
    width: 4rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
    border-radius: 0.75rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.admin-section {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.admin-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.roster-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-select,
.filter-input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.filter-select {
    min-width: 200px;
}

.filter-input {
    flex: 1;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.student-roster {
    overflow-x: auto;
}

.roster-table {
    width: 100%;
    border-collapse: collapse;
}

.roster-table th {
    text-align: left;
    padding: 1rem;
    background: var(--light-bg);
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.roster-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.roster-table tbody tr:hover {
    background: var(--light-bg);
}

.student-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.student-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.student-details {
    display: flex;
    flex-direction: column;
}

.student-name {
    font-weight: 600;
    color: var(--text-primary);
}

.student-email {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--light-bg);
    border-radius: 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient);
    transition: width 0.5s;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.role-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.role-student {
    background: #dbeafe;
    color: #1e40af;
}

.role-trainer {
    background: #fef3c7;
    color: #92400e;
}

.role-admin {
    background: #fce7f3;
    color: #9f1239;
}

/* Dark mode for role badges */
[data-theme="dark"] .role-student {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

[data-theme="dark"] .role-trainer {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .role-admin {
    background: rgba(236, 72, 153, 0.2);
    color: #f9a8d4;
}

.coming-soon-card {
    text-align: center;
    padding: 3rem;
    background: var(--light-bg);
    border-radius: 1rem;
    border: 2px dashed var(--border-color);
}

.coming-soon-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.coming-soon-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.coming-soon-card p {
    color: var(--text-secondary);
}

/* Dark mode for admin */
[data-theme="dark"] .stat-card,
[data-theme="dark"] .admin-section {
    background: var(--card-bg);
}

[data-theme="dark"] .roster-table th {
    background: var(--light-bg);
}

[data-theme="dark"] .coming-soon-card {
    background: var(--light-bg);
}

/* ========================================== 
   MODALS 
   ========================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

.modal-large {
    max-width: 900px;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--light-bg);
    color: var(--text-primary);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
    background: var(--card-bg);
    color: var(--text-primary);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-textarea {
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

/* Classes List */
.classes-list {
    display: grid;
    gap: 1rem;
}

.class-item {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.class-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.class-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.class-item-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.class-item-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.class-item-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.class-item-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.class-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.class-stat-icon {
    font-size: 1rem;
}

.class-item-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-small-icon {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Student Panels */
.students-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.students-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.students-panel h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.students-checklist {
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.student-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background 0.2s;
}

.student-checkbox-item:hover {
    background: var(--light-bg);
}

.student-checkbox-item input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

.student-checkbox-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.student-checkbox-info {
    flex: 1;
}

.student-checkbox-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.student-checkbox-email {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.enrolled-students-list {
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.enrolled-student-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--light-bg);
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}

.enrolled-student-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-remove {
    background: var(--error-color);
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn-remove:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* Dark mode for modals */
[data-theme="dark"] .modal-content {
    background: var(--card-bg);
}

[data-theme="dark"] .class-item {
    background: var(--light-bg);
}

[data-theme="dark"] .students-checklist,
[data-theme="dark"] .enrolled-students-list {
    background: var(--card-bg);
}

[data-theme="dark"] .enrolled-student-item {
    background: var(--light-bg);
}

/* AI Module Builder */
.header-buttons {
    display: flex;
    gap: 0.5rem;
}

.ai-builder-intro {
    background: var(--light-bg);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.ai-builder-intro p {
    color: var(--text-secondary);
    margin: 0;
}

.form-help {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.ai-suggestions {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 0.5rem;
}

.ai-suggestions strong {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.suggestion-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.chip {
    background: white;
    border: 2px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
}

.chip:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.ai-preview {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 0.75rem;
    border: 2px solid var(--success-color);
}

.ai-preview h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
}

[data-theme="dark"] .ai-builder-intro,
[data-theme="dark"] .ai-suggestions,
[data-theme="dark"] .ai-preview {
    background: var(--light-bg);
}

[data-theme="dark"] .chip {
    background: var(--card-bg);
}

/* ========================================== 
   ASSIGNMENTS & GRADING
   ========================================== */

.assignment-badge {
    background: var(--warning-color);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.assignment-section {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--light-bg);
    border-radius: 1rem;
    border: 2px solid var(--border-color);
}

.assignment-section.graded {
    border-color: var(--success-color);
    background: linear-gradient(to bottom, rgba(16, 185, 129, 0.05), var(--light-bg));
}

.assignment-section.pending {
    border-color: var(--warning-color);
}

.assignment-section.unsubmitted {
    border-color: var(--primary-color);
}

.assignment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.assignment-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.assignment-required {
    background: var(--error-color);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.assignment-meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.assignment-instructions {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 0.75rem;
}

.assignment-instructions h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.due-date {
    color: var(--warning-color);
    font-weight: 600;
    margin-top: 1rem;
}

.assignment-details {
    margin-bottom: 1.5rem;
}

.assignment-details p {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.assignment-details strong {
    color: var(--text-primary);
}

/* File Upload */
.file-upload-area {
    margin-top: 0.5rem;
}

.upload-placeholder {
    border: 2px dashed var(--border-color);
    border-radius: 0.75rem;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.upload-placeholder:hover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-text {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.file-preview {
    background: white;
    border: 2px solid var(--success-color);
    border-radius: 0.75rem;
    padding: 1rem;
}

.file-preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.file-icon {
    font-size: 2rem;
}

.file-name {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
}

.file-size {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.submission-form {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
}

.submission-form h3 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.submission-info {
    padding: 1.5rem;
    background: white;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.submission-info p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Grade Display */
.grade-card {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.grade-score {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--success-color), #059669);
    border-radius: 0.75rem;
    color: white;
    margin-bottom: 2rem;
}

.grade-number {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
}

.grade-label {
    font-size: 1.25rem;
    font-weight: 600;
    opacity: 0.9;
}

.grade-stars {
    font-size: 1.5rem;
}

.grade-feedback {
    margin-bottom: 1.5rem;
}

.grade-feedback h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.grade-feedback h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.grade-feedback p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.grade-feedback details {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 0.5rem;
}

.grade-feedback summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-color);
}

.grade-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.status-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-grading {
    background: #dbeafe;
    color: #1e40af;
}

.status-graded {
    background: #d1fae5;
    color: #065f46;
}

/* Dark mode for assignments */
[data-theme="dark"] .assignment-section {
    background: var(--card-bg);
}

[data-theme="dark"] .assignment-instructions,
[data-theme="dark"] .submission-form,
[data-theme="dark"] .submission-info,
[data-theme="dark"] .grade-card {
    background: var(--light-bg);
}

[data-theme="dark"] .upload-placeholder,
[data-theme="dark"] .file-preview {
    background: var(--card-bg);
}

[data-theme="dark"] .grade-feedback details {
    background: var(--card-bg);
}

/* Submissions List (for trainers) */
.submissions-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: 600px;
    overflow-y: auto;
}

.submission-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s;
}

.submission-card.graded {
    border-color: var(--success-color);
}

.submission-card.pending {
    border-color: var(--warning-color);
}

.submission-card.grading {
    border-color: var(--primary-color);
}

.submission-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.submission-status-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.submission-time {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.submission-content {
    margin-bottom: 1rem;
}

.submission-item {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--light-bg);
    border-radius: 0.5rem;
}

.submission-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.submission-item p {
    color: var(--text-secondary);
    margin: 0;
}

.submission-link {
    color: var(--primary-color);
    text-decoration: none;
    word-break: break-all;
}

.submission-link:hover {
    text-decoration: underline;
}

.submission-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.grade-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

.grade-stars-small {
    font-size: 1rem;
}

.grade-score-small {
    font-size: 0.875rem;
}

[data-theme="dark"] .submission-card {
    background: var(--card-bg);
}

[data-theme="dark"] .submission-item {
    background: var(--light-bg);
}

/* Submission Details View */
.submission-details-view {
    max-height: 70vh;
    overflow-y: auto;
}

.submission-detail-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-section {
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 0.75rem;
}

.detail-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.detail-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.detail-section h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.detail-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.detail-link {
    display: block;
    color: var(--primary-color);
    text-decoration: none;
    word-break: break-all;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.detail-link:hover {
    text-decoration: underline;
}

.detail-notes {
    color: var(--text-secondary);
    line-height: 1.6;
}

.file-display {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.submission-image-full {
    max-width: 100%;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
}

.file-icon-large {
    font-size: 4rem;
    text-align: center;
    padding: 2rem;
}

.file-meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.grade-section {
    background: linear-gradient(to bottom, rgba(16, 185, 129, 0.1), var(--light-bg));
    border: 2px solid var(--success-color);
}

.grade-display-compact {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.grade-stars-large {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.grade-score-large {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.feedback-detail {
    margin-top: 1rem;
}

.feedback-detail p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.grader-info {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.pending-message {
    text-align: center;
    padding: 2rem;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

[data-theme="dark"] .detail-section {
    background: var(--card-bg);
}

[data-theme="dark"] .grade-display-compact {
    background: var(--light-bg);
}

/* ========================================== 
   CLASS DETAIL PAGE
   ========================================== */

.class-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 2rem 0 3rem;
}

.class-detail-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.class-detail-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.certificate-placeholder {
    display: flex;
    align-items: center;
}

.class-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.class-stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.class-modules-section,
.class-assignments-section {
    margin-bottom: 3rem;
}

.class-modules-section h2,
.class-assignments-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.assignments-overview {
    display: grid;
    gap: 1rem;
}

.assignment-overview-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s;
}

.assignment-overview-card.graded {
    border-color: var(--success-color);
    background: linear-gradient(to right, rgba(16, 185, 129, 0.05), white);
}

.assignment-overview-card.submitted {
    border-color: var(--warning-color);
}

.assignment-overview-card.not-submitted {
    border-color: var(--error-color);
}

.assignment-overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.assignment-overview-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.assignment-grade-badge {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.not-submitted-badge {
    background: var(--error-color);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.assignment-overview-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.assignment-overview-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.submitted-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.not-submitted-text {
    font-size: 0.875rem;
    color: var(--error-color);
    font-weight: 600;
}

[data-theme="dark"] .my-class-card,
[data-theme="dark"] .class-stat-card,
[data-theme="dark"] .assignment-overview-card {
    background: var(--card-bg);
}

[data-theme="dark"] .assignment-overview-card.graded {
    background: linear-gradient(to right, rgba(16, 185, 129, 0.1), var(--card-bg));
}

[data-theme="dark"] .progress-item {
    background: var(--light-bg);
}

/* Available Classes Section */
.available-classes-section {
    margin-bottom: 3rem;
}

.available-classes-section h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* ========================================== 
   MANUAL GRADING MODAL
   ========================================== */

.grade-modal {
    max-width: 700px;
}

.submission-preview {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.submission-preview h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.submission-preview p {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.submission-preview a {
    color: var(--primary-color);
    text-decoration: underline;
}

.grade-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.star-selector {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.star-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.star-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.star-btn.selected {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
    color: white;
}

.star-icon {
    font-size: 1.5rem;
}

.star-label {
    font-size: 0.875rem;
    font-weight: 600;
}

.star-btn.selected .star-label {
    color: white;
}

[data-theme="dark"] .star-btn {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .star-btn.selected {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

[data-theme="dark"] .submission-preview {
    background: var(--card-bg);
}

/* Trainer Info in Class Cards */
.class-trainer-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.trainer-avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.trainer-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

[data-theme="dark"] .class-trainer-info {
    border-top-color: var(--border-color);
}

/* View As Student Toggle */
.view-as-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 0.5rem;
    border: 1px solid var(--primary-color);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
}

[data-theme="dark"] .view-as-toggle {
    background: rgba(99, 102, 241, 0.2);
}

/* ========================================== 
   MODAL OVERLAY (Global)
   ========================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    overflow-y: auto;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.close-btn:hover {
    background: var(--light-bg);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

[data-theme="dark"] .modal-content {
    background: var(--card-bg);
}

[data-theme="dark"] .modal-overlay {
    background: rgba(0, 0, 0, 0.85);
}

/* ========================================== 
   MOBILE RESPONSIVENESS - Comprehensive Media Queries
   ========================================== */

/* Tablet and below (768px) */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    /* Hero section */
    .hero h1 {
        font-size: var(--font-3xl);
    }
    
    .hero p {
        font-size: var(--font-base);
    }
    
    /* Navigation */
    .nav-auth {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .view-as-toggle {
        font-size: var(--font-sm);
        padding: 0.375rem 0.75rem;
    }
    
    /* Cards grid - Single column on mobile */
    .tech-grid,
    .features-grid,
    .progress-overview,
    .admin-stats,
    .class-stats {
        grid-template-columns: 1fr !important;
    }
    
    /* Module cards - Stack on mobile */
    .modules-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Tables - Responsive scroll */
    .roster-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .roster-table thead {
        display: none;
    }
    
    .roster-table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
        padding: 1rem;
    }
    
    .roster-table td {
        display: block;
        text-align: left !important;
        padding: 0.5rem 0;
        border: none;
    }
    
    .roster-table td::before {
        content: attr(data-label);
        font-weight: 600;
        display: block;
        margin-bottom: 0.25rem;
        color: var(--text-secondary);
    }
    
    /* Learning layout - Stack sidebar */
    .learning-container {
        grid-template-columns: 1fr !important;
    }
    
    .learning-sidebar {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    /* Modal - Full width on mobile */
    .modal-content {
        max-width: 95%;
        margin: 1rem;
    }
    
    .grade-modal {
        max-width: 95% !important;
    }
    
    /* Admin sections */
    .section-header-flex {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start !important;
    }
    
    .header-buttons {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .header-buttons button {
        width: 100%;
    }
    
    /* Submission cards */
    .submission-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .submission-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .submission-actions button {
        width: 100%;
    }
    
    /* Star selector - Smaller on mobile */
    .star-selector {
        gap: 0.375rem;
    }
    
    .star-btn {
        padding: 0.75rem 0.25rem;
    }
    
    .star-icon {
        font-size: 1.25rem;
    }
}

/* Mobile portrait (480px) */
@media (max-width: 480px) {
    /* Typography - Smaller on small phones */
    h1 {
        font-size: var(--font-2xl);
    }
    
    h2 {
        font-size: var(--font-xl);
    }
    
    /* Navigation */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-brand {
        font-size: var(--font-lg);
    }
    
    /* Progress cards - More compact */
    .progress-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: var(--font-2xl);
    }
    
    /* Buttons - Full width on tiny screens */
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* Desktop hover effects (not on touch devices) */
@media (hover: hover) and (pointer: fine) {
    .my-class-card:hover,
    .module-card:hover,
    .tech-card:hover,
    .feature-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-xl);
    }
    
    .sidebar-step:hover {
        background: var(--primary-light);
        padding-left: 1.25rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .learning-sidebar {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ========================================== 
   INTERACTIVE ENHANCEMENTS & ANIMATIONS
   ========================================== */

/* Animated Progress Bars */
.progress-fill,
.my-class-progress-fill {
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* Card Entrance Animations */
.my-class-card,
.module-card,
.assignment-card,
.submission-card {
    animation: fadeInUp 0.5s ease-out backwards;
}

.my-class-card:nth-child(1) { animation-delay: 0.1s; }
.my-class-card:nth-child(2) { animation-delay: 0.2s; }
.my-class-card:nth-child(3) { animation-delay: 0.3s; }

.module-card:nth-child(1) { animation-delay: 0.1s; }
.module-card:nth-child(2) { animation-delay: 0.2s; }
.module-card:nth-child(3) { animation-delay: 0.3s; }
.module-card:nth-child(4) { animation-delay: 0.4s; }

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

/* Hover Effects - Elevated Cards */
.my-class-card,
.module-card,
.tech-card,
.feature-card,
.progress-card,
.stat-card {
    transition: all var(--transition-base);
}

.my-class-card:hover,
.module-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.tech-card:hover,
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.stat-card:hover,
.progress-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* Interactive Step Items */
.sidebar-step {
    position: relative;
    transition: all var(--transition-base);
}

.sidebar-step::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform var(--transition-base);
}

.sidebar-step:hover::before,
.sidebar-step.active::before {
    transform: scaleY(1);
}

.sidebar-step:hover {
    padding-left: 1.25rem;
    background: var(--primary-light);
}

/* Smooth Pulse for Status Badges */
.status-badge {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Grade Stars Animation */
.grade-stars-large,
.grade-stars-small {
    display: inline-block;
    animation: starShine 1.5s ease-in-out;
}

@keyframes starShine {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); filter: brightness(1.2); }
}

/* Loading Spinner Enhancement */
.loading {
    position: relative;
    padding-left: 2rem;
}

.loading::before {
    content: '⏳';
    position: absolute;
    left: 0;
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Gradient Text Effects */
.section-title,
h1 {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Smooth Page Transitions */
.page-section {
    animation: fadeIn 0.4s ease-out;
}

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

/* Success Feedback Animation */
@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(16, 185, 129, 0.5); }
}

.graded .grade-badge {
    animation: successPulse 2s ease-in-out;
}

/* Interactive Form Elements */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
    transform: scale(1.01);
    transition: all var(--transition-base);
}

/* Skeleton Loading States */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.loading-skeleton {
    background: linear-gradient(90deg, var(--card-bg) 25%, var(--light-bg) 50%, var(--card-bg) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Tooltip Enhancement */
[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-bg);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: var(--font-sm);
    white-space: nowrap;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

/* Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Selection Colors */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}

/* ========================================== 
   CREATIVE LAYOUT & ENGAGEMENT ENHANCEMENTS
   ========================================== */

/* Floating Action Effects */
.floating {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Apply to icons */
.stat-icon,
.empty-state-icon {
    animation: float 3s ease-in-out infinite;
}

.stat-icon:nth-child(even) {
    animation-delay: 0.5s;
}

/* Glassmorphism Effects */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Apply to key cards */
.progress-card,
.stat-card {
    backdrop-filter: blur(8px);
    background: rgba(71, 85, 105, 0.8);
}

/* Gradient Borders */
.submission-card.graded {
    position: relative;
    background: linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
                var(--gradient) border-box;
    border: 2px solid transparent;
}

/* Shine Effect on Hover */
.my-class-card::after,
.module-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.my-class-card:hover::after,
.module-card:hover::after {
    left: 100%;
}

.my-class-card,
.module-card {
    position: relative;
    overflow: hidden;
}

/* Particle Background Effect (subtle) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Badge Animations */
.class-badge,
.assignment-badge,
.step-badge {
    transition: all var(--transition-base);
}

.class-badge:hover,
.assignment-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

/* Grade Badge Celebration Effect */
.grade-badge {
    transition: all var(--transition-base);
    position: relative;
}

.grade-badge:hover {
    transform: rotate(-5deg) scale(1.1);
}

/* Confetti Effect on 5-Star Grades */
.grade-stars-large:has(:nth-child(5))::after {
    content: '🎉';
    position: absolute;
    font-size: 2rem;
    animation: confetti 1s ease-out;
    opacity: 0;
}

@keyframes confetti {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-50px) rotate(360deg);
        opacity: 0;
    }
}

/* Micro-interactions for Completion Checkmarks */
.step-status-icon {
    display: inline-block;
    transition: all var(--transition-base);
}

.sidebar-step.completed .step-status-icon {
    animation: checkmarkPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes checkmarkPop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3) rotate(10deg); }
}

/* Focus Ring Enhancements */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Link Hover Effects */
a {
    position: relative;
    transition: color var(--transition-base);
}

a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: var(--primary-color);
    transition: width var(--transition-base);
}

a:hover::after {
    width: 100%;
}

/* Submission Card Status Glow */
.submission-card.graded {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.submission-card.pending {
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.15);
}

/* Interactive Stat Numbers */
.stat-value {
    transition: all var(--transition-slow);
    display: inline-block;
}

.stat-card:hover .stat-value {
    transform: scale(1.15);
    color: var(--primary-color);
}

/* Smooth Color Transitions */
* {
    transition: background-color var(--transition-base),
                color var(--transition-base),
                border-color var(--transition-base);
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================
   CERTIFICATE MODAL STYLES
   ========================================== */

.certificate-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.certificate-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.certificate-container {
  position: relative;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1;
}

.cert-close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--danger-color);
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
}

.cert-close:hover {
  transform: scale(1.1);
}

.certificate {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cert-border {
  border: 8px solid;
  border-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%) 1;
  padding: 60px 40px;
  position: relative;
}

.cert-border::before {
  content: '';
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  border: 2px solid #e0e0e0;
  pointer-events: none;
}

.cert-header {
  text-align: center;
  margin-bottom: 40px;
}

.cert-logo {
  font-size: 64px;
  margin-bottom: 20px;
}

.cert-title {
  font-size: 36px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 10px 0;
  letter-spacing: 2px;
}

.cert-subtitle {
  font-size: 18px;
  color: #666;
  font-style: italic;
  margin: 0;
}

.cert-body {
  text-align: center;
}

.cert-name {
  font-size: 42px;
  font-weight: 700;
  color: #2c3e50;
  margin: 30px 0 20px 0;
  font-family: 'Georgia', serif;
}

.cert-text {
  font-size: 18px;
  color: #666;
  margin: 10px 0;
}

.cert-course {
  font-size: 28px;
  font-weight: 600;
  color: #667eea;
  margin: 20px 0 40px 0;
}

.cert-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 40px 0;
  padding: 30px;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 8px;
}

.cert-detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cert-detail .cert-label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cert-detail .cert-value {
  font-size: 24px;
  font-weight: 700;
  color: #667eea;
}

.cert-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin: 50px 0 30px 0;
  padding-top: 40px;
  border-top: 2px solid #e0e0e0;
}

.cert-date, .cert-signature {
  text-align: center;
}

.cert-signature-line {
  width: 200px;
  height: 2px;
  background: #333;
  margin: 0 auto 10px auto;
}

.cert-footer .cert-label {
  font-size: 14px;
  color: #666;
  margin: 5px 0;
}

.cert-footer .cert-value {
  font-size: 18px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
}

.cert-code {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  text-align: center;
}

.cert-code p {
  font-size: 12px;
  color: #999;
  font-family: 'Courier New', monospace;
  margin: 0;
}

.cert-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
}

.cert-actions .btn {
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
}

.cert-actions .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.cert-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.cert-actions .btn-secondary {
  background: #f0f0f0;
  color: #666;
}

.cert-actions .btn-secondary:hover {
  background: #e0e0e0;
}

@media (max-width: 768px) {
  .certificate {
    padding: 20px;
  }

  .cert-border {
    padding: 30px 20px;
  }

  .cert-title {
    font-size: 24px;
  }

  .cert-name {
    font-size: 28px;
  }

  .cert-course {
    font-size: 20px;
  }

  .cert-details {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .cert-footer {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* ==========================================
   AI MODULE BUILDER PREVIEW STYLES
   ========================================== */

.ai-builder-intro {
  background: var(--primary-light);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border-left: 4px solid var(--primary-color);
}

.ai-builder-intro p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--font-sm);
}

.ai-preview {
  background: var(--light-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.ai-preview h3 {
  color: var(--text-primary);
  margin-bottom: 15px;
  font-size: var(--font-lg);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-preview-summary {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--success-color);
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.ai-preview-summary p {
  margin: 0;
  color: var(--success-color);
  font-weight: 600;
  font-size: var(--font-sm);
}

.ai-preview-modules {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preview-module {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  transition: all 0.3s ease;
}

.preview-module:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.preview-module h4 {
  color: var(--primary-color);
  margin-bottom: 8px;
  font-size: var(--font-base);
  font-weight: 600;
}

.preview-module > p {
  color: var(--text-secondary);
  font-size: var(--font-sm);
  margin-bottom: 12px;
  line-height: 1.5;
}

.preview-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.preview-step {
  color: var(--text-secondary);
  font-size: var(--font-sm);
  padding: 8px 12px;
  background: rgba(99, 102, 241, 0.05);
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.preview-step:hover {
  background: rgba(99, 102, 241, 0.1);
  transform: translateX(4px);
}

.preview-step strong {
  color: var(--text-primary);
}

.step-duration {
  color: var(--accent-color);
  font-size: var(--font-xs);
  font-weight: 600;
  background: rgba(6, 182, 212, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
}

/* Modal large variant for AI builder */
.modal-large {
  max-width: 800px;
  width: 90%;
}

/* Loading button states */
#generateBtnLoading {
  display: none;
}

#generateWithAi:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#saveAiModules {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .ai-preview {
    max-height: 300px;
    padding: 15px;
  }

  .preview-step {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .step-duration {
    align-self: flex-end;
  }

  .modal-large {
    width: 95%;
    max-width: none;
  }
}

/* ==========================================
   TRAINER REQUEST SYSTEM STYLES
   ========================================== */

/* Become a Trainer Promo Card (Student Dashboard) */
.become-trainer-section {
  margin-bottom: 30px;
}

.trainer-promo-card {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.trainer-promo-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.trainer-promo-content {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.trainer-promo-icon {
  font-size: 48px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.trainer-promo-text {
  flex: 1;
  min-width: 250px;
}

.trainer-promo-text h3 {
  color: white;
  font-size: var(--font-xl);
  margin-bottom: 8px;
}

.trainer-promo-text p {
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--font-sm);
  margin: 0;
}

.trainer-promo-content .btn {
  white-space: nowrap;
  background: white;
  color: var(--primary-color);
  font-weight: 600;
}

.trainer-promo-content .btn:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Trainer Request Status Card */
.trainer-request-status {
  margin-bottom: 30px;
}

.request-status-card {
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid;
}

.request-status-card.pending {
  background: var(--warning-bg);
  border-color: var(--warning-color);
}

.request-status-card.approved {
  background: rgba(16, 185, 129, 0.1);
  border-color: var(--success-color);
}

.request-status-card.rejected {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--error-color);
}

.request-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.request-status-header h4 {
  margin: 0;
  font-size: var(--font-lg);
  color: var(--text-primary);
}

.request-status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: var(--font-xs);
  font-weight: 600;
  text-transform: uppercase;
}

.request-status-badge.pending {
  background: var(--warning-color);
  color: white;
}

.request-status-badge.approved {
  background: var(--success-color);
  color: white;
}

.request-status-badge.rejected {
  background: var(--error-color);
  color: white;
}

.request-status-message {
  color: var(--text-secondary);
  font-size: var(--font-sm);
  line-height: 1.5;
  margin: 0;
}

/* Trainer Request Modal */
.trainer-request-intro {
  background: var(--light-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.trainer-request-intro p {
  margin: 0 0 12px 0;
  color: var(--text-primary);
  font-weight: 600;
}

.trainer-request-intro ul {
  margin: 0;
  padding-left: 24px;
  color: var(--text-secondary);
  font-size: var(--font-sm);
}

.trainer-request-intro li {
  margin-bottom: 8px;
}

/* Admin - Trainer Requests List */
.trainer-requests-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.trainer-request-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  transition: all 0.2s ease;
}

.trainer-request-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.request-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.request-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.request-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.request-user-details h4 {
  margin: 0 0 4px 0;
  font-size: var(--font-base);
  color: var(--text-primary);
}

.request-user-details p {
  margin: 0;
  font-size: var(--font-sm);
  color: var(--text-secondary);
}

.request-item-actions {
  display: flex;
  gap: 8px;
}

.request-item-actions .btn-small {
  padding: 6px 12px;
  font-size: var(--font-sm);
}

.request-reason {
  background: var(--light-bg);
  border-left: 3px solid var(--primary-color);
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.request-reason p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--font-sm);
  line-height: 1.6;
  font-style: italic;
}

.request-meta {
  display: flex;
  gap: 16px;
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

.request-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.request-empty-state .empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.request-empty-state p {
  margin: 0;
  font-size: var(--font-base);
}

/* Responsive */
@media (max-width: 768px) {
  .trainer-promo-content {
    flex-direction: column;
    text-align: center;
  }

  .trainer-promo-icon {
    font-size: 40px;
  }

  .request-item-header {
    flex-direction: column;
  }

  .request-item-actions {
    width: 100%;
  }

  .request-item-actions .btn-small {
    flex: 1;
  }
}

/* ==========================================
   TRAINER DASHBOARD - STUDENT CARDS
   ========================================== */

.student-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.student-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.student-card .student-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}

.student-card .student-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

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

.student-card .student-info h4 {
  margin: 0 0 4px 0;
  font-size: var(--font-base);
  color: var(--text-primary);
  font-weight: 600;
}

.student-card .student-email {
  margin: 0 0 8px 0;
  font-size: var(--font-sm);
  color: var(--text-secondary);
}

.student-card .student-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.student-card .student-enrolled {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .student-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .student-card .student-avatar {
    align-self: center;
  }
}


/* ============================================
   Markdown Content Styles for Course Steps
   ============================================ */

.markdown-content {
  line-height: 1.8;
  color: var(--text-primary);
}

.markdown-content h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 2rem 0 1rem 0;
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.markdown-content h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 1.75rem 0 1rem 0;
  color: var(--text-primary);
}

.markdown-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem 0;
  color: var(--text-primary);
}

.markdown-content p {
  margin: 1rem 0;
  font-size: 1rem;
}

.markdown-content ul,
.markdown-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.markdown-content li {
  margin: 0.5rem 0;
  line-height: 1.6;
}

.markdown-content code {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-family: 'Courier New', Consolas, monospace;
  font-size: 0.9rem;
  color: var(--accent-color);
}

.markdown-content pre {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.markdown-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.markdown-content blockquote {
  border-left: 4px solid var(--primary-color);
  background: var(--card-bg);
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  font-style: italic;
  border-radius: 0 8px 8px 0;
}

.markdown-content blockquote p {
  margin: 0;
}

.markdown-content hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  margin: 2rem 0;
  border-radius: 2px;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
}

.markdown-content th,
.markdown-content td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.markdown-content th {
  background: var(--primary-color);
  color: white;
  font-weight: 600;
}

.markdown-content tr:hover {
  background: rgba(var(--primary-rgb), 0.05);
}

.markdown-content strong {
  font-weight: 600;
  color: var(--text-primary);
}

.markdown-content em {
  font-style: italic;
}

/* Emoji and special content styling */
.markdown-content h1:first-of-type {
  font-size: 2.25rem;
  text-align: center;
  margin-bottom: 2rem;
}

/* Tips and important boxes */
.markdown-content p:has(> strong:first-child) {
  background: var(--card-bg);
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--accent-color);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .markdown-content h1 {
    font-size: 1.75rem;
  }
  
  .markdown-content h2 {
    font-size: 1.35rem;
  }
  
  .markdown-content pre {
    font-size: 0.8rem;
  }
  
  .markdown-content table {
    display: block;
    overflow-x: auto;
  }
}

/* ============================================
   UI FIXES - Text Overflow & Mobile Responsive
   ============================================ */

/* === GLOBAL TEXT OVERFLOW FIXES === */
* {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6, p, span, li, td, th, label {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* === CLASS CARD FIXES === */
.my-class-card {
  overflow: visible;
}

.my-class-header h3 {
  word-break: break-word;
  line-height: 1.3;
}

.my-class-description {
  overflow: visible;
  min-height: auto;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-height: 1.5;
}

.available-class-description {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

/* Trainer info fix */
.class-trainer-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.trainer-name {
  word-break: break-word;
}

/* Progress overview fix */
.class-progress-overview {
  gap: 0.5rem;
}

.progress-value {
  font-size: 1.1rem;
  word-break: break-all;
}

/* === STEP/LEARNING CONTENT FIXES === */
.step-title {
  word-break: break-word;
  hyphens: auto;
}

.step-content-container {
  overflow-x: hidden;
}

.step-body {
  overflow-x: hidden;
}

/* Markdown content overflow fix */
.markdown-content {
  overflow-x: hidden;
}

.markdown-content pre {
  overflow-x: auto;
  max-width: 100%;
}

.markdown-content code {
  word-break: break-all;
}

.markdown-content table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
}

.markdown-content img {
  max-width: 100%;
  height: auto;
}

/* === SIDEBAR FIXES === */
.sidebar-step {
  word-break: break-word;
}

.step-title-text {
  word-break: break-word;
  line-height: 1.4;
}

/* === MODULE CARD FIXES === */
.module-card h3 {
  word-break: break-word;
  line-height: 1.3;
}

.module-description {
  word-break: break-word;
  line-height: 1.5;
}

/* ============================================
   ENHANCED MOBILE RESPONSIVE - 768px
   ============================================ */
@media (max-width: 768px) {
  /* Body padding for mobile */
  body {
    font-size: 15px;
  }

  /* Class cards - stack properly */
  .my-classes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .my-class-card {
    padding: 1.25rem;
  }

  .my-class-header {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }

  .my-class-header h3 {
    font-size: 1.25rem;
  }

  .my-class-description {
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
    margin-bottom: 1rem;
  }

  /* Progress grid - 3 columns but smaller */
  .class-progress-overview {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .progress-item {
    padding: 0.5rem;
  }

  .progress-label {
    font-size: 0.65rem;
  }

  .progress-value {
    font-size: 1rem;
  }

  /* Trainer info on mobile */
  .class-trainer-info {
    margin-bottom: 0.75rem;
  }

  .trainer-avatar-small {
    width: 24px;
    height: 24px;
  }

  .trainer-name {
    font-size: 0.85rem;
  }

  /* Learning content area */
  .learning-content {
    padding: 1.25rem;
  }

  .step-content-container {
    max-width: 100%;
  }

  .step-title {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .step-meta {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .step-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }

  /* Sidebar on mobile - horizontal scrollable or collapsible */
  .learning-sidebar {
    max-height: 200px;
    overflow-y: auto;
  }

  .sidebar-step {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  /* Step footer buttons */
  .step-footer {
    flex-direction: column;
    gap: 1rem;
  }

  .step-footer-right {
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
  }

  .step-footer .btn {
    width: 100%;
    justify-content: center;
  }

  /* Markdown content on mobile */
  .markdown-content h1 {
    font-size: 1.5rem;
  }

  .markdown-content h2 {
    font-size: 1.25rem;
  }

  .markdown-content h3 {
    font-size: 1.1rem;
  }

  .markdown-content {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .markdown-content blockquote {
    padding: 0.75rem 1rem;
    margin: 1rem 0;
  }

  /* Available classes section */
  .available-classes-grid {
    grid-template-columns: 1fr !important;
  }

  .available-class-card {
    padding: 1rem;
  }

  /* Module cards in class detail */
  .class-modules-section .modules-grid {
    grid-template-columns: 1fr !important;
  }

  /* Assignment cards */
  .assignment-card {
    padding: 1rem;
  }

  /* Navigation improvements */
  .nav-right {
    gap: 0.5rem;
  }

  .theme-toggle {
    padding: 0.4rem;
  }
}

/* ============================================
   SMALL MOBILE - 480px and below
   ============================================ */
@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .container {
    padding: 0.75rem;
  }

  /* Hero section compact */
  .hero {
    padding: 2rem 0;
  }

  .hero h1 {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .hero p {
    font-size: 0.9rem;
  }

  /* Class cards even more compact */
  .my-class-card {
    padding: 1rem;
  }

  .my-class-header h3 {
    font-size: 1.1rem;
  }

  .class-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
  }

  /* Progress grid - still 3 columns but tighter */
  .progress-item {
    padding: 0.4rem 0.25rem;
  }

  .progress-label {
    font-size: 0.6rem;
  }

  .progress-value {
    font-size: 0.9rem;
  }

  /* Step title smaller */
  .step-title {
    font-size: 1.25rem;
  }

  /* Learning sidebar more compact */
  .learning-sidebar {
    max-height: 150px;
  }

  .sidebar-module-title {
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
  }

  .sidebar-step {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }

  /* Buttons full width */
  .my-class-footer {
    flex-direction: column;
    gap: 0.75rem;
  }

  .my-class-footer .btn {
    width: 100%;
    justify-content: center;
  }

  .class-status,
  .certificate-ready {
    text-align: center;
    width: 100%;
  }

  /* Next step card compact */
  .next-step-card {
    padding: 1rem;
  }

  .next-step-card h3 {
    font-size: 1rem;
  }

  /* Markdown adjustments */
  .markdown-content {
    font-size: 0.9rem;
  }

  .markdown-content h1:first-of-type {
    font-size: 1.35rem;
  }

  .markdown-content pre {
    padding: 0.75rem;
    font-size: 0.8rem;
  }

  .markdown-content code {
    font-size: 0.8rem;
    padding: 0.15rem 0.35rem;
  }
}

/* ============================================
   EXTRA SMALL MOBILE - 360px and below
   ============================================ */
@media (max-width: 360px) {
  .container {
    padding: 0.5rem;
  }

  .my-class-card {
    padding: 0.875rem;
  }

  .my-class-header h3 {
    font-size: 1rem;
  }

  .progress-value {
    font-size: 0.85rem;
  }

  .step-title {
    font-size: 1.1rem;
  }

  .navbar .container {
    padding: 0 0.5rem;
  }

  .brand-text {
    font-size: 0.9rem;
  }
}

/* ============================================
   LANDSCAPE MOBILE FIX
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
  .learning-sidebar {
    max-height: 100px;
  }

  .hero {
    padding: 1rem 0;
  }

  .step-header {
    margin-bottom: 1rem;
  }
}

/* ============================================
   TOUCH DEVICE IMPROVEMENTS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .sidebar-step {
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .btn {
    min-height: 44px;
  }

  .theme-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  /* Remove hover effects on touch */
  .my-class-card:hover,
  .module-card:hover {
    transform: none;
  }

  /* Better tap feedback */
  .my-class-card:active,
  .module-card:active,
  .sidebar-step:active {
    opacity: 0.8;
    transform: scale(0.98);
  }
}
