/* =============================================
   TUTORMIND CREATIVE DEMO - "The Modern Scholar"
   ============================================= */

/* CSS Variables */
:root {
    --primary-ink: #2D2438; /* Deep Purple Black */
    --accent-purple: #6D28D9; /* Vibrant Purple */
    --accent-gold: #F59E0B; /* Amber/Gold */
    --paper-bg: #FFFCF8; /* Warm Off-White */
    --paper-texture: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    
    --card-bg: #FFFFFF;
    --border-color: #E5E0D8;
    --border-strong: #2D2438;
    
    --text-primary: #2D2438;
    --text-secondary: #584F66;
    
    /* Font Stacks */
    --font-heading: 'Funnel Display', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
    
    /* New Component Variables */
    --navbar-glass: rgba(255, 255, 255, 0.8);
    --sticky-yellow: #FEF3C7;
    --sticky-blue: #E0E7FF;
    --equation-opacity: 0.08;
    --feature-section-bg: #FFFFFF;
    --nav-btn-bg: #2D2438; /* Primary Ink */
}

/* Dark mode overrides (keeping it tasteful) */
body.dark-mode {
    --paper-bg: #1A1625;
    --card-bg: #241E32;
    --border-color: #3E3454;
    --border-strong: #E5E0D8; /* Light border in dark mode */
    --text-primary: #F3E8FF;
    --text-secondary: #B9B4C7;
    --primary-ink: #F3E8FF;
    
    /* Dark Mode Components */
    --navbar-glass: rgba(36, 30, 50, 0.85); /* Dark Glass */
    --sticky-yellow: #3D3418; /* Dark Yellow Paper */
    --sticky-blue: #1E2540; /* Dark Blue Paper */
    --equation-opacity: 0.05;
    --feature-section-bg: #1A1625; /* Match Main BG */
    --nav-btn-bg: #4C3C64; /* Muted Purple for Dark Mode */
}

/* Base Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    /* Smooth scrolling for anchor links */
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--paper-bg);
    background-image: var(--paper-texture); /* Subtle grain */
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    /* Touch optimization - removes 300ms tap delay */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(109, 40, 217, 0.1);
}

/* Typography Overrides */
h1, h2, h3, h4, .navbar-logo {
    font-family: var(--font-heading);
    color: var(--primary-ink);
}

/* =============================================
   NAVIGATION
   ============================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 40px;
    /* Safe area insets for notch devices */
    padding-top: max(20px, env(safe-area-inset-top));
    padding-left: max(40px, env(safe-area-inset-left));
    padding-right: max(40px, env(safe-area-inset-right));
    background: transparent; /* Clean */
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Fused Pill Style from Original */
    background: var(--navbar-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 12px 24px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.navbar-logo {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.02em;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    padding: 4px 0;
}

/* Underline animation - Creative touch */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent-purple);
    transition: width 0.3s ease;
}

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

.nav-btn {
    padding: 10px 24px;
    background: var(--nav-btn-bg);
    color: #fff;
    border: none;
    border-radius: 4px; /* Slightly rounded, not pillow */
    font-family: var(--font-body);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
    /* Minimum touch target size */
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: var(--accent-purple);
    transform: translateY(-1px);
}

.nav-btn:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}

.theme-toggle, .mobile-menu-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    /* Minimum touch target size (44x44px) */
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.theme-toggle {
    display: inline-flex;
}

.mobile-menu-btn {
    display: none; /* Hidden on Desktop */
}

.theme-toggle:hover, .mobile-menu-btn:hover {
    background: rgba(109, 40, 217, 0.1);
    color: var(--accent-purple);
}

.theme-toggle:focus-visible, .mobile-menu-btn:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero-section {
    padding: 180px 40px 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

/* Floating Words (Replacing Equations) */
.floating-equations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

.equation-marker {
    position: absolute;
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--primary-ink);
    opacity: var(--equation-opacity);
    font-size: 1.5rem;
    animation: float 8s ease-in-out infinite;
}

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

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-title {
    font-size: clamp(3.5rem, 6vw, 5rem);
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 700;
}

.hero-highlight {
    color: var(--accent-purple);
    font-style: italic; /* Serif Italics look amazing */
    position: relative;
}

