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

/* ===========================================
   P1-8: Color-Blind Safe Palette & Calm Mode
   =========================================== */

:root {
    /* Default color scheme */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #f59e0b;
    --success: #10b981;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --border: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);

    /* Animation timing (modified in calm mode) */
    --animation-duration: 1;
    --transition-duration: 0.3s;
}

/* ===========================================
   Color-Blind Safe Mode
   Uses colors distinguishable for all types:
   - Protanopia (red-blind)
   - Deuteranopia (green-blind)
   - Tritanopia (blue-blind)
   Based on Wong's colorblind-safe palette
   =========================================== */
[data-color-mode="colorblind"] {
    /* Blue - safe for all types */
    --primary: #0077bb;
    --primary-dark: #005588;

    /* Orange - distinguishable from blue */
    --secondary: #ee7733;

    /* Yellow/Gold - high contrast, safe */
    --accent: #ccbb44;

    /* Teal/Cyan - safe alternative to green */
    --success: #009988;

    /* Higher contrast text */
    --text-dark: #000000;
    --text-gray: #555555;
}

/* High Contrast Mode for maximum accessibility */
[data-color-mode="high-contrast"] {
    --primary: #0000cc;
    --primary-dark: #000099;
    --secondary: #cc0000;
    --accent: #cc9900;
    --success: #006600;
    --bg-light: #ffffff;
    --bg-white: #ffffff;
    --text-dark: #000000;
    --text-gray: #333333;
    --text-light: #555555;
    --border: #000000;
}

/* ===========================================
   Calm Mode - Reduced Motion & Animations
   For users with vestibular disorders,
   motion sensitivity, or sensory processing needs
   =========================================== */
[data-calm-mode="true"],
.prefers-reduced-motion {
    --animation-duration: 0;
    --transition-duration: 0s;
}

/* Respect system preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    :root {
        --animation-duration: 0;
        --transition-duration: 0s;
    }
}

/* Disable ALL animations in calm mode */
[data-calm-mode="true"] *,
[data-calm-mode="true"] *::before,
[data-calm-mode="true"] *::after,
@media (prefers-reduced-motion: reduce) {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
}

/* Calm mode: remove floating animations */
[data-calm-mode="true"] .logo-image,
[data-calm-mode="true"] .journey-stage,
[data-calm-mode="true"] .shield,
[data-calm-mode="true"] .journey-message,
[data-calm-mode="true"] .btn-quiz-cta,
[data-calm-mode="true"] .path-line,
[data-calm-mode="true"] .neural-pulse,
[data-calm-mode="true"] .stage-glow,
[data-calm-mode="true"] .message-icon {
    animation: none !important;
}

/* Calm mode: simplify hover effects */
[data-calm-mode="true"] .buddy-card:hover,
[data-calm-mode="true"] .feature-card:hover,
[data-calm-mode="true"] .journey-step:hover,
[data-calm-mode="true"] .benefit-card:hover,
[data-calm-mode="true"] .btn-primary:hover,
[data-calm-mode="true"] .btn-secondary:hover,
[data-calm-mode="true"] .store-button:hover {
    transform: none !important;
}

/* Calm mode: reduce visual complexity */
[data-calm-mode="true"] .hero {
    background: var(--primary) !important;
}

[data-calm-mode="true"] .download {
    background: var(--primary) !important;
}

[data-calm-mode="true"] .BuddyBrain {
    background: var(--primary) !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--bg-white);
}

h1, h2, h3, h4 {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 120px;
    width: auto;
    animation: float-logo 3s ease-in-out infinite;
}

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

.footer .logo-image {
    height: 60px;
    animation: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.2s;
}

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

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-md);
}

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

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-dark);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--border);
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Quiz Button Styles */
.btn-quiz {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.btn-quiz:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

/* Schools Nav Link */
.nav-schools {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.nav-schools:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    color: white !important;
}

.btn-quiz-cta {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #5c4813;
    padding: 1rem 2rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.125rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
    animation: pulse-glow 2s infinite;
}

.btn-quiz-cta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.4);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(251, 191, 36, 0.5);
    }
}

