:root {
    --bg: #06060c;
    --ink: #f4f5ff;
    --muted: #9aa0b8;
    --muted-2: #767c96;
    --line: rgba(255, 255, 255, .09);
    --card: rgba(17, 19, 33, .74);
    --accent: #7c6cff;
    --accent-2: #37d6c4;
    --gold: #ffd479;
    --danger: #ff7a90;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 26px 22px 36px;
    color: var(--ink);
    background: radial-gradient(120% 90% at 50% -12%, #1c1642 0%, #0a0a16 46%, #05050b 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ---------------- 背景 ---------------- */

#stars {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: .85;
}

.backdrop {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(96px);
    opacity: .5;
    animation: drift 20s ease-in-out infinite alternate;
}

.blob-a {
    width: 540px;
    height: 540px;
    top: -230px;
    left: -150px;
    background: radial-gradient(circle, rgba(124, 108, 255, .6), transparent 68%);
}

.blob-b {
    width: 480px;
    height: 480px;
    right: -190px;
    bottom: -210px;
    background: radial-gradient(circle, rgba(55, 214, 196, .4), transparent 70%);
    animation-delay: -7s;
}

.blob-c {
    width: 380px;
    height: 380px;
    top: 38%;
    right: 22%;
    background: radial-gradient(circle, rgba(255, 212, 121, .16), transparent 70%);
    animation-delay: -12s;
}

.grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 68px 68px;
    mask-image: radial-gradient(80% 60% at 50% 16%, #000 0%, transparent 82%);
    -webkit-mask-image: radial-gradient(80% 60% at 50% 16%, #000 0%, transparent 82%);
    opacity: .45;
}

@keyframes drift {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(30px, 40px, 0) scale(1.08); }
}

/* ---------------- 顶部 ---------------- */

.nav {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1080px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 15px;
    color: #0b0a17;
    background: linear-gradient(135deg, #b8a6ff, #6ee7db);
    box-shadow: 0 6px 22px rgba(124, 108, 255, .4);
}

.brand-text {
    font-weight: 700;
    letter-spacing: .28em;
    font-size: 14px;
}

.brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12px;
    color: var(--muted);
    background: rgba(255, 255, 255, .03);
    letter-spacing: .04em;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6ee7b7;
    box-shadow: 0 0 0 0 rgba(110, 231, 183, .7);
    animation: live 2.2s ease-out infinite;
}

@keyframes live {
    0% { box-shadow: 0 0 0 0 rgba(110, 231, 183, .55); }
    70% { box-shadow: 0 0 0 7px rgba(110, 231, 183, 0); }
    100% { box-shadow: 0 0 0 0 rgba(110, 231, 183, 0); }
}

/* ---------------- 布局 ---------------- */

.stage {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1080px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(370px, 430px);
    gap: 54px;
    align-items: center;
    margin: 18px 0 0;
}

.hero { max-width: 560px; animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(124, 108, 255, .3);
    background: rgba(124, 108, 255, .1);
    color: #b7b0f2;
    font-size: 11px;
    line-height: 1.5;
    letter-spacing: .2em;
    text-align: center;
}

.hero h1 {
    margin: 20px 0 0;
    font-size: clamp(36px, 4.7vw, 56px);
    line-height: 1.09;
    letter-spacing: -.035em;
    font-weight: 700;
}

.shine {
    background: linear-gradient(100deg, #a99bff 0%, #ffffff 16%, #8ef0e4 34%, #a99bff 52%, #ffffff 70%, #8ef0e4 88%, #a99bff 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shine 7s linear infinite;
}

@keyframes shine {
    to { background-position: -220% 0; }
}

.hero-sub {
    margin: 18px 0 0;
    font-size: 15px;
    line-height: 1.9;
    color: var(--muted);
    max-width: 500px;
}

.metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    margin-top: 30px;
}

.metric b {
    display: block;
    font-size: 31px;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
    background: linear-gradient(180deg, #ffffff, #c6c0ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.metric span {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted-2);
    letter-spacing: .04em;
}

.metric b.is-bump { animation: bump .5s ease; }

@keyframes bump {
    0% { transform: scale(1); }
    40% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.perks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.perks li {
    position: relative;
    padding: 8px 14px 8px 30px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .035);
    font-size: 12px;
    color: #b9bed6;
    line-height: 1.4;
}

.perks li::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    transform: translateY(-50%);
    background: radial-gradient(circle at 35% 30%, #9fe9e0, #5b4fe0 70%);
    box-shadow: 0 0 10px rgba(124, 108, 255, .65);
}

/* ---------------- 抽签卡片 ---------------- */

.card {
    position: relative;
    width: 100%;
    padding: 32px 30px 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--card);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .58), inset 0 1px 0 rgba(255, 255, 255, .07);
    animation: rise .8s .08s cubic-bezier(.2, .7, .2, 1) both;
}

