:root {
    --ob-bg1: #0b1220;
    --ob-bg2: #0e1730;
    --ob-accent: #00b7fe;
    --ob-accent-2: #00ffc8;
    --ob-text: #edf3ff;
    --ob-muted: rgba(237, 243, 255, .62);
    --ob-card: rgba(255, 255, 255, .05);
    --ob-card-border: rgba(255, 255, 255, .12);
}

* { box-sizing: border-box; }

.d-none { display: none !important; }

html, body {
    margin: 0;
    min-height: 100%;
}

body.ob-body {
    min-height: 100vh;
    font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
    color: var(--ob-text);
    background:
        radial-gradient(1200px 800px at 10% -10%, rgba(0, 183, 254, .16) 0%, transparent 55%),
        radial-gradient(1000px 1200px at 100% 10%, rgba(0, 255, 200, .10) 0%, transparent 50%),
        linear-gradient(180deg, var(--ob-bg1), var(--ob-bg2));
    display: flex;
    align-items: stretch;
    justify-content: center;
}

/* Desktop: centered card over a fitness hero */
@media (min-width: 768px) {
    body.ob-body {
        align-items: center;
        background-image:
            linear-gradient(rgba(7, 12, 24, .72), rgba(7, 12, 24, .82)),
            url('/img/barbell-color.jpg');
        background-size: cover;
        background-position: center;
    }
}

.ob-shell {
    position: relative;
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    padding: 18px 20px 28px;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .ob-shell {
        min-height: auto;
        border-radius: 22px;
        background: linear-gradient(180deg, rgba(13, 19, 36, .92), rgba(9, 13, 26, .9));
        border: 1px solid var(--ob-card-border);
        box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        padding: 22px 26px 30px;
    }
}

/* ---- Top bar: back + progress dots ---- */
.ob-topbar {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 34px;
    margin-bottom: 14px;
}

.ob-back {
    border: none;
    background: rgba(255, 255, 255, .08);
    color: var(--ob-text);
    width: 34px;
    height: 34px;
    border-radius: 999px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, opacity .15s ease;
}

.ob-back:hover { background: rgba(255, 255, 255, .16); }
.ob-back[hidden] { visibility: hidden; }

.ob-dots {
    display: flex;
    gap: 7px;
    flex: 1;
}

.ob-dot {
    height: 5px;
    flex: 1;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    transition: background .25s ease;
}

.ob-dot.is-done { background: rgba(0, 255, 200, .55); }
.ob-dot.is-active { background: linear-gradient(90deg, var(--ob-accent), var(--ob-accent-2)); }

/* ---- Steps ---- */
.ob-steps { flex: 1; position: relative; }

.ob-step { display: none; animation: obIn .22s ease-out; }
.ob-step.is-active { display: flex; flex-direction: column; }

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

@media (prefers-reduced-motion: reduce) {
    .ob-step { animation: none; }
}

.ob-h1 {
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 8px 0 6px;
}

.ob-sub {
    color: var(--ob-muted);
    font-size: 1rem;
    margin: 0 0 22px;
}

/* ---- Welcome ---- */
.ob-welcome { text-align: center; padding-top: 26px; }

.ob-logo {
    width: 76px;
    height: 76px;
    margin: 0 auto 22px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    font-size: 34px;
    background: rgba(0, 183, 254, .12);
    border: 1px solid rgba(0, 183, 254, .35);
    box-shadow: 0 0 38px rgba(0, 183, 254, .28);
}

.ob-welcome .ob-h1 { font-size: 2rem; }

/* ---- Selectable cards ---- */
.ob-cards { display: grid; gap: 12px; }
.ob-cards.cols-2 { grid-template-columns: 1fr 1fr; }

.ob-card {
    appearance: none;
    text-align: left;
    width: 100%;
    border: 1px solid var(--ob-card-border);
    background: var(--ob-card);
    color: var(--ob-text);
    border-radius: 16px;
    padding: 18px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform .12s ease, border-color .15s ease, box-shadow .2s ease, background .15s ease;
}

.ob-cards.cols-2 .ob-card { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 104px; }

.ob-card:hover { border-color: rgba(0, 183, 254, .45); background: rgba(255, 255, 255, .07); }

.ob-card:focus-visible {
    outline: none;
    border-color: var(--ob-accent);
    box-shadow: 0 0 0 3px rgba(0, 183, 254, .28);
}

.ob-card.is-selected {
    border-color: var(--ob-accent-2);
    background: rgba(0, 255, 200, .08);
    box-shadow: 0 0 0 1px rgba(0, 255, 200, .4), 0 0 28px rgba(0, 255, 200, .22);
    animation: obPulse .4s ease-out;
}

@keyframes obPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

.ob-card-emoji { font-size: 26px; line-height: 1; }
.ob-card-title { font-weight: 700; font-size: 1.02rem; }
.ob-card-meta { color: var(--ob-muted); font-size: .85rem; }