.hero-highlight::after {
    /* Hand-drawn underline effect */
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 10px;
    background: rgba(245, 158, 11, 0.2); /* Gold highlighter */
    z-index: -1;
    transform: rotate(-1deg);
    border-radius: 4px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 40px;
    font-family: var(--font-body);
}

.hero-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.cta-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    background: var(--accent-gold);
    color: var(--primary-ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 8px;
    /* Brutalist Shadow */
    box-shadow: 4px 4px 0px var(--primary-ink);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    border: 2px solid var(--primary-ink);
    /* Minimum touch target */
    min-height: 48px;
}

.cta-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--primary-ink);
    background: #FCD34D;
}

.cta-primary:focus-visible {
    outline: 3px solid var(--accent-purple);
    outline-offset: 2px;
}

.cta-primary:active {
    transform: translate(2px, 2px);
    box-shadow: 0px 0px 0px var(--primary-ink);
}

.cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    /* Minimum touch target */
    min-height: 44px;
    padding: 8px 0;
}

.cta-secondary:hover {
    color: var(--accent-purple);
}

.cta-secondary:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Hero Illustration - Polaroid / Scrapbook Style */
.hero-illustration {
    position: relative;
}

.illustration-container {
    position: relative;
    z-index: 1;
}

.student-image-wrapper {
    background: white;
    padding: 16px;
    padding-bottom: 60px; /* Polaroid bottom */
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    transform: rotate(2deg);
    border: 1px solid var(--border-color);
    position: relative;
}

.student-image-wrapper::before {
    /* Tape effect */
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 30px;
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    z-index: 2;
}

.student-image {
    width: 100%;
    display: block;
    filter: sepia(10%); /* Subtle warmth */
}

/* Bubbles as Sticky Notes */
.chat-bubble, .math-bubble {
    position: absolute;
    padding: 16px;
    font-family: var(--font-mono); /* Hand-written feel ish */
    font-size: 0.9rem;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.05);
    z-index: 2;
}

.chat-bubble {
    top: 20px;
    left: -40px;
    background: var(--sticky-yellow);
    color: var(--text-primary); /* Ensure readability */
    transform: rotate(-3deg);
    border-bottom-right-radius: 20px 2px; /* Slight curl */
    animation: float 4s ease-in-out infinite;
}

.chat-bubble-name {
    font-weight: 800; /* Extra bold */
    display: block; /* Ensure it takes its own line if needed, but span is inline usually. */
}

.math-bubble {
    bottom: 40px;
    right: -20px;
    background: var(--sticky-blue);
    transform: rotate(2deg);
    color: var(--primary-ink); /* Likely white in dark mode, purple in light */
    animation: float-delayed 5s ease-in-out infinite;
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0) rotate(2deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
}

/* =============================================
   FEATURES SECTION
   ============================================= */
.features-section {
    padding: 100px 40px;
    background: var(--feature-section-bg);
    border-top: 1px solid var(--border-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.feature-card {
    padding: 32px;
    border-left: 1px solid var(--border-color); /* Minimalist separator */
    transition: background 0.3s ease, border-left-color 0.3s ease;
}

.feature-card:hover {
    background: var(--paper-bg);
    border-left-color: var(--accent-purple);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--accent-purple);
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.feature-link {
    font-weight: 600;
    color: var(--primary-ink);
    text-decoration: none;
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 2px;
    transition: background 0.2s ease, color 0.2s ease, border-bottom-color 0.2s ease;
    /* Minimum touch target */
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
}

.feature-link:hover {
    background: var(--accent-gold);
    color: white;
    border-bottom-color: transparent;
}

.feature-link:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}

/* Bottom Bar */
.bottom-bar {
    padding: 40px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.testimonial {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-primary);
    max-width: 400px;
}

.quote-mark {
    font-size: 2rem;
    color: var(--accent-purple);
    line-height: 0;
    margin-right: 8px;
    vertical-align: -10px;
}

.social-links {
    display: flex;
    gap: 24px; /* Increased from default/implicit */
}

.social-link {
    color: var(--primary-ink);
    font-size: 1.2rem;
    transition: color 0.2s ease, transform 0.2s ease;
    /* Minimum touch target */
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.social-link:hover {
    color: var(--accent-purple);
    transform: translateY(-2px);
    background: rgba(109, 40, 217, 0.1);
}

.social-link:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}

/* Scroll margin for anchor links (accounts for fixed navbar) */
#features, #how-it-works {
    scroll-margin-top: 100px;
}

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