.card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(160, 145, 255, .6), rgba(55, 214, 196, .16) 46%, rgba(255, 212, 121, .42));
    pointer-events: none;
    opacity: .85;
    display: none;
}

@supports ((-webkit-mask-composite: xor) or (mask-composite: exclude)) {
    .card::after {
        display: block;
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
        mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        mask-composite: exclude;
    }
}

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

.card-head h2 {
    margin: 0 0 8px;
    font-size: 21px;
    letter-spacing: -.01em;
}

.eyebrow {
    margin: 0 0 10px;
    font-size: 10.5px;
    letter-spacing: .3em;
    color: #8b8fb0;
}

.card-sub {
    margin: 0 0 20px;
    font-size: 12.5px;
    line-height: 1.75;
    color: var(--muted-2);
}

.notice {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid rgba(124, 108, 255, .28);
    border-radius: 12px;
    background: rgba(124, 108, 255, .09);
    color: #cfcaff;
    font-size: 12.5px;
    line-height: 1.7;
}

.stock { margin-bottom: 22px; }

.stock-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 12px;
    color: var(--muted-2);
    margin-bottom: 9px;
}

.stock-num { color: var(--muted); font-variant-numeric: tabular-nums; }
.stock-num b { color: var(--ink); font-size: 14px; }

.stock-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    overflow: hidden;
}

.stock-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 18px rgba(124, 108, 255, .65);
    transition: width .5s ease;
}

.field { display: block; }

.field-label {
    display: block;
    margin-bottom: 9px;
    font-size: 12px;
    letter-spacing: .08em;
    color: var(--muted);
}

input[type="email"] {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .04);
    color: var(--ink);
    font-size: 15px;
    letter-spacing: .01em;
    outline: none;
    transition: border-color .18s, box-shadow .18s, background .18s;
}

input[type="email"]::placeholder { color: #5f6480; }

input[type="email"]:focus {
    border-color: rgba(124, 108, 255, .7);
    background: rgba(124, 108, 255, .07);
    box-shadow: 0 0 0 4px rgba(124, 108, 255, .16);
}

.hint {
    margin: 10px 2px 18px;
    font-size: 12px;
    color: var(--muted-2);
    line-height: 1.7;
}

.btn {
    position: relative;
    width: 100%;
    height: 54px;
    border: 0;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    overflow: hidden;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .04em;
    color: #0a0a16;
    background: linear-gradient(115deg, #b4a6ff, #7c6cff 44%, #46d8c8);
    box-shadow: 0 14px 36px rgba(96, 82, 240, .4);
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 38%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
    transform: skewX(-20deg);
    animation: sheen 3.6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sheen {
    0% { left: -60%; }
    55% { left: 135%; }
    100% { left: 135%; }
}

.btn-arrow {
    font-size: 17px;
    line-height: 1;
    transition: transform .18s ease;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 18px 44px rgba(96, 82, 240, .5); }
.btn:hover .btn-arrow { transform: translateX(3px); }
.btn:active { transform: translateY(0); filter: brightness(.96); }
.btn:disabled { opacity: .6; cursor: default; transform: none; }

.fine {
    margin: 14px 0 0;
    text-align: center;
    font-size: 11px;
    color: #626782;
    line-height: 1.7;
}

.form-error {
    margin: -6px 2px 14px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 122, 144, .3);
    border-radius: 10px;
    background: rgba(255, 122, 144, .09);
    color: #ffb3c0;
    font-size: 13px;
    line-height: 1.6;
}

/* ---------------- 抽签动画 ---------------- */

.drawing {
    padding: 24px 0 6px;
    text-align: center;
}

.drawing p {
    margin: 18px 0 0;
    min-height: 20px;
    font-size: 13px;
    color: var(--muted);
    letter-spacing: .02em;
}

.ring {
    position: relative;
    width: 132px;
    height: 132px;
    margin: 0 auto;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(124, 108, 255, .95) 70deg, rgba(55, 214, 196, .9) 150deg, transparent 220deg);
    animation: spin 1.05s linear infinite;
    display: grid;
    place-items: center;
}

.ring::after {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    background: #0d0e1a;
    box-shadow: inset 0 0 34px rgba(124, 108, 255, .3);
}

.ring span {
    position: relative;
    z-index: 1;
    font-size: 13px;
    letter-spacing: .18em;
    color: #cfcaff;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------------- 结果 ---------------- */

.result { animation: rise .45s ease both; }

.result-card {
    padding: 26px 22px 22px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .03);
    text-align: center;
    animation: pop .5s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes pop {
    from { opacity: 0; transform: translateY(10px) scale(.97); }
    to { opacity: 1; transform: none; }
}

.result-card.win {
    border-color: rgba(255, 212, 121, .4);
    background:
        radial-gradient(120% 100% at 50% 0%, rgba(255, 212, 121, .18), transparent 62%),
        rgba(255, 212, 121, .04);
    box-shadow: 0 0 50px rgba(255, 212, 121, .12);
}

.result-card.lose,
.result-card.sold_out {
    border-color: rgba(154, 160, 184, .22);
    background: rgba(154, 160, 184, .05);
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.win .badge {
    color: #2a1e00;
    background: linear-gradient(120deg, #ffe1a1, #ffc75e);
    animation: badgeGlow 2.4s ease-in-out infinite;
}

@keyframes badgeGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 199, 94, .45); }
    50% { box-shadow: 0 0 0 8px rgba(255, 199, 94, 0); }
}

.lose .badge, .sold_out .badge { color: #aeb3c8; background: rgba(255, 255, 255, .07); }

.result-card h2 {
    margin: 16px 0 8px;
    font-size: 23px;
    letter-spacing: -.01em;
}

.result-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.8;
    color: var(--muted);
}

.result-card p b { color: var(--ink); word-break: break-all; }

.code-box {
    margin: 20px 0 10px;
    padding: 16px 14px;
    border: 1px dashed rgba(255, 212, 121, .45);
    border-radius: 13px;
    background: rgba(255, 212, 121, .07);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: clamp(15px, 4.4vw, 19px);
    font-weight: 600;
    letter-spacing: .1em;
    color: var(--gold);
    word-break: break-all;
    user-select: all;
}

.result-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.btn-ghost {
    flex: 1;
    height: 46px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .04);
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .16s, border-color .16s;
}