/* Hero Section */
.hero {
    position: relative;
    padding: 10rem 0 6rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.gradient-text {
    display: block;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.8;
}

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

.trust-badges {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.25rem;
    border-radius: 9999px;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
}

.badge-icon {
    font-size: 1.25rem;
}

/* Journey Progression Hero */
.journey-progression {
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.progression-path {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.path-line {
    animation: dash 20s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: -100;
    }
}

/* Journey Stages */
.journey-stage {
    position: absolute;
    z-index: 2;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.journey-stage:hover {
    transform: scale(1.15) translateY(-10px);
    z-index: 10;
}

.stage-image {
    position: relative;
    width: 160px;
    height: 160px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 4px solid rgba(255, 255, 255, 0.8);
    background: white;
}

.stage-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.stage-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
    z-index: -1;
    animation: pulse-glow 3s ease-in-out infinite;
}

.journey-stage:hover .stage-glow,
.journey-stage.active .stage-glow {
    opacity: 0.6;
}

.journey-stage.active {
    z-index: 10;
}

.journey-stage.active .stage-image {
    transform: scale(1.1);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.5);
    border-color: rgba(255, 255, 255, 1);
}

.journey-stage.active .stage-label {
    opacity: 1;
    transform: translateX(-50%) scale(1.1);
}

.journey-stage.active .stage-number {
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.3; transform: scale(0.9); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.stage-label {
    position: absolute;
    bottom: -70px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.3s, transform 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.journey-stage:hover .stage-label {
    opacity: 1;
}

.stage-number {
    display: block;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 40px;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.6);
}

.stage-text {
    display: block;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.5);
    font-family: 'Fredoka', sans-serif;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 16px;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Stage Positioning - Flowing Curve */
.stage-1 {
    top: 30%;
    left: 5%;
    animation: stage-float-1 4s ease-in-out infinite;
}

.stage-2 {
    top: 10%;
    left: 18%;
    animation: stage-float-2 4.5s ease-in-out infinite;
}

.stage-3 {
    top: 35%;
    left: 33%;
    animation: stage-float-3 5s ease-in-out infinite;
}

.stage-4 {
    top: 55%;
    left: 48%;
    animation: stage-float-4 4.8s ease-in-out infinite;
}

.stage-5 {
    top: 30%;
    left: 62%;
    animation: stage-float-5 5.2s ease-in-out infinite;
}

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

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

@keyframes stage-float-3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(3deg); }
}

@keyframes stage-float-4 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-18px) rotate(-1deg); }
}

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

/* Journey Message */
.journey-message {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 2rem;
    border-radius: 999px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: message-pulse 3s ease-in-out infinite;
}

@keyframes message-pulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.05); }
}

.message-icon {
    font-size: 1.5rem;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.8; transform: rotate(0deg); }
    50% { opacity: 1; transform: rotate(180deg); }
}

.message-text {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    font-family: 'Fredoka', sans-serif;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.hero-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

.hero-wave path {
    fill: var(--bg-white);
}

/* Choose Your Buddy Section */
.choose-buddy {
    padding: 6rem 0;
    background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
    position: relative;
    overflow: hidden;
}

.choose-buddy::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.buddy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
    position: relative;
}

.buddy-card {
    background: var(--bg-white);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.buddy-card::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 24px;
    opacity: 0;
    transition: opacity 0.4s;
    z-index: -1;
}

.buddy-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.25);
    border-color: transparent;
}

.buddy-card:hover::before {
    opacity: 1;
}