/* Large Tablets and Small Laptops */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 60px;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-highlight::after {
        left: 50%;
        transform: translateX(-50%) rotate(-1deg);
        width: 110%;
    }
    
    .hero-illustration {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 20px;
    }
    
    .navbar-container {
        padding: 10px 16px;
    }
    
    .navbar-logo {
        font-size: 1.5rem;
    }
    
    .nav-link { 
        display: none; 
    }
    
    .nav-btn {
        display: none;
    }

    .mobile-menu-btn {
        display: inline-flex;
    }
    
    .hero-section {
        padding: 140px 24px 80px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }
    
    .cta-primary {
        width: 100%;
        justify-content: center;
    }
    
    .features-section {
        padding: 60px 24px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .feature-card {
        border-left: none;
        border-bottom: 1px solid var(--border-color);
        padding: 24px 0;
    }
    
    .feature-card:last-child {
        border-bottom: none;
    }
    
    .bottom-bar {
        flex-direction: column;
        gap: 24px;
        text-align: center;
        padding: 32px 24px;
        /* Safe area for bottom */
        padding-bottom: max(32px, env(safe-area-inset-bottom));
    }
    
    .testimonial {
        font-size: 1rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Hide floating equations on mobile */
    .floating-equations {
        display: none;
    }
    
    /* Adjust chat/math bubbles */
    .chat-bubble {
        left: 0;
        top: -20px;
        font-size: 0.85rem;
        padding: 12px;
    }
    
    .math-bubble {
        right: 0;
        bottom: 20px;
        font-size: 0.85rem;
        padding: 12px;
    }
}

/* Small Mobile Phones */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .cta-primary {
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    .student-image-wrapper {
        padding: 12px;
        padding-bottom: 40px;
    }
    
    .feature-title {
        font-size: 1.1rem;
    }
    
    .feature-desc {
        font-size: 0.9rem;
    }
}

/* Hover states - only on devices that support hover */
@media (hover: hover) and (pointer: fine) {
    .nav-link:hover::after {
        width: 100%;
    }
    
    .feature-card:hover {
        background: var(--paper-bg);
        border-left-color: var(--accent-purple);
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .equation-marker,
    .chat-bubble,
    .math-bubble {
        animation: none;
    }
}

/* Mobile Menu Styles (Copied/Adapted) */
.mobile-menu-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.mobile-menu {
    position: absolute;
    right: 0;
    top: 0;
    width: min(300px, 85vw);
    height: 100%;
    background: var(--paper-bg);
    padding: 24px;
    /* Safe area insets */
    padding-right: max(24px, env(safe-area-inset-right));
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Prevent background scroll when in menu */
    overscroll-behavior: contain;
    overflow-y: auto;
}
.mobile-menu-overlay.active .mobile-menu {
    transform: translateX(0);
}
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}
.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-ink);
    /* Minimum touch target */
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.mobile-menu-close:hover {
    background: rgba(109, 40, 217, 0.1);
}

.mobile-menu-close:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}

.mobile-nav-link {
    display: block;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary-ink);
    text-decoration: none;
    margin-bottom: 20px;
    padding: 12px 16px;
    font-family: var(--font-heading);
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
    /* Touch target */
    min-height: 48px;
    display: flex;
    align-items: center;
}

.mobile-nav-link:hover {
    background: rgba(109, 40, 217, 0.1);
}

.mobile-nav-link:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}

.mobile-nav-link.primary {
    color: var(--accent-purple);
    font-weight: 700;
    background: rgba(109, 40, 217, 0.08);
}

/* =============================================
   AUTHENTICATION PAGES (Login / Register)
   ============================================= */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: var(--paper-bg);
    overflow: hidden;
}

/* Left Side - Form */
.auth-form-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 5%;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-brand {
    font-size: 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-ink);
    text-decoration: none;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-ink);
}

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

.auth-form {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Auth Inputs - Neo Brutalist */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

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

.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: var(--font-body);
    background: var(--card-bg); /* Dark mode compatible */
    color: var(--text-primary);
    border: 2px solid var(--border-strong);
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.05); /* Subtle shadow initially */
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 4px 4px 0px var(--accent-purple);
    transform: translate(-1px, -1px);
}

