
        /* Page-specific consolidated styles for registration_setup.html
           Header/menu styles are centralized in ../css/header.css and behavior in ../js/header.js
           This <style> keeps page-only variables, resets and keyframes. */

        /* ===== VARIABLES ===== */
        :root {
            /* Scroll indicator variables (kept from original) */
            --capsule-bg: linear-gradient(180deg, rgba(255,255,255,0.65), rgba(255,255,255,0.25));
            --capsule-border: rgba(255,255,255,0.45);
            --capsule-shadow: 0 8px 24px rgba(0,0,0,0.12), inset 0 1px 2px rgba(255,255,255,0.75);
            --chev-up-color: rgba(30,136,229,0.95);
            --chev-down-color: rgba(229,57,53,0.95);
            --chev-middle-color: rgba(100, 100, 100, 0.6);
            --dot-active-color: rgba(30,136,229,1);
            --capsule-width: 32px;
            --capsule-height: 120px;
            --chev-size: 12px;
            --dot-size: 8px;
            --animation-duration: 1.5s;
            --state-change-duration: 0.4s;
            --mask-chevron: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M10 50 L50 90 L90 50" fill="none" stroke="black" stroke-width="16" stroke-linecap="round" stroke-linejoin="round"/></svg>');
            --mask-line: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M10 50 H90" fill="none" stroke="black" stroke-width="16" stroke-linecap="round"/></svg>');

            /* Toggle/menu variables used by this page */
            --toggle-button-size: 60px;
            --toggle-menu-gap: 6px;
            --toggle-button-size-mobile: 44px;
            --toggle-menu-gap-mobile: 6px;
            --left-menu-primary: var(--secondary-color);
            --left-menu-buttons: #1565c0;
            --right-menu-primary: var(--primary-color);
            --right-menu-buttons: #c62828;
        }

        /* ===== RESET & BASE STYLES ===== */
        * { margin: 0; padding: 0; box-sizing: border-box; }
        html { height: 100%; margin: 0; padding: 0; overflow-x: hidden; }
        body {
            font-family: 'Inter', sans-serif;
            line-height: 1.6;
            color: var(--text-primary, #222);
            background: linear-gradient(135deg, #f9f8f6 0%, #f7f5f2 100%);
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            text-rendering: optimizeLegibility;
            min-height: 100vh; width: 100vw;
        }

        /* Canvas placement moved from inline style to external CSS */
        #blood-animation-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

        /* Preference label helper (replace inline styles) */
        .preference-label.centered { display: flex; justify-content: center; align-items: center; margin-bottom: 1rem; }

        /* ===== HIGH CONTRAST TEXT STYLES ===== */
        
        /* Typewriter and Welcome Text Contrast */
        .typewriter-text {
            color: #000000 !important;
            font-weight: 600 !important;
            text-shadow: none !important;
        }
        
        .welcome-title {
            color: #2f2b26 !important;
            font-size: clamp(1.8rem, 4vw, 2.5rem);
            font-weight: 700 !important;
            margin: 0;
            line-height: 1.2;
            text-shadow: none !important;
        }
        
        .welcome-message {
            font-size: 1.1rem;
            line-height: 1.6;
            color: #5a5451 !important;
            text-align: center;
            margin-bottom: 2rem;
            font-weight: 500 !important;
            text-shadow: none !important;
        }
        
        .profile-title {
            color: #1a1a1a !important;
            font-family: 'Playfair Display', serif;
            font-size: 1.8rem;
            font-weight: 700;
            margin: 0 0 0.5rem 0;
        }

        .profile-subtitle {
            color: #333333 !important;
            font-size: 0.95rem;
            font-weight: 500;
            margin: 0;
            opacity: 0.8;
        }

        .hero-name-title {
            color: #2d2d2d !important;
            font-size: 1.1rem;
            font-weight: 600;
            margin: 0 0 0.75rem 0;
        }

        .customization-title {
            color: #1a1a1a !important;
            font-family: 'Playfair Display', serif;
            font-size: 1.6rem;
            font-weight: 700;
            margin: 0 0 1.5rem 0;
            text-align: center;
        }

        .section-title {
            color: #2d2d2d !important;
            font-size: 1.1rem;
            font-weight: 600;
            margin: 0 0 1rem 0;
        }

        .toggle-label {
            color: #333333 !important;
            font-weight: 500;
        }

        .nav-button {
            color: #1a1a1a !important;
        }

        .nav-button.primary {
            color: #ffffff !important;
        }

        /* ===== INPUT AND FORM TEXT CONTRAST ===== */
        .name-input-field {
            color: #1a1a1a !important;
            font-weight: 500;
        }

        .name-input-field::placeholder {
            color: #666666 !important;
            opacity: 0.7;
        }

        /* ===== GENERAL TEXT ELEMENTS CONTRAST ===== */
        h1, h2, h3, h4, h5, h6 {
            color: #1a1a1a !important;
        }

        p {
            color: #333333 !important;
        }

        /* ===== DARK MODE TEXT OVERRIDES ===== */
        body.dark-mode .profile-title {
            color: #f8fafc !important;
        }

        body.dark-mode .profile-subtitle {
            color: #e2e8f0 !important;
        }

        body.dark-mode .hero-name-title {
            color: #f1f5f9 !important;
        }

        body.dark-mode .customization-title {
            color: #f8fafc !important;
        }

        body.dark-mode .section-title {
            color: #f1f5f9 !important;
        }

        body.dark-mode .toggle-label {
            color: #e2e8f0 !important;
        }

        body.dark-mode .nav-button {
            color: #f8fafc !important;
        }

        body.dark-mode h1, 
        body.dark-mode h2, 
        body.dark-mode h3, 
        body.dark-mode h4, 
        body.dark-mode h5, 
        body.dark-mode h6 {
            color: #f8fafc !important;
        }

        body.dark-mode p {
            color: #e2e8f0 !important;
        }

        body.dark-mode .tagline {
            color: #e2e8f0 !important;
        }

        body.dark-mode .name-input-field {
            color: #f8fafc !important;
        }

        body.dark-mode .name-input-field::placeholder {
            color: #94a3b8 !important;
        }

        /* ===== PREFERENCES SECTION TEXT CONTRAST ===== */
        .preferences-title {
            color: #1a1a1a !important;
            font-family: 'Playfair Display', serif;
            font-size: 1.6rem;
            font-weight: 700;
            margin: 0 0 1.5rem 0;
            text-align: center;
        }

        .preference-label {
            color: #333333 !important;
            font-weight: 500;
            font-size: 1rem;
        }

        .preference-label span:not(.preference-icon) {
            color: #2d2d2d !important;
            font-weight: 500;
        }

        /* ===== PREFERENCES SECTION DARK MODE ===== */
        body.dark-mode .preferences-title {
            color: #f8fafc !important;
        }

        body.dark-mode .preference-label {
            color: #e2e8f0 !important;
        }

        body.dark-mode .preference-label span:not(.preference-icon) {
            color: #f1f5f9 !important;
        }

        /* ===== HERO PROFILE SECTION TEXT CONTRAST ===== */
        .input-label {
            color: #2d2d2d !important;
            font-size: 1.1rem;
            font-weight: 600;
            margin: 0 0 0.75rem 0;
            display: block;
        }

        .hero-name-input {
            color: #1a1a1a !important;
            font-weight: 500;
            border: 2px solid #d1d5db;
            background-color: #ffffff;
        }

        .hero-name-input::placeholder {
            color: #666666 !important;
            opacity: 0.7;
        }

        .generate-button {
            color: #1a1a1a !important;
            background-color: #f3f4f6;
            border: 2px solid #d1d5db;
            font-weight: 500;
        }

        .generate-button:hover {
            color: #ffffff !important;
            background-color: var(--primary-color);
            border-color: var(--primary-color);
        }

        /* ===== HERO PROFILE SECTION DARK MODE ===== */
        body.dark-mode .input-label {
            color: #f1f5f9 !important;
        }

        body.dark-mode .hero-name-input {
            color: #f8fafc !important;
            background-color: rgba(30, 35, 45, 0.8);
            border-color: rgba(255, 255, 255, 0.2);
        }

        body.dark-mode .hero-name-input::placeholder {
            color: #94a3b8 !important;
        }

        body.dark-mode .generate-button {
            color: #f1f5f9 !important;
            background-color: rgba(30, 35, 45, 0.6);
            border-color: rgba(255, 255, 255, 0.2);
        }

        body.dark-mode .generate-button:hover {
            color: #ffffff !important;
            background-color: var(--primary-color);
            border-color: var(--primary-color);
        }

        /* ===== MAIN CONTENT GRID ===== */
        .setup-grid {
            flex: 1;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.5rem;
            margin-top: 1.5rem;
            overflow: hidden;
            position: relative;
        }

        /* ===== HERO PROFILE SECTION ===== */
        .hero-profile-section {
            /* Match index.html choice section styling exactly */
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(248, 250, 252, 0.03) 100%);
            border-radius: 20px;
            padding: 1.5rem;
            border: 1px solid rgba(0, 0, 0, 0.08);
            position: relative;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.4);
            /* RESTORED: overflow-y for scroll indicators to work */
            overflow-y: auto;
            position: relative;
            max-height: 48vh;
        }

        /* Hide scrollbar completely for hero profile section */
        .hero-profile-section::-webkit-scrollbar {
            width: 0px; /* Hide scrollbar completely */
            background: transparent; /* Make background transparent */
        }

        .hero-profile-section::-webkit-scrollbar-track {
            background: transparent; /* Hide track */
        }

        .hero-profile-section::-webkit-scrollbar-thumb {
            background: transparent; /* Hide thumb */
        }

        .hero-profile-section::-webkit-scrollbar-thumb:hover {
            background: transparent; /* Keep hidden on hover */
        }

        /* Alternative method - hide scrollbar for Firefox */
        .hero-profile-section {
            scrollbar-width: none; /* Firefox */
            -ms-overflow-style: none; /* IE and Edge */
        }

        .profile-header {
            text-align: center;
        }

        .profile-title {
            font-family: 'Playfair Display', serif;
            font-size: 1.8rem;
            font-weight: 700;
            color: white;
            margin-bottom: 0.5rem;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        }

        .profile-subtitle {
            color: #374151;
            font-size: 0.9rem;
        }

        /* Avatar Selection */
        .avatar-showcase {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 1rem;
        }

        .current-avatar {
            width: 120px;
            height: 120px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 4rem;
            box-shadow: 0 15px 35px rgba(229, 57, 53, 0.3);
            border: 3px solid rgba(255, 255, 255, 0.3);
            transition: all 0.3s ease;
            animation: avatarGlow 3s infinite ease-in-out;
        }

        @keyframes avatarGlow {
            0%, 100% { box-shadow: 0 15px 35px rgba(229, 57, 53, 0.3); }
            50% { box-shadow: 0 20px 45px rgba(229, 57, 53, 0.5); }
        }

        .avatar-grid {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
            justify-content: center;
        }

        .avatar-option {
            width: 50px;
            height: 50px;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid transparent;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
        }

        .avatar-option:hover {
            transform: scale(1.1);
            background: rgba(255, 255, 255, 0.2);
            border-color: rgba(255, 255, 255, 0.4);
        }

        .avatar-option.active {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            border-color: rgba(255, 255, 255, 0.6);
            box-shadow: 0 5px 15px rgba(229, 57, 53, 0.4);
        }

        /* Hero Name Input */
        .name-input-section {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .input-label {
            color: white;
            font-weight: 600;
            font-size: 1rem;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
        }

        .hero-name-input {
            width: 100%;
            padding: 1rem 1.5rem;
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 15px;
            background: rgba(255, 255, 255, 0.15);
            backdrop-filter: blur(10px);
            color: #1a1a1a;
            font-size: 1.1rem;
            font-weight: 600;
            text-align: center;
            transition: all 0.3s ease;
            outline: none;
            text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
        }

        .hero-name-input::placeholder {
            color: rgba(0, 0, 0, 0.6);
            font-weight: 400;
        }

        .hero-name-input:focus {
            border-color: var(--secondary-color);
            background: rgba(255, 255, 255, 0.25);
            box-shadow: 0 0 20px rgba(30, 136, 229, 0.3);
            transform: scale(1.02);
            color: #000000;
        }

        .generate-button {
            padding: 0.8rem 1.5rem;
            border: none;
            border-radius: 12px;
            background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);
            color: white;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(0, 137, 123, 0.3);
        }

        .generate-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0, 137, 123, 0.4);
        }

        /* Hero Description Styles */
        .hero-description {
            display: flex;
            flex-direction: column;
            gap: 0.8rem;
        }

        .hero-description-input {
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 12px;
            padding: 1rem;
            color: #1a1a1a;
            font-family: 'Inter', sans-serif;
            font-size: 0.95rem;
            font-weight: 500;
            resize: vertical;
            min-height: 80px;
            transition: all 0.3s ease;
            text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
        }

        .hero-description-input:focus {
            outline: none;
            border-color: var(--secondary-color);
            background: rgba(255, 255, 255, 0.25);
            box-shadow: 0 0 20px rgba(30, 136, 229, 0.3);
            color: #000000;
        }

        .hero-description-input::placeholder {
            color: rgba(0, 0, 0, 0.7);
            font-weight: 400;
        }

        /* Hero Powers Styles */
        .hero-powers {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .powers-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.8rem;
        }

        .power-option {
            background: rgba(255, 255, 255, 0.15);
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 10px;
            padding: 0.8rem;
            color: #1a1a1a;
            font-family: 'Inter', sans-serif;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
            text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
        }

        .power-option:hover {
            background: rgba(255, 255, 255, 0.3);
            border-color: var(--secondary-color);
            transform: translateY(-2px);
            color: #000000;
        }

        .power-option.active {
            background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
            border-color: rgba(30, 136, 229, 0.5);
            box-shadow: 0 4px 15px rgba(30, 136, 229, 0.3);
            color: white;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
        }

        /* ===== PREFERENCES SECTION ===== */
        .preferences-section {
            /* Match index.html choice section styling exactly */
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(248, 250, 252, 0.03) 100%);
            border-radius: 20px;
            padding: 1.5rem;
            border: 1px solid rgba(0, 0, 0, 0.08);
            position: relative;
            box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.4);
            /* RESTORED: overflow-y for scroll indicators to work */
            overflow-y: auto;
            position: relative;
            max-height: 48vh;
        }

        /* Hide scrollbar completely for preferences section */
        .preferences-section::-webkit-scrollbar {
            width: 0px; /* Hide scrollbar completely */
            background: transparent; /* Make background transparent */
        }

        .preferences-section::-webkit-scrollbar-track {
            background: transparent; /* Hide track */
        }

        .preferences-section::-webkit-scrollbar-thumb {
            background: transparent; /* Hide thumb */
        }

        .preferences-section::-webkit-scrollbar-thumb:hover {
            background: transparent; /* Keep hidden on hover */
        }

        /* Alternative method - hide scrollbar for Firefox */
        .preferences-section {
            scrollbar-width: none; /* Firefox */
            -ms-overflow-style: none; /* IE and Edge */
        }

        @media (prefers-reduced-motion: reduce) {
            .hero-profile-section::before,
            .preferences-section::after { animation: none; }
        }

        /* ===== PANEL CONTENT WRAPPER (NEW) ===== */
        .panel-content {
            height: 100%;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
            /* Hide the scrollbar on the new element */
            scrollbar-width: none; /* Firefox */
            -ms-overflow-style: none;  /* IE and Edge */
        }
        .panel-content::-webkit-scrollbar {
            display: none; /* For Chrome, Safari, etc. */
        }

        /* ===== SCROLL INDICATOR SYSTEM FROM ARROW_2.HTML ===== */
        .indicator-capsule {
            position: absolute; /* This is the key change */
            top: calc(50% - var(--capsule-height) / 2);
            height: var(--capsule-height);
            width: var(--capsule-width);
            border-radius: 999px;
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            background: var(--capsule-bg);
            border: 1px solid var(--capsule-border);
            box-shadow: var(--capsule-shadow);
            z-index: 1;
            display: flex;
            flex-direction: column;
            justify-content: space-evenly;
            align-items: center;
            padding: 12px 0;
        }
        .indicator-capsule.left { 
            left: 16px !important; 
            right: auto !important;
            /* float: left; <-- REMOVED */
            margin-left: 0;
            margin-right: auto;
        }
        .indicator-capsule.right { 
            right: 16px !important; 
            left: auto !important;
            /* float: right; <-- REMOVED */
            margin-left: auto;
            margin-right: 0;
        }

        .chev {
            width: var(--chev-size); height: var(--chev-size);
            flex-shrink: 0;
            mask-image: var(--mask-chevron); mask-size: contain;
            -webkit-mask-image: var(--mask-chevron); -webkit-mask-size: contain;
            transition: all var(--state-change-duration) cubic-bezier(0.19, 1, 0.22, 1);
            animation-duration: var(--animation-duration);
            animation-iteration-count: infinite;
            animation-timing-function: ease-in-out;
        }

        .chev.up { animation-delay: 0s; }
        .chev.middle { animation-delay: 0.15s; }
        .chev.down { animation-delay: 0.3s; }

        /* --- ARROW SCROLL STATE STYLES --- */
        .panel.scroll-state-top .chev {
            transform: rotate(0deg); background-color: var(--chev-down-color);
            animation-name: waterfall-down;
        }
        .panel.scroll-state-middle .chev.up {
            transform: rotate(180deg); background-color: var(--chev-up-color);
            animation-name: waterfall-up;
        }
        .panel.scroll-state-middle .chev.middle {
            mask-image: var(--mask-line); -webkit-mask-image: var(--mask-line);
            background-color: var(--chev-middle-color); transform: rotate(0deg);
            animation-name: none; opacity: 0.8;
        }
        .panel.scroll-state-middle .chev.down {
            transform: rotate(0deg); background-color: var(--chev-down-color);
            animation-name: waterfall-down;
        }
        .panel.scroll-state-bottom .chev {
            transform: rotate(180deg); background-color: var(--chev-up-color);
            animation-name: waterfall-up;
        }

        /* --- DOT INDICATOR STYLES (SCROLL INDICATORS ONLY) --- */
        .indicator-capsule .dot {
            width: var(--dot-size); height: var(--dot-size);
            border-radius: 50%;
            background-color: var(--chev-middle-color);
            opacity: 0.4;
            transform: scale(1);
            transition: all var(--state-change-duration) cubic-bezier(0.19, 1, 0.22, 1);
        }
        
        /* Progress bar styles */
        .progress-bar {
            width: 8px;
            height: calc(100% - 24px);
            background: rgba(255, 255, 255, 0.3);
            border-radius: 4px;
            position: relative;
            overflow: hidden;
            margin: auto;
            border: 1px solid rgba(255, 255, 255, 0.4);
        }

        .progress-fill {
            width: 100%;
            height: 20%;
            background: linear-gradient(to bottom, rgba(30, 136, 229, 0.9), rgba(30, 136, 229, 1));
            border-radius: 3px;
            transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: absolute;
            bottom: 0;
            box-shadow: 0 2px 8px rgba(30, 136, 229, 0.4);
        }

        /* -- KEYFRAMES -- */
        @keyframes waterfall-down {
            0% { opacity: 0; transform: translateY(-6px) scale(0.9); }
            30%, 70% { opacity: 1; transform: translateY(0) scale(1); }
            100% { opacity: 0; transform: translateY(6px) scale(0.9); }
        }
        @keyframes waterfall-up {
            0% { opacity: 0; transform: translateY(6px) scale(0.9) rotate(180deg); }
            30%, 70% { opacity: 1; transform: translateY(0) scale(1) rotate(180deg); }
            100% { opacity: 0; transform: translateY(-6px) scale(0.9) rotate(180deg); }
        }

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

        .preferences-title {
            font-family: 'Playfair Display', serif;
            font-size: 1.8rem;
            font-weight: 700;
            color: white;
            text-align: center;
            margin-bottom: 1rem;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        }

        .preference-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.1);
            transition: all 0.3s ease;
        }

        .preference-item:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: translateX(5px);
        }

        .preference-label {
            display: flex;
            align-items: center;
            gap: 0.8rem;
            color: white;
            font-weight: 500;
        }

        .preference-icon {
            font-size: 1.3rem;
            filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
        }

        /* Modern Toggle Switch */
        .toggle-switch {
            width: 60px;
            height: 30px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 15px;
            position: relative;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid rgba(255, 255, 255, 0.1);
        }

        .toggle-switch.active {
            background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
            border-color: rgba(30, 136, 229, 0.5);
            box-shadow: 0 0 20px rgba(30, 136, 229, 0.3);
        }

        .toggle-slider {
            width: 22px;
            height: 22px;
            background: white;
            border-radius: 50%;
            position: absolute;
            top: 2px;
            left: 2px;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }

        .toggle-switch.active .toggle-slider {
            transform: translateX(30px);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        }

        /* ===== THEME SELECTOR ===== */
        .theme-selector {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 1.5rem;
            border: 1px solid rgba(255, 255, 255, 0.2);
            margin-top: 1rem;
        }

        .theme-options {
            display: flex;
            gap: 1rem;
            justify-content: center;
        }

        .theme-option {
            width: 80px;
            height: 50px;
            border-radius: 12px;
            border: 2px solid transparent;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .theme-option.light {
            background: linear-gradient(135deg, #f9f8f6 0%, #f7f5f2 100%);
            border: 2px solid rgba(229, 57, 53, 0.3);
        }

        .theme-option.dark {
            background: linear-gradient(135deg, 
                rgba(10, 14, 21, 0.98) 0%, 
                rgba(15, 20, 28, 0.95) 50%,
                rgba(20, 25, 35, 0.92) 100%);
            border: 2px solid rgba(30, 136, 229, 0.3);
        }

        .theme-option:hover {
            transform: scale(1.05);
            border-color: rgba(255, 255, 255, 0.5);
        }

        .theme-option.active {
            border-color: rgba(255, 255, 255, 0.8);
            box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
        }

        .theme-icon {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 1.5rem;
        }

        /* ===== NAVIGATION ===== */
        .navigation-section {
            display: flex;
            justify-content: center;
            gap: 1rem;
            padding: 1.5rem 0;
            margin-top: auto;
            /* Ensure transparent background like other sections */
            background: transparent;
        }

        .nav-button {
            padding: 1rem 2rem;
            border: none;
            border-radius: 15px;
            font-weight: 600;
            font-size: 1rem;
            cursor: pointer;
            transition: all 0.3s ease;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }

        .nav-button.primary {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
            color: white;
            border: 2px solid rgba(255, 255, 255, 0.3);
        }

        .nav-button.primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 30px rgba(229, 57, 53, 0.4);
        }

        .nav-button.secondary {
            background: rgba(255, 255, 255, 0.1);
            color: white;
            border: 2px solid rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
        }

        .nav-button.secondary:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-2px);
        }

        /* ===== DESKTOP-SPECIFIC DESIGN ===== */
        @media (min-width: 769px) {
            /* Desktop: set specific height constraints to fit within container */
            .hero-profile-section,
            .preferences-section {
                max-height: 50vh;
                min-height: 45vh;
                overflow-y: auto;
            }
        }

        /* ===== RESPONSIVE DESIGN ===== */
        
        /* Narrow screens - enable visible scrolling for safety */
        @media (max-width: 1280px) and (max-height: 700px) {
            .container {
                /* Enable visible scrollbar for narrow screens */
                scrollbar-width: thin; /* Firefox */
                -ms-overflow-style: auto; /* IE and Edge */
            }
            
            .container::-webkit-scrollbar {
                width: 6px;
                background: rgba(255, 255, 255, 0.1);
            }
            
            .container::-webkit-scrollbar-track {
                background: rgba(255, 255, 255, 0.05);
                border-radius: 3px;
            }
            
            .container::-webkit-scrollbar-thumb {
                background: rgba(198, 40, 40, 0.3);
                border-radius: 3px;
                transition: background 0.3s ease;
            }
            
            .container::-webkit-scrollbar-thumb:hover {
                background: rgba(198, 40, 40, 0.5);
            }
            
            /* Dark mode scrollbar */
            body.dark-mode .container::-webkit-scrollbar {
                background: rgba(255, 255, 255, 0.05);
            }
            
            body.dark-mode .container::-webkit-scrollbar-track {
                background: rgba(255, 255, 255, 0.02);
            }
            
            body.dark-mode .container::-webkit-scrollbar-thumb {
                background: rgba(255, 255, 255, 0.2);
            }
            
            body.dark-mode .container::-webkit-scrollbar-thumb:hover {
                background: rgba(255, 255, 255, 0.3);
            }
        }
        
        /* Very narrow screens - more prominent scrolling */
        @media (max-width: 900px) and (max-height: 600px) {
            .container {
                height: 98vh; /* Use more screen space */
                padding: 0.8rem; /* Reduce padding */
            }
            
            .container::-webkit-scrollbar {
                width: 8px; /* Slightly wider scrollbar */
            }
            
            .container::-webkit-scrollbar-thumb {
                background: rgba(198, 40, 40, 0.4);
            }
            
            body.dark-mode .container::-webkit-scrollbar-thumb {
                background: rgba(255, 255, 255, 0.25);
            }
        }
        
        /* ===== MOBILE CONTAINER REMOVAL ===== */
        @media (max-width: 768px) {
            /* Enable mobile scrolling */
            html, body {
                overflow-y: auto !important;
                height: auto !important;
                scroll-behavior: smooth !important;
            }

            /* Remove container styling for mobile - preserve centering */
            .container,
            main,
            .main-content {
                border: none !important;
                overflow: visible !important;
                height: auto !important;
                width: 100vw !important;
                max-width: 100vw !important;
                max-height: none !important;
                min-height: auto !important;
                position: relative !important;
                top: auto !important;
                left: auto !important;
                transform: none !important;
                border-radius: 0 !important;
                box-shadow: none !important;
                background: transparent !important;
                -webkit-backdrop-filter: none !important;
                backdrop-filter: none !important;
                display: block !important;
                padding: 15px 20px !important;
            }

            /* Ensure setup-grid stays centered */
            .setup-grid {
                display: flex !important;
                flex-direction: column !important;
                align-items: center !important;
                justify-content: flex-start !important;
                width: 100% !important;
                max-width: 100% !important;
                margin: 0 auto !important;
                padding: 0 !important;
            }

            /* Keep sections centered */
            .setup-grid section {
                width: 100% !important;
                max-width: 100% !important;
                margin: 1rem auto !important;
                text-align: center !important;
            }
        }

        @media (max-width: 480px) {
            /* Remove container styling for small mobile screens - preserve centering */
            .container,
            main,
            .main-content {
                border: none !important;
                overflow: visible !important;
                height: auto !important;
                width: 100vw !important;
                max-width: 100vw !important;
                max-height: none !important;
                min-height: auto !important;
                position: relative !important;
                top: auto !important;
                left: auto !important;
                transform: none !important;
                border-radius: 0 !important;
                box-shadow: none !important;
                background: transparent !important;
                -webkit-backdrop-filter: none !important;
                backdrop-filter: none !important;
                display: block !important;
                padding: 10px 15px !important;
            }

            /* Ensure setup-grid stays centered on small mobile */
            .setup-grid {
                display: flex !important;
                flex-direction: column !important;
                align-items: center !important;
                justify-content: flex-start !important;
                width: 100% !important;
                max-width: 100% !important;
                margin: 0 auto !important;
                padding: 0 !important;
            }

            /* Keep sections centered on small mobile */
            .setup-grid section {
                width: 100% !important;
                max-width: 100% !important;
                margin: 1rem auto !important;
                text-align: center !important;
            }
        }

        /* ===== DEVELOPMENT VALIDATION TOGGLE ===== */
        .dev-validation-toggle {
            position: fixed !important;
            top: 20px !important;
            left: 50% !important;
            transform: translateX(-50%) !important;
            z-index: 9999 !important;
            background: rgba(0, 0, 0, 0.8) !important;
            color: white !important;
            padding: 8px 16px !important;
            border-radius: 20px !important;
            display: flex !important;
            align-items: center !important;
            gap: 8px !important;
            font-size: 12px !important;
            font-family: 'Inter', sans-serif !important;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
            backdrop-filter: blur(10px) !important;
            pointer-events: auto !important;
        }

        .toggle-switch {
            position: relative !important;
            display: inline-block !important;
            width: 32px !important;
            height: 18px !important;
        }

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

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

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

        .toggle-switch input:checked + .toggle-slider {
            background-color: #ff4444 !important;
        }

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

        .toggle-label {
            font-size: 11px !important;
            font-weight: 500 !important;
            white-space: nowrap !important;
        }

        /* Hide toggle on mobile for cleaner UI */
        @media (max-width: 768px) {
            .dev-validation-toggle {
                top: 10px !important;
                padding: 6px 12px !important;
                font-size: 10px !important;
            }
            
            .toggle-switch {
                width: 28px !important;
                height: 16px !important;
            }
            
            .toggle-slider:before {
                height: 12px !important;
                width: 12px !important;
            }
            
            .toggle-switch input:checked + .toggle-slider:before {
                transform: translateX(12px) !important;
            }
        }

        /* ===== TABLET PORTRAIT OPTIMIZATION ===== */
        @media (min-width: 481px) and (max-width: 768px) {
            .container {
                width: clamp(400px, 85vw, 700px);
                padding: 1.5rem;
            }
            
            .nav-button {
                min-width: 160px;
                max-width: 200px;
                padding: 1rem 1.5rem;
                font-size: 16px;
            }
            
            /* Better spacing for tablet */
            .hero-profile-section, .preferences-section {
                padding: 2rem;
                gap: 1.5rem;
            }
        }
        
        @media (max-width: 768px) {
            /* Mobile: Enable page-level scrolling */
            body {
                overflow: auto !important; /* Enable scrolling on mobile */
                height: auto !important; /* Allow body to grow with content */
                min-height: 100vh; /* Minimum viewport height */
                display: block !important; /* Remove flexbox centering */
                align-items: initial !important;
                justify-content: initial !important;
                padding: 0.5rem; /* Add some padding around container */
            }

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

            .divider {
                display: none; /* Hide divider on mobile since sections stack vertically */
            }
            
            /* Hide arrow capsules on mobile */
            .indicator-capsule {
                display: none !important;
            }

            .container {
                /* Mobile: Allow container to grow with content instead of fixed height */
                height: auto; /* Remove fixed 95vh height */
                min-height: 95vh; /* Minimum height to maintain nice appearance */
                max-height: none; /* Remove height restriction */
                padding: 1rem;
                /* Mobile: Container no longer needs flexbox centering */
                margin: 1rem auto;
                width: clamp(320px, 95vw, 800px); /* Improved max-width for tablet compatibility */
                position: relative; /* Ensure proper positioning */
            }

            .current-avatar {
                width: 100px;
                height: 100px;
                font-size: 3rem;
            }

            .hero-profile-section,
            .preferences-section {
                padding: 1.5rem;
                /* Mobile: Remove height constraints - let sections grow naturally */
                max-height: none;
                /* Keep vertical scrolling for very long content, no horizontal scroll */
                overflow-y: auto;
                overflow-x: hidden !important; /* Force hide horizontal scroll on mobile */
            }

            .powers-grid {
                grid-template-columns: 1fr; /* Single column on mobile */
                gap: 0.6rem;
            }

            .power-option {
                padding: 0.7rem;
                font-size: 0.85rem;
            }

            .hero-description-input {
                min-height: 60px;
                font-size: 0.9rem;
            }

            .navigation-section {
                flex-direction: row; /* Keep buttons in same row on mobile */
                justify-content: center;
                align-items: center;
                gap: 0.8rem; /* Reduce gap for mobile */
                flex-wrap: wrap; /* Allow wrap if needed */
                padding: 1rem 0; /* Reduce padding on mobile */
            }

            .nav-button {
                flex: 1; /* Buttons share available width */
                min-width: 140px; /* Improved minimum width for touch targets */
                max-width: 180px; /* Better maximum width for readability */
                min-height: 44px; /* Accessibility: minimum touch target */
                padding: 1rem 1.2rem; /* Better padding for touch */
                font-size: 16px; /* Prevent zoom on iOS */
                justify-content: center;
            }
        }

        @media (max-width: 480px) {
            body {
                padding: 0.25rem; /* Smaller padding for very small screens */
                /* Ensure scrolling is still enabled for small screens */
                overflow: auto !important;
                height: auto !important;
                min-height: 100vh;
            }

            .container {
                border-radius: 15px;
                padding: 0.8rem;
                /* Small mobile: Even more flexible height */
                min-height: 90vh; /* Slightly smaller minimum */
                width: clamp(300px, 98vw, 500px); /* Even narrower for small screens */
                margin: 0.5rem auto; /* Smaller margins for small screens */
            }

            .hero-profile-section,
            .preferences-section {
                padding: 1rem;
                /* Small mobile: Ensure no height constraints */
                max-height: none;
                overflow-y: auto;
                overflow-x: hidden !important; /* Force hide horizontal scroll on small mobile */
            }

            .current-avatar {
                width: 80px;
                height: 80px;
                font-size: 2.5rem;
            }

            .avatar-option {
                width: 40px;
                height: 40px;
                font-size: 1.2rem;
            }

            /* Extra small screen navigation adjustments */
            .navigation-section {
                gap: 0.5rem; /* Even smaller gap for very small screens */
                padding: 0.8rem 0;
            }

            .nav-button {
                min-width: 120px; /* Maintain accessibility on tiny screens */
                max-width: 150px; /* Better proportions */
                min-height: 44px; /* Always maintain touch targets */
                padding: 0.8rem 1rem; /* Balanced padding */
                font-size: 15px; /* Readable font size, prevent zoom */
            }
        }

        /* ===== ANIMATIONS ===== */
        .fade-in {
            animation: fadeIn 0.8s ease-out;
        }

        .slide-in-left {
            animation: slideInLeft 0.8s ease-out;
        }

        .slide-in-right {
            animation: slideInRight 0.8s ease-out;
        }

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

        @keyframes slideInLeft {
            from { opacity: 0; transform: translateX(-50px); }
            to { opacity: 1; transform: translateX(0); }
        }

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

        /* ===== 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: 0;
        }

        /* Focus styles */
        button:focus-visible,
        input:focus-visible,
        .avatar-option:focus-visible,
        .theme-option:focus-visible {
            outline: 2px solid rgba(255, 255, 255, 0.8);
            outline-offset: 2px;
        }

        /* ===== MISSING KEYFRAME ANIMATIONS ===== */
        @keyframes heartWaveRipple {
            0% {
                top: 50%;
                left: 50%;
                width: 0;
                height: 0;
                opacity: 1;
                transform: translate(-50%, -50%);
            }
            100% {
                top: 50%;
                left: 50%;
                width: 120px;
                height: 120px;
                opacity: 0;
                transform: translate(-50%, -50%);
            }
        }

        @keyframes bloodDropSequentialFall {
            0% { 
                top: 50%; 
                opacity: 0; 
                transform: translateX(-50%) scale(0.8);
                filter: drop-shadow(0 2px 4px rgba(220, 38, 38, 0.3));
            }
            1% { 
                opacity: 0.8; 
                transform: translateX(-50%) scale(1);
                filter: drop-shadow(0 3px 6px rgba(220, 38, 38, 0.4));
            }
            33% { 
                top: 60vh; 
                opacity: 0.8; 
                transform: translateX(-50%) scale(1.1);
                filter: drop-shadow(0 4px 8px rgba(220, 38, 38, 0.5));
            }
            34% { 
                opacity: 0; 
                transform: translateX(-50%) scale(0.8);
                filter: drop-shadow(0 2px 4px rgba(220, 38, 38, 0.2));
            }
            100% { 
                top: 60vh; 
                opacity: 0; 
                transform: translateX(-50%) scale(0.6);
                filter: drop-shadow(0 1px 2px rgba(220, 38, 38, 0.1));
            }
        }