.btn-ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); }

.mail-note {
    margin-top: 16px !important;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px !important;
    background: rgba(255, 255, 255, .04);
    color: var(--muted-2) !important;
}

.mail-note.ok { color: #8fe3c0 !important; background: rgba(55, 214, 196, .08); }
.mail-note.bad { color: #ffb3c0 !important; background: rgba(255, 122, 144, .08); }

.download-link {
    margin: 2px 0 0 !important;
    font-size: 12.5px !important;
}

.download-link a {
    color: #b9b2ff;
    text-decoration: none;
    border-bottom: 1px solid rgba(185, 178, 255, .35);
    padding-bottom: 1px;
}

.download-link a:hover { color: var(--gold); border-color: rgba(255, 212, 121, .5); }

.closed {
    margin-top: 6px;
    padding: 26px 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .03);
    text-align: center;
}

.closed-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    color: #aeb3c8;
    font-size: 11px;
    letter-spacing: .16em;
}

.closed p {
    margin: 14px 0 0;
    font-size: 13px;
    line-height: 1.8;
    color: var(--muted);
}

/* ---------------- 步骤 ---------------- */

.steps {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1080px;
    margin: 46px 0 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.step {
    padding: 20px 20px 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .025);
    transition: border-color .2s, background .2s, transform .2s;
}

.step:hover {
    border-color: rgba(124, 108, 255, .3);
    background: rgba(124, 108, 255, .06);
    transform: translateY(-2px);
}

.step-no {
    font-size: 10.5px;
    letter-spacing: .22em;
    color: #7c6cff;
}

.step h3 {
    margin: 10px 0 6px;
    font-size: 15px;
}

.step p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--muted-2);
}

/* ---------------- 页脚 ---------------- */

.foot {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 36px;
    font-size: 11px;
    letter-spacing: .06em;
    color: #4f5470;
}

.foot-sep { color: #3a3e57; }

.fx-canvas {
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 960px) {
    .stage {
        grid-template-columns: minmax(0, 1fr);
        gap: 30px;
        margin-top: 26px;
    }
    .hero {
        max-width: 640px;
        margin: 0 auto;
        text-align: center;
    }
    .hero h1 { font-size: clamp(34px, 7vw, 48px); }
    .hero-sub { margin-left: auto; margin-right: auto; }
    .metrics, .perks { justify-content: center; }
    .card { max-width: 520px; margin: 0 auto; }
    .steps { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
    body { padding: 18px 14px 26px; }
    .hero-tag { font-size: 10px; letter-spacing: .12em; padding: 7px 11px; }
    .brand-pill { font-size: 11px; padding: 6px 10px; }
    .hero h1 { font-size: 32px; }
    .hero-sub { font-size: 14px; }
    .metrics { gap: 22px; margin-top: 24px; }
    .metric b { font-size: 26px; }
    .perks { gap: 8px; margin-top: 22px; }
    .perks li { font-size: 11.5px; }
    .card { padding: 26px 20px 24px; border-radius: 20px; }
    .result-card { padding: 22px 16px 18px; }
    .steps { margin-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
    .blob, .ring, .card, .hero, .result, .result-card, .badge { animation: none !important; }
    .shine { animation: none !important; color: #e7e3ff; background: none; -webkit-text-fill-color: #e7e3ff; }
    .btn::after { display: none; }
    .live-dot { animation: none; }
    .btn, .step { transition: none; }
}
