:root {
    --bg: #111214;
    --card: rgba(22, 23, 27, .88);
    --text: #f7f7f8;
    --muted: #b8bac1;
    --line: rgba(255,255,255,.09);
    --accent: #ff6b35;
    --accent-2: #ff9f1c;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    min-height: 100svh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 10% 10%, rgba(255,107,53,.13), transparent 35%),
        radial-gradient(circle at 90% 90%, rgba(255,159,28,.09), transparent 30%),
        var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

.roulette-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: transparent;
    transition: background-color .12s linear;
    pointer-events: none;
}

.roulette-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,.12), rgba(0,0,0,.30));
    opacity: 0;
    transition: opacity .25s ease;
}

body.is-spinning .roulette-bg::after { opacity: 1; }

.app-shell {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
}

.card {
    width: min(100%, 480px);
    padding: 30px 22px 24px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--card);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 30px 80px rgba(0,0,0,.36);
    text-align: center;
    transition: background-color .35s ease, color .35s ease, transform .35s ease;
}

.brand-mark {
    width: 66px;
    height: 66px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    font-size: 34px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 22px;
    box-shadow: inset 0 1px rgba(255,255,255,.08);
}

.eyebrow {
    margin: 0 0 7px;
    color: var(--accent-2);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .13em;
}

h1 {
    margin: 0;
    font-size: clamp(30px, 8vw, 42px);
    letter-spacing: -.045em;
    line-height: 1;
}

.lead, .welcome {
    margin: 18px auto 24px;
    max-width: 340px;
    color: var(--muted);
    line-height: 1.55;
}

.login-form { text-align: left; }
.login-form label {
    display: block;
    margin: 0 0 8px 4px;
    color: #e8e8eb;
    font-size: 13px;
    font-weight: 700;
}

.phone-wrap {
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 58px;
    border-radius: 17px;
    border: 1px solid rgba(255,255,255,.11);
    background: rgba(255,255,255,.06);
}
.phone-wrap:focus-within {
    border-color: rgba(255,159,28,.75);
    box-shadow: 0 0 0 4px rgba(255,159,28,.11);
}
.phone-wrap span {
    padding: 0 14px 0 16px;
    color: #c8c9ce;
    border-right: 1px solid rgba(255,255,255,.09);
    font-weight: 700;
}
.phone-wrap input {
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: white;
    padding: 0 16px;
    font-size: 18px;
    letter-spacing: .05em;
}
.phone-wrap input::placeholder { color: #777a82; }

.primary-btn {
    width: 100%;
    min-height: 58px;
    margin-top: 16px;
    border: 0;
    border-radius: 17px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #151515;
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 14px 35px rgba(255,107,53,.22);
    transition: transform .18s ease, filter .18s ease, opacity .18s ease;
}
.primary-btn:active { transform: scale(.985); }
.primary-btn:disabled { cursor: wait; opacity: .68; }
.draw-btn { display: flex; align-items: center; justify-content: center; gap: 10px; }
.button-icon { font-size: 20px; }

.small-note {
    margin: 15px auto 0;
    color: #8e9098;
    font-size: 12px;
    line-height: 1.45;
}

.alert {
    margin-top: 12px;
    padding: 11px 13px;
    border: 1px solid rgba(255,99,99,.24);
    border-radius: 13px;
    background: rgba(255,80,80,.09);
    color: #ffc2c2;
    font-size: 13px;
    line-height: 1.4;
}

.ghost-link {
    display: inline-block;
    margin-top: 19px;
    color: #aeb0b6;
    font-size: 13px;
    text-decoration: none;
}
.ghost-link:hover { color: white; }

.result {
    --result-color: #8e24aa;
    margin-top: 24px;
    padding: 24px 18px;
    border-radius: 22px;
    background: color-mix(in srgb, var(--result-color) 28%, #111 72%);
    border: 1px solid color-mix(in srgb, var(--result-color) 48%, white 8%);
}
.result-kicker {
    margin: 0 0 10px;
    color: rgba(255,255,255,.82);
    font-weight: 700;
}
.result-name {
    margin-bottom: 22px;
    font-size: clamp(34px, 10vw, 54px);
    font-weight: 950;
    letter-spacing: -.045em;
    line-height: .98;
}
.result-name span { white-space: nowrap; }
.result p:not(.result-kicker) { line-height: 1.55; }
.secret {
    margin: 19px 0 0;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.12);
}

body.is-spinning .card {
    background: rgba(15,15,16,.72);
    transform: scale(.985);
}

body.is-spinning .brand-mark,
body.is-spinning .eyebrow,
body.is-spinning h1,
body.is-spinning .welcome,
body.is-spinning .small-note,
body.is-spinning .ghost-link {
    opacity: .20;
}

.roulette-status {
    position: fixed;
    z-index: 10;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(86vw, 430px);
    text-align: center;
    color: white;
    text-shadow: 0 3px 22px rgba(0,0,0,.45);
    pointer-events: none;
}
.roulette-status .swatch-name {
    display: block;
    font-size: clamp(34px, 12vw, 68px);
    font-weight: 950;
    letter-spacing: -.05em;
    line-height: .95;
}
.roulette-status .swatch-emoji {
    display: block;
    margin-top: 10px;
    font-size: 42px;
}

.reveal-card {
    animation: popReveal .52s cubic-bezier(.22,1,.36,1) both;
}
@keyframes popReveal {
    0% { opacity: 0; transform: scale(.82) translateY(12px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@media (min-width: 700px) {
    .card { padding: 38px 38px 30px; }
    .primary-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
