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

:root {
    /* Color Palette */
    --primary-blue: #329ADB;
    --primary-green: #50C878;
    --primary-dark: #1a1a2e;
    --secondary-purple: #9333ea;
    --secondary-orange: #f59e0b;
    --secondary-pink: #ec4899;
    --secondary-teal: #14b8a6;
    
    /* Neutrals */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Poppins', var(--font-primary);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: white;
}

/* ===================================
   Utility Classes
   =================================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(50, 154, 219, 0.1), rgba(80, 200, 120, 0.1));
    border: 1px solid rgba(50, 154, 219, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: var(--spacing-lg);
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    color: white;
    box-shadow: var(--shadow-md);
}

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

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-900);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

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

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

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-text {
    background: transparent;
    color: var(--gray-700);
    padding: 0.75rem 1rem;
}

.btn-text:hover {
    background: var(--gray-100);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* ===================================
   Navigation
   =================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4.5rem;
    gap: 2rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base);
}

.logo-icon:hover {
    transform: scale(1.1);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 0.625rem;
    color: var(--gray-500);
    display: none;
}

@media (min-width: 1024px) {
    .logo-subtitle {
        display: block;
    }
}

.nav-links {
    display: none;
    gap: 2rem;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-link {
    position: relative;
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color var(--transition-base);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
    transition: width var(--transition-base);
}

.nav-link:hover {
    color: var(--primary-blue);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: none;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .nav-actions {
        display: flex;
    }
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: transparent;
    border: none;
    color: var(--gray-700);
    cursor: pointer;
    transition: background var(--transition-base);
    border-radius: var(--radius-md);
}

.mobile-menu-btn:hover {
    background: var(--gray-100);
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Mobile Menu */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 400px;
    height: 100%;
    background: white;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform var(--transition-base);
    overflow-y: auto;
}

.mobile-menu-overlay.active .mobile-menu {
    transform: translateX(0);
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--gray-700);
    transition: all var(--transition-base);
}

.close-btn:hover {
    background: var(--gray-200);
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 3rem;
}

.mobile-nav-link {
    padding: 1rem;
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.mobile-nav-link:hover {
    background: var(--gray-100);
    color: var(--primary-blue);
}

.mobile-nav-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    min-height: calc(100vh - 4.5rem);
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 4rem 0;
}

.hero-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(80, 200, 120, 0.4), transparent);
    bottom: -100px;
    right: -100px;
    animation-delay: 7s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent);
    top: 50%;
    left: 50%;
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.hero-content {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
    }
}

