:root {
            --bg-dark: #1a1528;
            --pink: #ff70a6;
            --cyan: #70d6ff;
            --lavender: #c8b6ff;
            --blue: #3a86ff;
            --orange: #ff9770;
            --text-light: #f8f9fa;
            --glass-bg: rgba(255, 255, 255, 0.05);
            --glass-border: rgba(255, 255, 255, 0.1);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Outfit', sans-serif;
        }

        body {
            background-color: var(--bg-dark);
            color: var(--text-light);
            overflow-x: hidden;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        canvas#starfield {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
        }

        .screen {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 100%;
            max-width: 800px;
            padding: 2rem 1rem;
            min-height: 100vh;
            opacity: 0;
            transition: opacity 0.5s ease;
        }

        .screen.active {
            display: flex;
            opacity: 1;
        }

        .glass-card {
            background: var(--glass-bg);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid var(--glass-border);
            border-radius: 16px;
            padding: 2rem;
            width: 100%;
            box-shadow: 0 0 20px rgba(255, 112, 166, 0.15), inset 0 0 20px rgba(255, 255, 255, 0.05);
            position: relative;
        }

        .modal-overlay {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(26, 21, 40, 0.8);
            backdrop-filter: blur(10px);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            padding: 1rem;
            opacity: 1;
            transition: opacity 0.3s ease;
        }
        
        .modal-overlay.hidden {
            opacity: 0;
            pointer-events: none;
        }
        
        .glossary-item {
            background: rgba(0, 0, 0, 0.2);
            border-left: 4px solid var(--pink);
            padding: 15px;
            border-radius: 8px;
        }

        h1.glowing-title {
            font-family: 'Press Start 2P', cursive;
            font-size: 1.5rem;
            line-height: 1.8;
            text-align: center;
            margin-bottom: 1rem;
            color: var(--text-light);
            text-shadow: 0 0 10px rgba(255, 112, 166, 0.8), 0 0 20px rgba(255, 112, 166, 0.4);
        }

        .subtitle {
            font-size: 1.2rem;
            text-align: center;
            margin-bottom: 2rem;
            color: var(--lavender);
            font-weight: 300;
        }

        .btn-group {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            width: 100%;
            max-width: 400px;
            margin: 0 auto 2rem;
        }

        .mode-btn {
            background: rgba(0,0,0,0.3);
            border: 1px solid var(--glass-border);
            color: var(--text-light);
            padding: 1rem 1.5rem;
            border-radius: 12px;
            font-size: 1.1rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 0.5rem;
        }

        .mode-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            transform: translateY(-2px);
        }

        .mode-btn.selected {
            background: var(--glass-bg);
            border-color: var(--cyan);
            box-shadow: 0 0 15px rgba(112, 214, 255, 0.4);
        }

        .start-btn {
            background: transparent;
            color: rgba(255,255,255,0.5);
            border: 2px solid rgba(255,255,255,0.2);
            padding: 1rem 3rem;
            border-radius: 30px;
            font-size: 1.2rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 2px;
            cursor: not-allowed;
            transition: all 0.3s ease;
            align-self: center;
        }

        .start-btn.ready {
            color: var(--bg-dark);
            background: var(--pink);
            border-color: var(--pink);
            cursor: pointer;
            box-shadow: 0 0 20px rgba(255, 112, 166, 0.6);
        }

        .start-btn.ready:hover {
            transform: scale(1.05);
            box-shadow: 0 0 30px rgba(255, 112, 166, 0.8);
        }

        /* Quiz Screen */
        .progress-container {
            width: 100%;
            margin-bottom: 2rem;
            position: relative;
        }

        .progress-text {
            text-align: right;
            font-family: 'Press Start 2P', cursive;
            font-size: 0.7rem;
            color: var(--cyan);
            margin-bottom: 0.5rem;
        }

        .progress-bar-bg {
            width: 100%;
            height: 10px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 5px;
            position: relative;
            overflow: visible;
        }

        .progress-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--cyan), var(--pink));
            border-radius: 5px;
            width: 0%;
            transition: width 0.4s ease;
            box-shadow: 0 0 10px rgba(255, 112, 166, 0.5);
        }

        .mascot {
            position: absolute;
            top: -20px;
            font-size: 1.5rem;
            transform: translateX(-50%);
            transition: left 0.4s ease;
            filter: drop-shadow(0 0 5px var(--pink));
        }

        .question-text {
            font-size: 1.4rem;
            font-weight: 500;
            margin-bottom: 2rem;
            text-align: center;
            line-height: 1.4;
        }

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

        .option-btn {
            background: rgba(0, 0, 0, 0.2);
            border: 1px solid var(--glass-border);
            color: var(--text-light);
            padding: 1.2rem;
            border-radius: 12px;
            font-size: 1.1rem;
            text-align: left;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .option-btn:hover:not(:disabled) {
            background: rgba(255, 255, 255, 0.1);
            border-color: var(--lavender);
            transform: translateX(5px);
        }

        .option-btn.selected {
            background: rgba(112, 214, 255, 0.2);
            border-color: var(--cyan);
            box-shadow: 0 0 15px rgba(112, 214, 255, 0.3);
        }

        .option-btn:disabled {
            opacity: 0.7;
            cursor: default;
        }

        .controls {
            margin-top: 2rem;
            display: flex;
            justify-content: flex-start;
        }

        .back-btn {
            background: transparent;
            border: none;
            color: var(--lavender);
            font-size: 1rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: color 0.3s ease;
        }

        .back-btn:hover {
            color: var(--pink);
        }

        .back-btn:disabled {
            opacity: 0;
            pointer-events: none;
        }

        /* Loading */
        .loading-overlay {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: var(--bg-dark);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 100;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.5s ease;
        }

        .loading-overlay.active {
            opacity: 1;
            pointer-events: all;
        }

        .loader {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1rem;
        }

        .dot {
            width: 15px; height: 15px;
            border-radius: 50%;
            background: var(--pink);
            animation: bounce 0.5s alternate infinite;
        }
        .dot:nth-child(2) { animation-delay: 0.15s; background: var(--cyan); }
        .dot:nth-child(3) { animation-delay: 0.3s; background: var(--lavender); }

        @keyframes bounce {
            to { transform: translateY(-15px); }
        }

        /* Results Screen */
        .results-header {
            text-align: center;
            margin-bottom: 2rem;
        }
        
        .results-header h2 {
            font-size: 1.2rem;
            color: var(--lavender);
            margin-bottom: 0.5rem;
            font-weight: 400;
        }

        .primary-archetype {
            display: flex;
            flex-direction: column;
            align-items: center;
            animation: slideUp 0.8s ease backwards;
        }

        .archetype-emoji {
            font-size: 4rem;
            margin-bottom: 0.5rem;
            filter: drop-shadow(0 0 15px rgba(255,255,255,0.3));
        }

        .archetype-name {
            font-family: 'Press Start 2P', cursive;
            font-size: 1.5rem;
            margin-bottom: 0.5rem;
            text-shadow: 0 0 10px currentColor;
        }

        .archetype-tagline {
            font-size: 1.1rem;
            font-style: italic;
            opacity: 0.9;
            margin-bottom: 1rem;
        }

        .blend-text {
            font-size: 0.9rem;
            color: var(--lavender);
            margin-bottom: 2rem;
            background: rgba(0,0,0,0.3);
            padding: 0.5rem 1rem;
            border-radius: 20px;
        }

        .chart-container {
            width: 100%;
            max-width: 400px;
            margin: 0 auto 2rem;
            animation: slideUp 0.8s ease 0.2s backwards;
        }

        .stats-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 0.8rem;
            justify-content: center;
            margin-bottom: 2rem;
            animation: slideUp 0.8s ease 0.4s backwards;
        }

        .stat-pill {
            background: rgba(255,255,255,0.1);
            border: 1px solid var(--glass-border);
            padding: 0.5rem 1rem;
            border-radius: 20px;
            font-size: 0.9rem;
            color: var(--orange);
            font-weight: 500;
        }

        .description {
            font-size: 1.1rem;
            line-height: 1.6;
            margin-bottom: 2rem;
            text-align: justify;
            animation: slideUp 0.8s ease 0.6s backwards;
        }

        .action-btns {
            display: flex;
            gap: 1rem;
            justify-content: center;
            flex-wrap: wrap;
            animation: slideUp 0.8s ease 0.8s backwards;
        }

        .action-btn {
            padding: 0.8rem 1.5rem;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
            border: none;
            transition: all 0.3s ease;
            font-size: 1rem;
        }

        .btn-primary {
            background: var(--pink);
            color: var(--bg-dark);
            box-shadow: 0 0 15px rgba(255, 112, 166, 0.4);
        }

        .btn-primary:hover {
            background: #ff85b5;
            box-shadow: 0 0 25px rgba(255, 112, 166, 0.6);
            transform: translateY(-2px);
        }

        .btn-secondary {
            background: transparent;
            color: var(--text-light);
            border: 1px solid var(--lavender);
        }

        .btn-secondary:hover {
            background: rgba(200, 182, 255, 0.1);
            transform: translateY(-2px);
        }

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

        /* Off-screen Share Card */
        #share-card {
            position: fixed;
            left: -9999px;
            top: 0;
            width: 600px;
            background: var(--bg-dark);
            color: var(--text-light);
            padding: 40px;
            border-radius: 24px;
            border: 2px solid var(--pink);
            box-shadow: 0 0 40px rgba(255,112,166,0.3);
            text-align: center;
            z-index: -10;
        }
        
        .share-header h1 {
            font-family: 'Press Start 2P', cursive;
            font-size: 1.2rem;
            color: var(--pink);
            margin-bottom: 20px;
        }

        .share-archetype {
            margin: 30px 0;
        }
        
        .share-archetype .emoji { font-size: 6rem; margin-bottom: 10px; }
        .share-archetype .name { font-family: 'Press Start 2P', cursive; font-size: 1.8rem; margin-bottom: 10px; }
        .share-archetype .tagline { font-size: 1.2rem; font-style: italic; opacity: 0.9; }

        .share-stats {
            display: flex;
            flex-direction: column;
            gap: 15px;
            margin: 30px 0;
            text-align: left;
        }

        .share-bar-row {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .share-bar-label {
            width: 150px;
            font-weight: 600;
            font-size: 1rem;
        }

        .share-bar-bg {
            flex-grow: 1;
            height: 12px;
            background: rgba(255,255,255,0.1);
            border-radius: 6px;
            overflow: hidden;
        }

        .share-bar-fill {
            height: 100%;
            background: var(--cyan);
        }

        .share-footer {
            margin-top: 30px;
            font-size: 1rem;
            color: var(--lavender);
            border-top: 1px solid rgba(255,255,255,0.1);
            padding-top: 20px;
        }

        @media (max-width: 600px) {
            h1.glowing-title { font-size: 1rem; line-height: 1.5; }
            .glass-card { padding: 1.5rem; }
            .archetype-name { font-size: 1rem; }
            .action-btns { flex-direction: column; }
            .action-btn { width: 100%; }
        }