.buddy-transform {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.buddy-app {
    flex: 0 0 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.buddy-robot {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.buddy-app img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 12px;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
    background: var(--bg-light);
    padding: 6px;
}

.buddy-robot img {
    width: 100%;
    max-width: 240px;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 20px;
    border: 3px solid var(--border);
    transition: all 0.3s ease;
    background: var(--bg-light);
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.buddy-card:hover .buddy-app img {
    border-color: var(--primary);
    transform: scale(1.1);
}

.buddy-card:hover .buddy-robot img {
    border-color: var(--primary);
    transform: scale(1.03);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.3);
}

.buddy-card:hover .buddy-label {
    color: var(--text-dark);
}

.buddy-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.buddy-robot .buddy-label {
    font-size: 0.75rem;
    color: var(--text-dark);
}

.transform-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: all 0.4s ease;
}

.buddy-card:hover .transform-arrow {
    transform: translateX(4px) scale(1.15);
    color: var(--secondary);
    filter: drop-shadow(0 0 12px rgba(236, 72, 153, 0.6));
}

.transform-arrow svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

.robot-scale {
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-gray);
}

.scale-ruler {
    width: 3px;
    height: 80px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border-radius: 2px;
    position: relative;
}

.scale-ruler::before,
.scale-ruler::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 3px;
    background: var(--primary);
    left: -2.5px;
}

.scale-ruler::before {
    top: 0;
}

.scale-ruler::after {
    bottom: 0;
}

.scale-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.buddy-name {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Fredoka', sans-serif;
    color: var(--text-dark);
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(236, 72, 153, 0.08));
    border-radius: 12px;
    transition: all 0.3s ease;
}

.buddy-card:hover .buddy-name {
    background: linear-gradient(135deg, #4f46e5, #db2777);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

/* Responsive adjustments for buddy cards */
@media (max-width: 968px) {
    .buddy-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 2rem;
    }

    .buddy-card {
        padding: 1.5rem;
    }

    .transform-arrow svg {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 640px) {
    .choose-buddy {
        padding: 4rem 0;
    }

    .buddy-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .buddy-card {
        padding: 1.5rem;
    }

    .buddy-transform {
        gap: 0.75rem;
    }

    .transform-arrow svg {
        width: 24px;
        height: 24px;
    }

    .buddy-name {
        font-size: 1.1rem;
    }
}

/* Features Section */
.features {
    padding: 6rem 0;
    background: var(--bg-white);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

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

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

.feature-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 20px;
    border: 2px solid var(--border);
    transition: all 0.3s;
}

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

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

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-gray);
    line-height: 1.8;
}

/* Safety Section */
.safety {
    padding: 6rem 0;
    background: var(--bg-light);
}