.hero-text {
    color: white;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-title .highlight {
    color: #fef08a;
    text-shadow: 0 0 30px rgba(254, 240, 138, 0.5);
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat {
    text-align: center;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.demo-card {
    width: 100%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.demo-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.demo-card-dots {
    display: flex;
    gap: 0.5rem;
}

.demo-card-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.demo-card-title {
    color: white;
    font-weight: 600;
}

.demo-card-content {
    position: relative;
}

.stem-icons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stem-icon {
    aspect-ratio: 1;
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    color: white;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-base);
}

.stem-icon:hover {
    transform: scale(1.05);
}

.stem-icon span {
    font-size: 2rem;
    font-family: var(--font-heading);
}

.stem-label {
    font-size: 0.75rem;
    font-weight: 500;
}

.stem-icon.science {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stem-icon.tech {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.stem-icon.engineering {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stem-icon.math {
    background: linear-gradient(135deg, #10b981, #059669);
}

.connection-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.connection-lines svg {
    width: 100%;
    height: 100%;
}

.connection-lines path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: draw-line 3s ease-in-out infinite;
}

@keyframes draw-line {
    0% {
        stroke-dashoffset: 200;
    }
    50% {
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dashoffset: -200;
    }
}

/* ===================================
   Sections
   =================================== */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-description {
    font-size: 1.125rem;
    color: var(--gray-600);
    line-height: 1.7;
}

/* ===================================
   Features Section
   =================================== */
.features-section {
    padding: 6rem 0;
    background: var(--gray-50);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 640px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid var(--gray-200);
}

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

.feature-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
}

.feature-icon.blue {
    background: linear-gradient(135deg, var(--primary-blue), #2563eb);
}

.feature-icon.green {
    background: linear-gradient(135deg, var(--primary-green), #059669);
}

.feature-icon.purple {
    background: linear-gradient(135deg, var(--secondary-purple), #7c3aed);
}

.feature-icon.orange {
    background: linear-gradient(135deg, var(--secondary-orange), #d97706);
}

.feature-icon.pink {
    background: linear-gradient(135deg, var(--secondary-pink), #db2777);
}

.feature-icon.teal {
    background: linear-gradient(135deg, var(--secondary-teal), #0d9488);
}

.feature-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.feature-description {
    color: var(--gray-600);
    line-height: 1.6;
}

/* ===================================
   How It Works Section
   =================================== */
.how-it-works-section {
    padding: 6rem 0;
    background: white;
}

.steps-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .steps-container {
        grid-template-columns: repeat(7, 1fr);
        gap: 0;
    }
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    grid-column: span 1;
}

@media (min-width: 768px) {
    .step {
        grid-column: span 2;
    }
}

.step-number {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.step-connector {
    display: none;
}

@media (min-width: 768px) {
    .step-connector {
        display: flex;
        align-items: center;
        justify-content: center;
        grid-column: span 1;
        position: relative;
    }

    .step-connector::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 3px;
        background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
        opacity: 0.3;
        top: 2rem;
    }
}

.step-content {
    flex: 1;
}

.step-title {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.step-description {
    color: var(--gray-600);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ===================================
   Testimonials Section
   =================================== */
.testimonials-section {
    padding: 6rem 0;
    background: var(--gray-50);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
}

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

.testimonial-rating {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.testimonial-text {
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.author-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
}

.author-info {
    flex: 1;
}

.author-name {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.author-role {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* ===================================
   CTA Section
   =================================== */
.cta-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='10' cy='10' r='2' fill='rgba(255,255,255,0.1)'/%3E%3C/svg%3E");
    background-size: 60px 60px;
}

.cta-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    color: white;
}

.cta-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.cta-note {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.footer-logo span {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.footer-description {
    color: var(--gray-400);
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.social-link {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    background: var(--gray-800);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    transition: all var(--transition-base);
}

.social-link:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

.footer-heading {
    font-family: var(--font-heading);
    font-weight: 600;
    color: white;
    margin-bottom: 0.5rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color var(--transition-base);
    font-size: 0.9375rem;
}

.footer-links a:hover {
    color: var(--primary-blue);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--gray-800);
    text-align: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ===================================
   Notifications
   =================================== */
#notification-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 3000;
    max-width: 400px;
    pointer-events: none;
}

.notification {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    margin-bottom: 1rem;
    pointer-events: all;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid var(--primary-blue);
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===================================
   Accessibility
   =================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles */
:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

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

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

/* Dashboard Body */
.dashboard-body {
    background: var(--gray-50);
    min-height: 100vh;
}

/* Dashboard Header */
.dashboard-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.dashboard-header-content {
    max-width: 1920px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.dashboard-logo .logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.dashboard-logo .logo-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

/* Dashboard Navigation */
.dashboard-nav {
    display: flex;
    gap: 0.5rem;
    flex: 1;
}

.dashboard-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 500;
    transition: all var(--transition-base);
}

.dashboard-nav-link:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.dashboard-nav-link.active {
    background: linear-gradient(135deg, rgba(50, 154, 219, 0.1), rgba(80, 200, 120, 0.1));
    color: var(--primary-blue);
}

/* Dashboard User Section */
.dashboard-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.icon-btn:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.user-menu {
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    color: white;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.user-avatar:hover {
    box-shadow: var(--shadow-md);
    transform: scale(1.05);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.user-name {
    font-weight: 600;
    color: var(--gray-900);
}

.user-email {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.user-dropdown-divider {
    height: 1px;
    background: var(--gray-200);
}

.user-dropdown-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: all var(--transition-base);
}

.user-dropdown-link:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.user-dropdown-link.text-error {
    color: var(--error);
}

.user-dropdown-link.text-error:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Dashboard Main Layout */
.dashboard-main {
    max-width: 1920px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    padding: 2rem 1.5rem;
    min-height: calc(100vh - 72px);
}

/* Sidebar */
.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.sidebar-new-btn {
    width: 100%;
}

.sidebar-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.sidebar-lessons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.sidebar-lesson-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    border: 1px solid transparent;
}

.sidebar-lesson-item:hover {
    background: var(--gray-50);
    border-color: var(--gray-200);
}

.sidebar-lesson-content {
    flex: 1;
    min-width: 0;
}

.sidebar-lesson-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-lesson-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-lesson-delete {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all var(--transition-base);
}

.sidebar-lesson-item:hover .sidebar-lesson-delete {
    opacity: 1;
}

.sidebar-lesson-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--gray-400);
}

.empty-state svg {
    margin-bottom: 1rem;
}

.empty-state p {
    font-weight: 600;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.empty-state span {
    font-size: 0.875rem;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.quick-stat {
    text-align: center;
}

.quick-stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quick-stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* Dashboard Content */
.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Welcome Section */
.welcome-section {
    animation: fadeIn 0.6s ease-out;
}

.welcome-card {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    border-radius: var(--radius-2xl);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    color: white;
    box-shadow: var(--shadow-lg);
}

.welcome-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
}

.welcome-text {
    opacity: 0.95;
    line-height: 1.7;
}

.stem-mini-icons {
    display: flex;
    gap: 0.5rem;
}

.stem-mini {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Generator Section */
.generator-section {
    animation: fadeIn 0.6s ease-out;
}

.generator-card {
    background: white;
    border-radius: var(--radius-2xl);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

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

.generator-title {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.generator-subtitle {
    color: var(--gray-600);
}

/* Form Styles */
.generator-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9375rem;
}

.form-input,
.form-select,
.form-textarea {
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    transition: all var(--transition-base);
    background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(50, 154, 219, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Checkboxes */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: 500;
}

.checkbox-label:hover {
    border-color: var(--gray-300);
    background: var(--gray-50);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-md);
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    position: relative;
}

.checkbox-custom::after {
    content: '';
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 3px;
    opacity: 0;
    transform: scale(0);
    transition: all var(--transition-base);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    border-color: transparent;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    opacity: 1;
    transform: scale(1);
}

.checkbox-custom.science {
    background: var(--primary-blue);
}

.checkbox-custom.tech {
    background: var(--secondary-purple);
}

.checkbox-custom.engineering {
    background: var(--secondary-orange);
}

.checkbox-custom.math {
    background: var(--primary-green);
}

.btn-generate {
    margin-top: 1rem;
}

/* Lesson Display */
.lesson-display {
    animation: fadeIn 0.6s ease-out;
}

.lesson-card {
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.lesson-card-header {
    padding: 2rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
}

.lesson-card-title {
    font-size: 1.75rem;
    font-family: var(--font-heading);
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.lesson-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.lesson-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-size: 0.9375rem;
}

.lesson-meta-item svg {
    color: var(--primary-blue);
}

.lesson-actions {
    display: flex;
    gap: 0.75rem;
}

.lesson-content {
    padding: 2rem;
}

.lesson-section {
    margin-bottom: 2.5rem;
}

.lesson-section:last-child {
    margin-bottom: 0;
}

.lesson-section-title {
    font-size: 1.25rem;
    font-family: var(--font-heading);
    color: var(--gray-900);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-100);
}

.lesson-text {
    color: var(--gray-700);
    line-height: 1.7;
}

.lesson-list {
    list-style: none;
    padding: 0;
}

.lesson-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--gray-700);
    line-height: 1.7;
}

.lesson-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-blue);
}

.materials-list li::before {
    background: var(--primary-green);
}

/* Activity Cards */
.activity-card {
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.activity-card:last-child {
    margin-bottom: 0;
}

.activity-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.activity-number {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.activity-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.activity-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
}

.activity-duration {
    color: var(--primary-blue);
    font-weight: 600;
}

.activity-integration {
    color: var(--gray-500);
}

.activity-description {
    color: var(--gray-700);
    line-height: 1.7;
}

/* Assessment Grid */
.assessment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.assessment-type-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    background: white;
    border-radius: var(--radius-2xl);
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow-2xl);
    animation: fadeIn 0.3s ease-out;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

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

.loading-spinner p {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.loading-spinner span {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--gray-900);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-base);
    z-index: 1000;
}

.toast.active {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: var(--success);
}

.toast-error {
    background: var(--error);
}

.toast-info {
    background: var(--info);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-main {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        order: 2;
    }

    .dashboard-content {
        order: 1;
    }

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

    .assessment-grid {
        grid-template-columns: 1fr;
    }

    .lesson-card-header {
        flex-direction: column;
    }

    .lesson-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .dashboard-nav {
        display: none;
    }

    .dashboard-header-content {
        gap: 1rem;
    }

    .dashboard-main {
        padding: 1rem;
        gap: 1rem;
    }

    .generator-card,
    .lesson-card {
        padding: 1.5rem;
    }

    .lesson-card-header,
    .lesson-content {
        padding: 1.5rem;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }

    .welcome-card {
        flex-direction: column;
        text-align: center;
    }

    .stem-mini-icons {
        justify-content: center;
    }

    .stem-mini {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .lesson-actions {
        flex-wrap: wrap;
    }

    .lesson-actions .btn {
        flex: 1;
        min-width: 120px;
    }

    .toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}

/* ===================================
   CHAT INTERFACE STYLES
   =================================== */

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.model-selector-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
}

.model-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
}

.model-select {
    padding: 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
    min-width: 200px;
}

.model-select:focus {
    outline: none;
    border-color: var(--primary-blue);
}

/* Chat Container */
.chat-container {
    max-width: 1920px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
    height: calc(100vh - 72px);
}

/* Chat Sidebar */
.chat-sidebar {
    background: white;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
}

.saved-chats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.saved-chat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    border: 1px solid transparent;
}

.saved-chat-item:hover {
    background: var(--gray-50);
    border-color: var(--gray-200);
}

.saved-chat-content {
    flex: 1;
    min-width: 0;
}

.saved-chat-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.saved-chat-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.saved-chat-delete {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all var(--transition-base);
}

.saved-chat-item:hover .saved-chat-delete {
    opacity: 1;
}

.saved-chat-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.quick-tips {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tip-item {
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    color: var(--gray-700);
    line-height: 1.5;
}

/* Chat Main Area */
.chat-main {
    display: flex;
    flex-direction: column;
    background: var(--gray-50);
    position: relative;
}

/* Chat Welcome Screen */
.chat-welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.welcome-header {
    text-align: center;
    margin-bottom: 3rem;
}

.welcome-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.welcome-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-family: var(--font-heading);
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.welcome-header p {
    font-size: 1.125rem;
    color: var(--gray-600);
}

.suggestion-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
}

.suggestion-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

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

.suggestion-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.suggestion-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.suggestion-text {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
}

/* Chat Messages Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    animation: messageSlideIn 0.3s ease-out;
}

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

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-avatar-small {
    background: var(--gray-200);
    color: var(--gray-700);
    font-size: 0.75rem;
    font-weight: 700;
}

.assistant-avatar {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    color: white;
}

.message-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.message-text {
    background: white;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-xl);
    color: var(--gray-800);
    line-height: 1.7;
    box-shadow: var(--shadow-sm);
}

.message-user .message-text {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    color: white;
}

.message-text pre {
    background: var(--gray-900);
    color: white;
    padding: 1rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 0.5rem 0;
}

.message-text code {
    background: var(--gray-100);
    color: var(--gray-900);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.message-text ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.message-text li {
    margin: 0.25rem 0;
}

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

.message-action-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: transparent;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-base);
}

.message-action-btn:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.error-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    border-radius: var(--radius-lg);
    color: var(--error);
    font-size: 0.875rem;
}

/* Typing Indicator */
.typing-indicator {
    display: none;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: var(--radius-xl);
    width: fit-content;
    box-shadow: var(--shadow-sm);
    margin-left: 52px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--gray-400);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
}

/* Chat Input */
.chat-input-container {
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 1.5rem;
}

.chat-input-form {
    max-width: 900px;
    margin: 0 auto;
}

.chat-input-wrapper {
    display: flex;
    gap: 0.75rem;
    background: var(--gray-50);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-xl);
    padding: 0.75rem 1rem;
    transition: all var(--transition-base);
}

.chat-input-wrapper:focus-within {
    border-color: var(--primary-blue);
    background: white;
    box-shadow: 0 0 0 3px rgba(50, 154, 219, 0.1);
}

.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    color: var(--gray-900);
    resize: none;
    outline: none;
    max-height: 200px;
    overflow-y: auto;
}

.chat-input::placeholder {
    color: var(--gray-400);
}

.send-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: none;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.send-btn:hover:not(:disabled) {
    box-shadow: var(--shadow-md);
    transform: scale(1.05);
}

.send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.input-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Responsive Chat Styles */
@media (max-width: 1024px) {
    .chat-container {
        grid-template-columns: 1fr;
    }

    .chat-sidebar {
        display: none;
    }

    .model-selector-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .model-select {
        min-width: 150px;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .header-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .suggestion-cards {
        grid-template-columns: 1fr;
    }

    .chat-messages {
        padding: 1rem;
        gap: 1rem;
    }

    .message {
        gap: 0.75rem;
    }

    .message-avatar {
        width: 32px;
        height: 32px;
    }

    .message-text {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
    }

    .chat-input-container {
        padding: 1rem;
    }

    .typing-indicator {
        margin-left: 44px;
    }
}