/* ---- Inputs / toggles ---- */
.ob-field { margin-bottom: 18px; }
.ob-label { display: block; font-weight: 600; margin-bottom: 8px; }

.ob-toggle {
    display: inline-flex;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--ob-card-border);
    border-radius: 999px;
    padding: 3px;
    margin-bottom: 10px;
}

.ob-toggle button {
    border: none;
    background: transparent;
    color: var(--ob-muted);
    padding: 7px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: .9rem;
    transition: all .15s ease;
}

.ob-toggle button.is-on {
    background: linear-gradient(135deg, var(--ob-accent), var(--ob-accent-2));
    color: #06121f;
}

.ob-input, .ob-stat-input {
    width: 100%;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--ob-card-border);
    color: #fff;
    border-radius: 14px;
    padding: .85rem 1rem;
    font-size: 1rem;
}

.ob-stat-input {
    font-size: 1.6rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: .5px;
}

.ob-input:focus, .ob-stat-input:focus {
    outline: none;
    border-color: var(--ob-accent);
    box-shadow: 0 0 0 3px rgba(0, 183, 254, .2);
}

/* Dark dropdowns — native selects render white-on-white otherwise */
select.ob-input {
    font-weight: 700;
    font-size: 1.02rem;
    color: #fff;
    background-color: rgba(255, 255, 255, .06);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2300ffc8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 42px;
}

select.ob-input option {
    background-color: #0e1730;
    color: #fff;
    font-weight: 600;
}

.ob-dual { display: flex; gap: 10px; }
.ob-dual .ob-stat-input { flex: 1; }

/* ---- Ruler slider (height/weight) ---- */
.ob-ruler { text-align: center; }

.ob-ruler__value {
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: .5px;
    margin-bottom: 14px;
}

.ob-ruler__track {
    position: relative;
    height: 46px;
    margin-bottom: 6px;
}

/* Decorative ruler ticks — purely visual, sits behind the range thumb. */
.ob-ruler__ticks {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 4px;
    height: 22px;
    background-image: repeating-linear-gradient(
        90deg,
        var(--ob-card-border) 0,
        var(--ob-card-border) 2px,
        transparent 2px,
        transparent calc(100% / 22)
    );
    background-size: calc(100% / 22 * 5) 100%, calc(100% / 22) 60%;
    background-position: bottom left, bottom left;
    background-repeat: repeat-x;
    opacity: .8;
    pointer-events: none;
}

.ob-ruler__slider {
    position: relative;
    width: 100%;
    height: 46px;
    margin: 0;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

/* Track */
.ob-ruler__slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ob-accent), var(--ob-accent-2));
}

.ob-ruler__slider::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ob-accent), var(--ob-accent-2));
}

/* Thumb */
.ob-ruler__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    margin-top: -11px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid var(--ob-accent);
    box-shadow: 0 4px 14px rgba(0, 183, 254, .45);
    cursor: grab;
}

.ob-ruler__slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid var(--ob-accent);
    box-shadow: 0 4px 14px rgba(0, 183, 254, .45);
    cursor: grab;
}

.ob-ruler__slider:active::-webkit-slider-thumb { cursor: grabbing; }
.ob-ruler__slider:focus { outline: none; }
.ob-ruler__slider:focus::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(0, 255, 200, .3); }

/* ---- Password strength ---- */
.ob-strength { display: flex; gap: 6px; margin: 8px 0 4px; }
.ob-strength span {
    height: 5px;
    flex: 1;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    transition: background .2s ease;
}
.ob-strength.s1 span:nth-child(-n+1),
.ob-strength.s2 span:nth-child(-n+2),
.ob-strength.s3 span:nth-child(-n+3),
.ob-strength.s4 span:nth-child(-n+4) { background: var(--ob-accent-2); }
.ob-strength-label { font-size: .82rem; color: var(--ob-muted); }

.ob-check { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 4px; font-size: .9rem; color: var(--ob-muted); }
.ob-check a { color: var(--ob-accent); }
.ob-check input { margin-top: 3px; }

/* ---- Buttons ---- */
.ob-actions { margin-top: auto; padding-top: 18px; }

.ob-btn {
    width: 100%;
    border: none;
    border-radius: 14px;
    padding: 1rem;
    font-size: 1.02rem;
    font-weight: 800;
    cursor: pointer;
    transition: filter .15s ease, transform .1s ease, opacity .15s ease;
}

.ob-btn-primary {
    background: linear-gradient(135deg, var(--ob-accent), var(--ob-accent-2));
    color: #06121f;
    box-shadow: 0 12px 28px rgba(0, 183, 254, .26);
}

.ob-btn-primary:hover { filter: brightness(1.05); }
.ob-btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.ob-btn-google {
    background: #fff;
    color: #1f2937;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .2);
    text-decoration: none;
}