.safety-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.safety-features {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.safety-item {
    display: flex;
    gap: 1rem;
}

.safety-check {
    width: 32px;
    height: 32px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.safety-item h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.safety-item p {
    color: var(--text-gray);
}

.safety-shield {
    display: flex;
    justify-content: center;
    align-items: center;
}

.shield {
    width: 250px;
    height: 300px;
    background: linear-gradient(135deg, var(--success), #059669);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
    animation: shield-pulse 2s infinite;
}

@keyframes shield-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

.shield-text {
    color: white;
    font-size: 2rem;
    font-weight: 700;
}

/* Testimonials Section */
.testimonials {
    padding: 6rem 0;
    background: var(--bg-white);
}

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

.testimonial-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

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

.testimonial-text {
    font-size: 1.125rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.testimonial-author strong {
    color: var(--text-dark);
}

.testimonial-author span {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Download Section */
.download {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    text-align: center;
}

.download-content {
    max-width: 700px;
    margin: 0 auto;
}

.download .section-title,
.download .section-subtitle {
    color: white;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 3rem 0 2rem;
    flex-wrap: wrap;
}

.store-button {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-white);
    color: var(--text-dark);
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-lg);
}

.store-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.store-button div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.store-button span {
    font-size: 0.8rem;
    color: var(--text-gray);
}

.store-button strong {
    font-size: 1.25rem;
    color: var(--text-dark);
}

.download-note {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 4rem 0 2rem;
}

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

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

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

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

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 1.25rem;
    transition: color 0.2s;
}

.social-links a:hover {
    color: white;
}

/* BuddyBrainOS Callout */
.BuddyBrain-callout {
    margin: 2.5rem 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 2rem 2rem 1rem;
    background: linear-gradient(135deg,
        rgba(255, 183, 0, 0.2),
        rgba(255, 145, 0, 0.2),
        rgba(255, 107, 0, 0.2));
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(255, 183, 0, 0.3);
    border: 2px solid rgba(255, 183, 0, 0.4);
}

.bracket-left {
    width: 8px;
    height: 100%;
    min-height: 120px;
    background: linear-gradient(180deg, #FFB700, #FF6B00);
    border-radius: 4px;
    box-shadow: 0 0 25px rgba(255, 183, 0, 0.8);
    flex-shrink: 0;
}

.callout-content {
    flex: 1;
}

.callout-label {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #FFB700;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.callout-brand {
    font-size: 2.5rem;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    background: linear-gradient(135deg, #FFD700, #FF8C00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 2px 8px rgba(255, 183, 0, 0.5));
}

.callout-tagline {
    font-size: 1rem;
    color: #2d1f47;
    font-weight: 600;
    line-height: 1.5;
}

/* Journey Section */
.journey {
    padding: 6rem 0;
    background: var(--bg-light);
}

.journey-timeline {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    margin-top: 3rem;
}

.journey-step {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    text-align: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.journey-step:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: var(--shadow-md);
}

.step-icon {
    font-size: 4rem;
    margin: 1rem 0;
}

.journey-step h3 {
    font-size: 1.5rem;
    margin: 1rem 0;
    color: var(--text-dark);
}

.journey-step p {
    color: var(--text-gray);
    line-height: 1.6;
}

.journey-arrow {
    font-size: 3rem;
    color: var(--primary);
    font-weight: bold;
    animation: pulse-arrow 2s infinite;
}

@keyframes pulse-arrow {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* BuddyBrainOS Section */
.BuddyBrain {
    padding: 6rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.BuddyBrain-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.BuddyBrain-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.brain-animation {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brain-core {
    position: relative;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.brain-icon {
    font-size: 6rem;
    z-index: 10;
}

.neural-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: neural-pulse 3s ease-out infinite;
}

.neural-pulse.pulse-2 {
    animation-delay: 1s;
}

.neural-pulse.pulse-3 {
    animation-delay: 2s;
}

@keyframes neural-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.BuddyBrain-text .section-title {
    color: white;
    margin-bottom: 1rem;
}

.brand-highlight {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
}

.lead {
    font-size: 1.25rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.BuddyBrain-features {
    display: grid;
    gap: 1.5rem;
}

.brain-feature {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
}

.feature-check {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.brain-feature strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.brain-feature p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Why It Matters Section */
.why-matters {
    padding: 6rem 0;
    background: var(--bg-white);
}

.why-matters-content {
    text-align: center;
}

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

.benefit-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.benefit-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.benefit-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.benefit-card p {
    color: var(--text-gray);
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 968px) {
    .logo-image {
        height: 40px;
    }

    /* Tablet journey stages - shift everything left and scale down */
    .journey-progression {
        height: 400px;
    }

    .stage-image {
        width: 120px;
        height: 120px;
    }

    .stage-1 {
        left: 2%;
    }

    .stage-2 {
        left: 14%;
    }

    .stage-3 {
        left: 28%;
    }

    .stage-4 {
        left: 42%;
    }

    .stage-5 {
        left: 56%;
    }

    .stage-label {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }

    .stage-number {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .BuddyBrain-callout {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        text-align: center;
    }

    .bracket-left {
        width: 100%;
        height: 6px;
        min-height: 6px;
    }

    .callout-brand {
        font-size: 2rem;
    }

    .callout-tagline {
        font-size: 0.95rem;
    }

    .journey-timeline {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .journey-arrow {
        display: none;
    }

    .BuddyBrain-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .brain-animation {
        width: 250px;
        height: 250px;
    }

    .brain-core {
        width: 150px;
        height: 150px;
    }

    .brain-icon {
        font-size: 4rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .trust-badges {
        justify-content: center;
    }

    .hero-image {
        order: -1;
        display: flex;
        justify-content: center;
    }

    .safety-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-links a:not(.btn-primary) {
        display: none;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 8rem 0 4rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

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

    .section-title {
        font-size: 2rem;
    }

    .features-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .download-buttons {
        flex-direction: column;
        align-items: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    /* Smaller screens - even smaller stages */
    .journey-progression {
        height: 320px;
    }

    .stage-image {
        width: 70px;
        height: 70px;
        border-radius: 14px;
    }

    .stage-1 {
        left: 0%;
        top: 25%;
    }

    .stage-2 {
        left: 12%;
        top: 8%;
    }

    .stage-3 {
        left: 26%;
        top: 30%;
    }

    .stage-4 {
        left: 42%;
        top: 50%;
    }

    .stage-5 {
        left: 58%;
        top: 25%;
    }

    .stage-label {
        display: none;
    }

    .stage-number {
        width: 20px;
        height: 20px;
        font-size: 0.6rem;
        line-height: 20px;
    }
}

/* Buddy Modal Styles */
.buddy-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.buddy-modal.active {
    opacity: 1;
    visibility: visible;
}

.buddy-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
}

.buddy-modal-content {
    position: relative;
    background: var(--bg-white);
    border-radius: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.buddy-modal.active .buddy-modal-content {
    transform: scale(1) translateY(0);
}

.buddy-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}

.buddy-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

.buddy-modal-header {
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border-radius: 24px 24px 0 0;
}

.buddy-modal-image {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg-light);
    border: 3px solid var(--primary);
    flex-shrink: 0;
}

.buddy-modal-title {
    flex: 1;
}

.buddy-modal-name {
    font-size: 1.5rem;
    font-family: 'Fredoka', sans-serif;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.buddy-modal-catchphrase {
    font-style: italic;
    color: var(--text-gray);
    font-size: 1rem;
}

.buddy-modal-body {
    padding: 0 2rem 1.5rem;
}

.buddy-modal-traits {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.trait-badge {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

.buddy-modal-age {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    display: inline-block;
}

.buddy-modal-section {
    margin-bottom: 1.5rem;
}

.buddy-modal-section h4 {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-family: 'Fredoka', sans-serif;
}

.buddy-modal-section p {
    color: var(--text-gray);
    line-height: 1.6;
}

.buddy-modal-section.best-for {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.1));
    padding: 1rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.buddy-modal-strengths {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.strength-tag {
    padding: 0.4rem 0.8rem;
    background: var(--bg-light);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-dark);
    border: 1px solid var(--border);
}

.buddy-modal-footer {
    padding: 1.5rem 2rem 2rem;
    text-align: center;
}

.buddy-modal-cta {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

@media (max-width: 640px) {
    .buddy-modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .buddy-modal-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .buddy-modal-image {
        width: 80px;
        height: 80px;
    }

    .buddy-modal-name {
        font-size: 1.25rem;
    }

    .buddy-modal-body {
        padding: 0 1.5rem 1rem;
    }

    .buddy-modal-footer {
        padding: 1rem 1.5rem 1.5rem;
    }

    .buddy-modal-traits {
        justify-content: center;
    }
}

/* ===========================================
   Cookie Consent Banner (P0-5: GDPR/CCPA)
   =========================================== */

.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
    border-top: 3px solid var(--primary);
}

.cookie-consent.active {
    transform: translateY(0);
}

.cookie-consent.hidden {
    display: none;
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.cookie-text {
    flex: 1;
    min-width: 280px;
}

.cookie-text h4 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.cookie-text p {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin: 0;
    line-height: 1.5;
}

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

.cookie-text a:hover {
    color: var(--primary-dark);
}

.cookie-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

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

.cookie-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.cookie-btn-reject {
    background: var(--bg-light);
    color: var(--text-dark);
    border-color: var(--border);
}

.cookie-btn-reject:hover {
    background: var(--border);
}

.cookie-btn-customize {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.cookie-btn-customize:hover {
    background: var(--primary);
    color: white;
}

/* Cookie Preferences Panel */
.cookie-preferences {
    border-top: 1px solid var(--border);
    padding: 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    animation: slideDown 0.3s ease;
}

.cookie-preferences[hidden] {
    display: none;
}

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

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

.cookie-pref-header h4 {
    font-size: 1rem;
    color: var(--text-dark);
    margin: 0;
}

.cookie-pref-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.cookie-pref-close:hover {
    color: var(--text-dark);
}

.cookie-pref-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-category {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-category-header label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.cookie-category-header input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.cookie-category-header input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.cookie-category-name {
    font-weight: 600;
    color: var(--text-dark);
}

.cookie-required {
    font-size: 0.75rem;
    color: var(--success);
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.cookie-category-desc {
    font-size: 0.85rem;
    color: var(--text-gray);
    margin: 0.5rem 0 0 1.75rem;
}

.cookie-pref-footer {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

/* Cookie consent responsive */
@media (max-width: 768px) {
    .cookie-consent-content {
        padding: 1.25rem 1rem;
        flex-direction: column;
        text-align: center;
    }

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

    .cookie-text {
        min-width: auto;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }

    .cookie-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .cookie-preferences {
        padding: 1rem;
    }

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

    .cookie-category-desc {
        margin-left: 0;
    }
}

/* ===========================================
   P1-8: Accessibility Settings Panel
   =========================================== */

.accessibility-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9998;
}

.accessibility-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.accessibility-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

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

/* Accessibility Panel */
.accessibility-panel {
    position: fixed;
    bottom: 90px;
    left: 20px;
    width: 320px;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 9998;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
}

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

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

.accessibility-header h3 {
    font-size: 1.1rem;
    font-family: 'Fredoka', sans-serif;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.accessibility-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    border-radius: 4px;
}

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

.accessibility-body {
    padding: 1.25rem 1.5rem;
}

.accessibility-option {
    margin-bottom: 1.25rem;
}

.accessibility-option:last-child {
    margin-bottom: 0;
}

.accessibility-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.accessibility-option-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.accessibility-option-desc {
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.5;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
}

.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: var(--border);
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

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

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

/* Color Mode Radio Buttons */
.color-mode-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.color-mode-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    border: 2px solid transparent;
}

.color-mode-option:hover {
    background: var(--border);
}

.color-mode-option.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.color-mode-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.color-mode-label {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.color-mode-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.color-mode-preview {
    display: flex;
    gap: 4px;
}

.color-swatch {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Color swatches for default mode */
.color-mode-option[data-mode="default"] .swatch-primary { background: #6366f1; }
.color-mode-option[data-mode="default"] .swatch-secondary { background: #ec4899; }
.color-mode-option[data-mode="default"] .swatch-accent { background: #f59e0b; }
.color-mode-option[data-mode="default"] .swatch-success { background: #10b981; }

/* Color swatches for colorblind mode */
.color-mode-option[data-mode="colorblind"] .swatch-primary { background: #0077bb; }
.color-mode-option[data-mode="colorblind"] .swatch-secondary { background: #ee7733; }
.color-mode-option[data-mode="colorblind"] .swatch-accent { background: #ccbb44; }
.color-mode-option[data-mode="colorblind"] .swatch-success { background: #009988; }

/* Color swatches for high contrast mode */
.color-mode-option[data-mode="high-contrast"] .swatch-primary { background: #0000cc; }
.color-mode-option[data-mode="high-contrast"] .swatch-secondary { background: #cc0000; }
.color-mode-option[data-mode="high-contrast"] .swatch-accent { background: #cc9900; }
.color-mode-option[data-mode="high-contrast"] .swatch-success { background: #006600; }

/* Accessibility Panel Responsive */
@media (max-width: 640px) {
    .accessibility-toggle {
        bottom: 15px;
        left: 15px;
    }

    .accessibility-btn {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .accessibility-panel {
        left: 10px;
        right: 10px;
        width: auto;
        bottom: 80px;
    }

    .accessibility-header,
    .accessibility-body {
        padding: 1rem;
    }
}

/* Skip to content link for keyboard users */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0 0 8px 8px;
    z-index: 10000;
    text-decoration: none;
    font-weight: 600;
    transition: top 0.3s;
}

.skip-to-content:focus {
    top: 0;
}
