:root {
    --bg: #07110f;
    --surface: #101d1a;
    --surface-2: #162823;
    --text: #f3fff8;
    --muted: #9db8ae;
    --line: rgba(255,255,255,.11);
    --accent: #58f59b;
    --accent-dark: #1fc96b;
    --danger: #ff7c7c;
    --shadow: 0 24px 70px rgba(0,0,0,.3);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 0%, rgba(88,245,155,.13), transparent 34%),
        radial-gradient(circle at 90% 25%, rgba(52,173,255,.09), transparent 30%),
        var(--bg);
}

button, input { font: inherit; }
a { color: inherit; }
.page-shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 64px; }
.topbar { display: flex; align-items: center; min-height: 82px; }
.brand { text-decoration: none; font-weight: 900; letter-spacing: -.03em; font-size: 20px; }

.hero-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px; align-items: center; padding: 46px 0 30px; }
.hero-copy h1, .card h1 { margin: 10px 0 14px; font-size: clamp(38px, 6vw, 72px); line-height: .98; letter-spacing: -.055em; }
.hero-copy p, .card p { color: var(--muted); font-size: 17px; line-height: 1.7; }
.eyebrow { display: inline-block; color: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: .16em; }
.video-card, .card { border: 1px solid var(--line); background: linear-gradient(145deg, rgba(22,40,35,.95), rgba(11,23,19,.96)); border-radius: 26px; box-shadow: var(--shadow); }
.video-card { padding: 12px; }
.video-frame { position: relative; overflow: hidden; border-radius: 18px; padding-top: 56.25%; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.score-strip { display: flex; gap: 12px; margin-top: 30px; }
.score-strip div { min-width: 112px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.035); }
.score-strip strong, .score-strip span { display: block; }
.score-strip strong { font-size: 24px; }
.score-strip span { color: var(--muted); font-size: 12px; margin-top: 3px; }