.error-message {
    color: #EF4444; /* Error red */
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

/* Buttons */
.btn-auth {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    margin-top: 1rem;
    cursor: pointer;
    background: var(--primary-ink);
    color: white;
    font-family: var(--font-body);
    font-weight: 700;
    border: none;
    border-radius: 8px;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 4px 4px 0px var(--accent-gold); /* Neo Brutalist Popup */
    border: 1px solid var(--primary-ink);
    /* Minimum touch target */
    min-height: 48px;
}

.btn-auth:hover {
    background: var(--accent-purple);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--accent-gold);
}

.btn-auth:focus-visible {
    outline: 3px solid var(--accent-purple);
    outline-offset: 2px;
}

.btn-auth:active {
    transform: translate(2px, 2px);
    box-shadow: 0px 0px 0px var(--accent-gold);
}

/* Social Login Divider */
.auth-divider {
    margin: 2rem 0;
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    padding: 0 1rem;
}

/* Social Button */
.btn-social {
    width: 100%;
    padding: 12px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    /* Minimum touch target */
    min-height: 48px;
}

.btn-social:hover {
    border-color: var(--accent-purple);
    background: var(--paper-bg);
}

.btn-social:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}

/* Right Side - Visual */
.auth-visual-side {
    flex: 1.2;
    background: linear-gradient(135deg, var(--paper-bg) 0%, var(--sticky-blue) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-left: 1px solid var(--border-color);
}

/* Reuse Creative Elements for Visual Side */
.auth-polaroid {
    background: white;
    padding: 16px 16px 60px 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    transform: rotate(-3deg);
    position: relative;
    max-width: 550px; /* Increased from 400px to fill space */
    border: 1px solid var(--border-color);
}

.auth-tape {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%) rotate(2deg);
    width: 120px;
    height: 35px;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    z-index: 10;
}

.auth-visual-img {
    width: 100%;
    display: block;
    border-radius: 2px;
}

/* Responsive */
@media (max-width: 900px) {
    .auth-visual-side {
        display: none;
    }
    .auth-form-side {
        flex: 1;
        max-width: 100%;
        padding: 2rem;
    }
}

/* Password Strength & Validation */
.password-strength {
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength-bar.weak { background-color: #EF4444; }
.password-strength-bar.medium { background-color: var(--accent-gold); }
.password-strength-bar.strong { background-color: #10B981; }

.strength-text {
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
    text-align: right;
    font-weight: 500;
}

.input-wrapper { position: relative; }

.input-wrapper.error .form-input {
    border-color: #EF4444;
    animation: shake 0.5s ease;
}

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

/* =============================================
   DARK MODE OPTIMIZATIONS (AUTH PAGES)
   ============================================= */
body.dark-mode .auth-wrapper {
    background: var(--paper-bg); /* Ensuring deep background */
}

body.dark-mode .auth-visual-side {
    background: linear-gradient(135deg, #1A1625 0%, #2D2438 100%);
    border-left: 1px solid #3E3454;
}

body.dark-mode .auth-polaroid {
    background: #2D2438; /* Dark Photo Frame style */
    border: 1px solid #4C3C64;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

body.dark-mode .auth-visual-img {
    filter: brightness(0.85) contrast(1.1); /* Sit better in dark mode */
    border-radius: 4px;
}

body.dark-mode .form-input {
    background: #1F1A2E; /* Darker input bg */
    border-color: #4B4160; /* Softer purple border */
    color: #F3E8FF;
}

body.dark-mode .form-input:focus {
    border-color: #A78BFA;
    background: #2D2438;
}

body.dark-mode .form-label {
    color: #D8B4FE; /* Soft Lavender */
}

body.dark-mode .auth-title {
    color: #F3E8FF;
}

body.dark-mode .auth-subtitle {
    color: #B9B4C7;
}

body.dark-mode .btn-auth {
    background: #7C3AED; /* Brighter purple for CTA visibility */
    box-shadow: 4px 4px 0px #4C1D95; /* Deep purple shadow */
    border: none;
}

body.dark-mode .btn-auth:hover {
    background: #8B5CF6;
    box-shadow: 6px 6px 0px #4C1D95;
    transform: translate(-2px, -2px);
}

body.dark-mode .btn-social {
    background: #2D2438;
    border-color: #4B4160;
    color: #E9D5FF;
}

body.dark-mode .btn-social:hover {
    border-color: #A78BFA;
    background: #3D3448;
}

body.dark-mode .password-strength {
    background-color: #2D2438;
}