.ob-btn-ghost {
    background: transparent;
    color: var(--ob-muted);
    margin-top: 10px;
}

.ob-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--ob-muted);
    font-size: .82rem;
    margin: 16px 0;
}

.ob-divider::before, .ob-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: rgba(255, 255, 255, .12);
}

.ob-link { color: var(--ob-accent); text-decoration: none; font-weight: 600; }
.ob-link:hover { text-decoration: underline; }
.ob-signin { text-align: center; margin-top: 18px; color: var(--ob-muted); font-size: .92rem; }

.ob-error {
    display: none;
    margin-top: 8px;
    color: #ff9b9b;
    font-size: .9rem;
}
.ob-error.show { display: block; }

.ob-form-error {
    display: none;
    margin-bottom: 14px;
    padding: .75rem .9rem;
    border-radius: 12px;
    background: rgba(239, 68, 68, .12);
    border: 1px solid rgba(239, 68, 68, .28);
    color: #ffd5d5;
    font-size: .9rem;
}
.ob-form-error.show { display: block; }

/* ---- Resume banner ---- */
.ob-resume {
    display: none;
    margin-bottom: 14px;
    padding: .8rem 1rem;
    border-radius: 14px;
    background: rgba(0, 183, 254, .1);
    border: 1px solid rgba(0, 183, 254, .26);
    font-size: .9rem;
}
.ob-resume.show { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ob-resume button { background: none; border: none; color: var(--ob-accent); font-weight: 700; cursor: pointer; }

/* ===== Welcome (Screens 7-9) ===== */
.ob-welcome-shell { padding-top: 26px; padding-bottom: 36px; }
.ob-welcome-shell .ob-h1 { font-size: 1.6rem; }

.ob-h2 { font-size: 1.15rem; font-weight: 800; margin: 6px 0 12px; }

.ob-plan-badge {
    display: inline-block;
    font-size: .82rem;
    font-weight: 700;
    color: var(--ob-accent-2);
    background: rgba(0, 255, 200, .1);
    border: 1px solid rgba(0, 255, 200, .26);
    border-radius: 999px;
    padding: 5px 12px;
    margin-bottom: 4px;
}

.ob-plan-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ob-plan-tile {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px;
    border-radius: 16px;
    background: var(--ob-card);
    border: 1px solid var(--ob-card-border);
}

.ob-plan-ico { font-size: 20px; }
.ob-plan-val { font-size: 1.25rem; font-weight: 800; line-height: 1.1; }
.ob-plan-key { font-size: .8rem; color: var(--ob-muted); }

.ob-plan-note {
    margin: 14px 0 0;
    font-size: .85rem;
    color: var(--ob-muted);
    line-height: 1.45;
}
.ob-plan-note i { color: var(--ob-accent-2); margin-right: 4px; }

/* Activation / XP */
.ob-activation { margin-top: 26px; }
.ob-level-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }

.ob-level-pill {
    font-weight: 800;
    font-size: .92rem;
    background: linear-gradient(135deg, var(--ob-accent), var(--ob-accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.ob-xp-text { font-size: .85rem; color: var(--ob-muted); font-weight: 700; }

.ob-xp-bar {
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    overflow: hidden;
    margin-bottom: 16px;
}
.ob-xp-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ob-accent), var(--ob-accent-2));
    transition: width .8s ease;
}

.ob-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ob-check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--ob-card);
    border: 1px solid var(--ob-card-border);
}
.ob-check-mark { color: rgba(255, 255, 255, .3); font-size: 18px; }
.ob-check-item.is-done .ob-check-mark { color: var(--ob-accent-2); }
.ob-check-item.is-done .ob-check-label { color: var(--ob-muted); text-decoration: line-through; }
.ob-check-label { flex: 1; font-weight: 600; }
.ob-check-xp { font-size: .82rem; color: var(--ob-accent); font-weight: 800; }

/* First action */
.ob-first { margin-top: 28px; }
.ob-first-actions { display: grid; gap: 10px; }
.ob-first-btn { display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }

/* Locked previews */
.ob-locked { margin-top: 30px; }
.ob-locked-title { font-size: .9rem; color: var(--ob-muted); font-weight: 700; margin: 0 0 12px; text-transform: uppercase; letter-spacing: .5px; }
.ob-locked-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ob-locked-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .03);
    border: 1px dashed rgba(255, 255, 255, .16);
}
.ob-locked-ico { font-size: 18px; color: var(--ob-accent); opacity: .8; }
.ob-locked-name { font-weight: 700; font-size: .92rem; }
.ob-locked-name .fa-lock { font-size: .72rem; color: var(--ob-muted); margin-left: 3px; }
.ob-locked-teaser { font-size: .78rem; color: var(--ob-muted); line-height: 1.35; }
