/* ═══════════════════════════════════════════════
   OPUS46 – Dark Premium AI Companion Builder
   ═══════════════════════════════════════════════ */

:root {
    --accent: #a78bfa;
    --accent-strong: #7c3aed;
    --accent-glow: rgba(167, 139, 250, 0.35);
    --bg-deep: #0f0d1a;
    --bg-surface: #1a1726;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --text-bright: #f1eeff;
    --text-dim: #9b94b4;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(167, 139, 250, 0.25);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
    --dot: 12px;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-deep);
    color: var(--text-bright);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    line-height: 1.6;
}

/* ── Shell ─────────────────────────────────── */
.app-shell {
    width: 100%;
    max-width: 940px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 56px 44px 44px;
    min-height: 620px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow:
        0 0 80px rgba(124, 58, 237, 0.06),
        0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ── Nav Buttons ───────────────────────────── */
.nav-btn {
    position: absolute;
    top: 22px;
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
    z-index: 5;
}

.nav-btn:hover {
    color: var(--accent);
}

.nav-btn--left {
    left: 28px;
}

.nav-btn--right {
    right: 28px;
}

/* ── Progress Dots ─────────────────────────── */
.dots-track {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 380px;
    margin: 0 auto 12px;
    position: relative;
}

.dots-track::before {
    content: '';
    position: absolute;
    inset: 50% 0;
    height: 3px;
    transform: translateY(-50%);
    background: var(--border-subtle);
    border-radius: 2px;
    z-index: 1;
}

.dots-fill {
    position: absolute;
    top: 50%;
    left: 0;
    height: 3px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, var(--accent-strong), var(--accent));
    border-radius: 2px;
    z-index: 2;
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.dot {
    width: var(--dot);
    height: var(--dot);
    border-radius: 50%;
    background: var(--bg-surface);
    border: 2px solid var(--border-subtle);
    z-index: 3;
    position: relative;
    transition: all 0.3s;
}

.dot--done {
    background: var(--accent);
    border-color: var(--accent);
    cursor: pointer;
}

.dot--active {
    background: var(--bg-surface);
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow), 0 0 20px var(--accent-glow);
    transform: scale(1.45);
}

.dot--locked {
    cursor: default;
    pointer-events: none;
}

.dot--done:hover {
    transform: scale(1.3);
}

/* ── Header ────────────────────────────────── */
.step-header {
    text-align: center;
    margin-bottom: 32px;
    animation: rise 0.4s ease;
}

.step-counter {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.step-question {
    font-size: 1.65rem;
    font-weight: 700;
    margin-top: 14px;
    background: linear-gradient(135deg, var(--text-bright), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Options Grid ──────────────────────────── */
.choices {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    flex-grow: 1;
    animation: rise 0.5s ease;
}

.choice {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}

.choice:hover {
    transform: translateY(-5px);
    border-color: var(--border-glow);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.12);
}

.choice__img-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--bg-deep);
    overflow: hidden;
    position: relative;
}

.choice__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.35s ease;
}

.choice__img.visible {
    opacity: 1;
}

.choice:hover .choice__img.visible {
    transform: scale(1.06);
}

.choice__label {
    padding: 16px;
    text-align: center;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-bright);
}

/* ── Summary Layout ────────────────────────── */
.recap {
    display: flex;
    gap: 36px;
    align-items: flex-start;
    animation: rise 0.5s ease;
}

.recap__left {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.recap__right {
    flex: 1.3;
}

.recap__avatar {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.recap__heading {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 6px;
    background: linear-gradient(135deg, var(--accent), #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.recap__sub {
    color: var(--text-dim);
    margin-bottom: 18px;
    font-weight: 500;
}

.recap__story {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 22px 26px;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-dim);
}

.recap__story b {
    color: var(--accent);
    font-weight: 600;
}

/* ── Registration Panel ────────────────────── */
.reg-panel {
    margin-top: 22px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 26px;
}

.reg-panel__title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.reg-panel__sub {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 20px;
}

.field {
    margin-bottom: 14px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--text-dim);
}

.field input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-deep);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-bright);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field input::placeholder {
    color: var(--text-dim);
    opacity: 0.5;
}

.field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── CTA Button ────────────────────────────── */
.cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: 1.05rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
}

.cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(124, 58, 237, 0.5);
}

/* ── Mobile vs Desktop Toggling ────────────── */
.only-mobile {
    display: none;
}

.only-desktop {
    display: block;
}

.unified-reg {
    display: block;
}

.mobile-reveal-btn {
    display: none;
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 768px) {
    .choices {
        grid-template-columns: 1fr;
    }

    .app-shell {
        padding: 52px 20px 24px;
        min-height: auto;
    }

    .recap {
        flex-direction: column;
        gap: 20px;
    }

    .step-question {
        font-size: 1.35rem;
    }

    .only-mobile {
        display: block;
    }

    .only-desktop {
        display: none !important;
    }

    .mobile-reveal-btn {
        display: block;
        margin-top: 18px;
    }

    .unified-reg {
        display: none;
    }

    .unified-reg.opened {
        display: block;
        animation: slideUp 0.35s ease forwards;
    }
}

/* ── Keyframes ─────────────────────────────── */
@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}