.card { padding: clamp(22px, 4vw, 44px); }
.registration-card { margin-top: 24px; }
.section-heading { display: flex; gap: 16px; align-items: center; margin-bottom: 26px; }
.section-heading h2 { margin: 4px 0 0; font-size: 30px; letter-spacing: -.03em; }
.step-number { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #032311; font-weight: 900; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.full-field { grid-column: 1 / -1; }
.field { display: grid; gap: 8px; font-weight: 700; }
.field > span { font-size: 14px; }
.field input[type="text"], .field input[type="tel"] {
    width: 100%; border: 1px solid var(--line); background: #0a1713; color: var(--text); border-radius: 14px; padding: 15px 16px; outline: none;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(88,245,155,.1); }
.check-card { grid-template-columns: auto 1fr; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(88,245,155,.045); cursor: pointer; }
.check-card input, .consent-line input { accent-color: var(--accent-dark); width: 20px; height: 20px; }
.check-card small { display: block; color: var(--muted); margin-top: 4px; font-weight: 500; }
.consent-line { grid-template-columns: auto 1fr; align-items: start; color: var(--muted); font-weight: 500; line-height: 1.5; }

.button {
    display: inline-flex; justify-content: center; align-items: center; min-height: 52px; border: 0; border-radius: 14px; padding: 0 22px;
    background: var(--accent); color: #042512; font-weight: 900; text-decoration: none; cursor: pointer; transition: transform .2s, filter .2s;
}
.button:hover { transform: translateY(-2px); filter: brightness(1.04); }
.button:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.button.secondary { background: rgba(255,255,255,.08); color: var(--text); border: 1px solid var(--line); }
.button.full { width: 100%; }
.alert { padding: 14px 16px; border-radius: 12px; margin-bottom: 18px; line-height: 1.5; }
.alert.danger { background: rgba(255,124,124,.1); border: 1px solid rgba(255,124,124,.35); color: #ffd4d4; }
.alert.success { background: rgba(88,245,155,.1); border: 1px solid rgba(88,245,155,.35); color: #d9ffe8; }
.narrow-card { width: min(620px, 100%); margin: 40px auto; }
.narrow-card h1 { font-size: clamp(34px, 6vw, 54px); }
code { background: #07110f; padding: 3px 7px; border-radius: 6px; }

.quiz-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.quiz-header h1 { font-size: clamp(34px, 5vw, 56px); }
.score-badge { width: 112px; height: 112px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; text-align: center; background: var(--accent); color: #042512; font-weight: 900; font-size: 20px; }
.progress-wrap { margin: 0 0 20px; }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.progress-track { height: 8px; background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; width: 20%; background: var(--accent); border-radius: inherit; transition: width .3s ease; }
.question-card { display: none; }
.question-card.active { display: block; animation: fadeIn .24s ease; }
.question-card h2 { font-size: clamp(25px, 4vw, 40px); line-height: 1.2; letter-spacing: -.035em; margin: 12px 0 28px; }
.question-count { color: var(--muted); font-size: 13px; font-weight: 800; }
.options-list { display: grid; gap: 12px; }
.option-item { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; cursor: pointer; background: rgba(255,255,255,.025); transition: border-color .2s, transform .2s, background .2s; }
.option-item:hover { transform: translateY(-1px); border-color: rgba(88,245,155,.5); }
.option-item:has(input:checked) { border-color: var(--accent); background: rgba(88,245,155,.09); }
.option-item input { position: absolute; opacity: 0; pointer-events: none; }
.option-letter { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.08); font-weight: 900; }
.option-item:has(input:checked) .option-letter { background: var(--accent); color: #042512; }
.option-text { font-weight: 700; }
.question-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.question-actions .button { min-width: 150px; }
.shake { animation: shake .4s ease; }

.result-card { width: min(680px, 100%); margin: 46px auto; text-align: center; }
.result-card h1 { font-size: clamp(34px, 7vw, 58px); }
.result-score { display: flex; justify-content: center; align-items: flex-end; margin: 22px 0 8px; }
.result-score strong { font-size: clamp(84px, 18vw, 150px); line-height: .8; letter-spacing: -.08em; }
.result-score span { color: var(--muted); font-size: 28px; margin-left: 10px; }
.perfect-result { border-color: rgba(88,245,155,.45); }
.text-link { display: inline-block; margin-top: 20px; color: var(--muted); }

.spin-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 42px; align-items: center; margin-top: 34px; }
.spin-copy h1 { font-size: clamp(38px, 6vw, 68px); }
.spin-message { margin-top: 24px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); color: var(--muted); opacity: .7; }
.spin-message.show { color: var(--text); opacity: 1; border-color: rgba(88,245,155,.5); background: rgba(88,245,155,.08); font-size: 20px; font-weight: 900; }
.wheel-zone { display: grid; justify-items: center; position: relative; }
.wheel-pointer { position: absolute; top: -8px; z-index: 3; width: 0; height: 0; border-left: 20px solid transparent; border-right: 20px solid transparent; border-top: 38px solid var(--accent); filter: drop-shadow(0 5px 8px rgba(0,0,0,.3)); }
.wheel { width: min(440px, 76vw); aspect-ratio: 1; border-radius: 50%; position: relative; display: grid; place-items: center; border: 12px solid #eefdf4; box-shadow: 0 24px 60px rgba(0,0,0,.35), inset 0 0 0 8px rgba(0,0,0,.12); background: conic-gradient(#1fc96b 0 25%, #163f30 25% 50%, #1fc96b 50% 75%, #163f30 75% 100%); }
.wheel::after { content: ''; position: absolute; inset: 8%; border-radius: 50%; border: 2px dashed rgba(255,255,255,.26); }
.wheel-center { position: relative; z-index: 2; width: 28%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: #effff5; color: #042512; font-weight: 1000; border: 7px solid #0e241b; box-shadow: 0 8px 20px rgba(0,0,0,.28); }
.wheel-label { position: absolute; z-index: 1; font-size: clamp(12px, 2vw, 17px); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.label-1 { top: 15%; left: 50%; transform: translateX(-50%); }
.label-2 { right: 7%; top: 50%; transform: translateY(-50%) rotate(90deg); }
.label-3 { bottom: 15%; left: 50%; transform: translateX(-50%) rotate(180deg); }
.label-4 { left: 7%; top: 50%; transform: translateY(-50%) rotate(-90deg); }
.wheel.spinning { animation: spinWheel 3.6s cubic-bezier(.12,.72,.12,1) forwards; }
.spin-button { margin-top: 24px; min-width: 220px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
@keyframes spinWheel { from { transform: rotate(0); } to { transform: rotate(1800deg); } }

@media (max-width: 820px) {
    .hero-grid, .spin-layout { grid-template-columns: 1fr; }
    .hero-copy { text-align: center; }
    .score-strip { justify-content: center; flex-wrap: wrap; }
    .quiz-header { align-items: flex-start; }
    .score-badge { width: 88px; height: 88px; font-size: 16px; }
}

@media (max-width: 600px) {
    .page-shell { width: min(100% - 20px, 1120px); }
    .topbar { min-height: 64px; }
    .hero-grid { padding-top: 24px; }
    .hero-copy h1, .card h1 { font-size: 40px; }
    .form-grid { grid-template-columns: 1fr; }
    .full-field { grid-column: auto; }
    .score-strip div { min-width: 92px; padding: 12px; }
    .card { border-radius: 20px; }
    .quiz-header { display: block; }
    .score-badge { margin-top: 18px; border-radius: 16px; width: 100%; height: auto; padding: 12px; }
    .question-actions { flex-direction: column-reverse; }
    .question-actions .button { width: 100%; }
}

/* Email OTP additions */
.field input[type="email"],
.field input[type="text"].otp-input {
    width: 100%;
    border: 1px solid var(--line);
    background: #0a1713;
    color: var(--text);
    border-radius: 14px;
    padding: 15px 16px;
    outline: none;
}
.field-help, .small-note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
    font-weight: 500;
}
.continue-card {
    margin: 0 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
}
.continue-card h2 { margin: 5px 0 4px; font-size: 30px; }
.continue-card p { margin: 0; }
.otp-card { text-align: center; }
.otp-form { display: grid; gap: 18px; margin-top: 24px; text-align: left; }
.otp-input {
    text-align: center;
    font-size: clamp(28px, 7vw, 42px);
    font-weight: 900;
    letter-spacing: .28em;
    padding-left: calc(16px + .28em) !important;
}
.resend-form { margin-top: 18px; }
.text-button {
    border: 0;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
    font-weight: 800;
}
.stack-form { display: grid; gap: 14px; }
.soft-rule { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
@media (max-width: 640px) {
    .continue-card { align-items: stretch; flex-direction: column; }
    .continue-card .button { width: 100%; }
}

/* Interactive wave background */
body {
    position: relative;
    isolation: isolate;
    background: #020807;
}

.site-wave-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 5%, rgba(88,245,155,.08), transparent 32%),
        radial-gradient(circle at 82% 24%, rgba(62,152,255,.055), transparent 28%),
        #020807;
}

.site-wave-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2,8,7,.05), rgba(2,8,7,.34));
}

#site-wave-svg {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    opacity: .24;
}

.site-wave-line {
    stroke: rgba(255,255,255,.72);
    stroke-width: .75;
    shape-rendering: geometricPrecision;
}

.site-wave-pointer {
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 0 24px rgba(255,255,255,.5);
    opacity: 0;
    will-change: transform;
    transition: opacity .2s ease;
}

.site-wave-pointer.is-visible { opacity: .7; }
.page-shell { position: relative; z-index: 1; }

.video-card,
.card {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

@media (max-width: 720px) {
    #site-wave-svg { opacity: .18; }
    .site-wave-pointer { display: none; }
    .site-wave-line { stroke-width: .65; }
}

@media (prefers-reduced-motion: reduce) {
    #site-wave-svg { opacity: .13; }
    .site-wave-pointer { display: none; }
}


/* Touch-to-play background music */
#site-background-music {
    display: none;
}

.music-toggle {
    position: fixed;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 10020;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(7,18,15,.82);
    color: #fff;
    box-shadow: 0 12px 34px rgba(0,0,0,.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    cursor: pointer;
    transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.music-toggle:hover {
    transform: translateY(-2px);
    border-color: rgba(88,245,155,.65);
    background: rgba(10,35,27,.94);
}

.music-toggle:focus-visible {
    outline: 3px solid rgba(88,245,155,.35);
    outline-offset: 3px;
}

.music-toggle-icon {
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}

.music-toggle-wave {
    display: none;
    align-items: center;
    gap: 2px;
    height: 18px;
}

.music-toggle-wave i {
    display: block;
    width: 2px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    animation: music-bar .8s ease-in-out infinite alternate;
}

.music-toggle-wave i:nth-child(2) {
    height: 12px;
    animation-delay: .18s;
}

.music-toggle-wave i:nth-child(3) {
    height: 9px;
    animation-delay: .36s;
}

.music-toggle.is-playing .music-toggle-icon {
    display: none;
}

.music-toggle.is-playing .music-toggle-wave {
    display: inline-flex;
}

.music-toggle.is-unavailable {
    display: none;
}

@keyframes music-bar {
    from { transform: scaleY(.55); opacity: .55; }
    to { transform: scaleY(1.25); opacity: 1; }
}

@media (max-width: 640px) {
    .music-toggle {
        width: 44px;
        height: 44px;
        right: max(14px, env(safe-area-inset-right));
        bottom: max(14px, env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    .music-toggle,
    .music-toggle-wave i {
        animation: none !important;
        transition: none !important;
    }
}
