/* ============================================================
   授权中心 · 幸运抽奖前台
   ============================================================ */

.lottery-page { padding-bottom: 64px; }

.lottery-hero { padding: 40px 0 22px; }
.lottery-hero h1 {
    margin: 12px 0 10px;
    font-size: clamp(26px, 3.6vw, 38px);
    letter-spacing: -.04em;
    font-weight: 760;
}
.lottery-hero h1 .grad {
    background: linear-gradient(120deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.lottery-hero p { margin: 0; font-size: 13.5px; color: var(--text-2); max-width: 620px; line-height: 1.85; }
.lottery-hero .eyebrow { color: var(--brand-600); }

.lottery-main {
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    gap: 20px;
    align-items: start;
}

/* ---------- 转盘 ---------- */
.wheel-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 26px 22px 22px;
    background:
        radial-gradient(70% 60% at 50% 0%, rgba(99, 102, 241, .45), transparent 62%),
        radial-gradient(50% 40% at 100% 100%, rgba(34, 211, 238, .22), transparent 70%),
        linear-gradient(165deg, #121a2c 0%, #1c2544 52%, #231f45 100%);
    color: #fff;
    box-shadow: 0 30px 70px -40px rgba(15, 23, 42, .9);
    min-height: 480px;
    display: flex;
    flex-direction: column;
}
.wheel-card::before {
    content: "";
    position: absolute; left: -60px; top: -60px;
    width: 200px; height: 200px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 0 0 36px rgba(255, 255, 255, .025), 0 0 0 76px rgba(255, 255, 255, .015);
    pointer-events: none;
}
.wheel-card-head {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 6px;
}
.wheel-card-head h2 { margin: 0; font-size: 16px; font-weight: 680; letter-spacing: -.01em; }
.wheel-card-head .badge { background: rgba(255, 255, 255, .12); color: #c7d2fe; }
.wheel-card-head .spacer { flex: 1; }
.wheel-card-head .cost {
    font-size: 11.5px; color: rgba(203, 213, 225, .72);
}

.wheel-stage {
    position: relative;
    width: min(392px, 78vw);
    aspect-ratio: 1 / 1;
    margin: 20px auto 0;
    flex: none;
}

.wheel {
    position: absolute; inset: 0;
    border-radius: 50%;
    transform: rotate(0deg);
    box-shadow:
        0 0 0 8px rgba(255, 255, 255, .07),
        0 0 0 14px rgba(255, 255, 255, .04),
        0 18px 50px -18px rgba(0, 0, 0, .75);
    will-change: transform;
}
.wheel.is-spinning { transition: transform 4.6s cubic-bezier(.11, .72, .13, 1); }

.wheel-face {
    position: absolute; inset: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .06);
}
.wheel-face::after {
    content: "";
    position: absolute; inset: 0; border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .9) 0 28%, transparent 34%);
    pointer-events: none;
}

.wheel-labels { position: absolute; inset: 0; }
.wheel-labels .wl {
    position: absolute; left: 50%; top: 50%;
    width: 88px; margin-left: -44px;
    transform-origin: center center;
    text-align: center;
    color: #37358a;
    pointer-events: none;
}
.wheel-labels .wl-in {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    transform-origin: center center;
}
/* 停止转动后文字平滑回正 */
.wheel:not(.is-spinning) .wheel-labels .wl-in {
    transition: transform .38s cubic-bezier(.22, .61, .36, 1);
}
.wheel-labels .wl b { font-size: 15px; line-height: 1; font-weight: 400; }
.wheel-labels .wl i {
    font-style: normal; font-weight: 650;
    font-size: 11.5px; line-height: 1.25;
    letter-spacing: -.01em;
    max-width: 88px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
}

.wheel-pointer {
    position: absolute; left: 50%; top: -4px;
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    border-top: 28px solid #fbbf24;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5));
    z-index: 5;
}
.wheel-pointer::after {
    content: "";
    position: absolute; left: -13px; top: -34px;
    width: 26px; height: 26px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fde68a, #f59e0b 70%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}

.wheel-hub {
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 104px; height: 104px; border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, .92);
    background: linear-gradient(140deg, #fbbf24 0%, #f97316 100%);
    color: #3b1d00;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1px;
    font-family: var(--font);
    cursor: pointer;
    z-index: 4;
    box-shadow: 0 12px 26px -10px rgba(249, 115, 22, .9), inset 0 -2px 6px rgba(120, 53, 15, .25);
    transition: transform .16s, filter .16s;
}
.wheel-hub:hover { filter: brightness(1.04); transform: translate(-50%, -50%) scale(1.03); }
.wheel-hub:active { transform: translate(-50%, -50%) scale(.97); }
.wheel-hub[disabled] { cursor: default; filter: grayscale(.2); opacity: .85; }
.wheel-hub b { font-size: 19px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.wheel-hub small { font-size: 10.5px; font-weight: 600; opacity: .78; }

.wheel-note {
    position: relative; z-index: 1;
    margin: 20px 0 0; text-align: center;
    font-size: 11.5px; color: rgba(203, 213, 225, .72);
    line-height: 1.7;
}

/* 空奖池 */
.wheel-empty {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; border-radius: 50%;
    background: #f8fafc; color: #64748b;
    font-size: 13px; text-align: center; padding: 40px;
}

/* ---------- 账户卡 ---------- */
.side-col { display: flex; flex-direction: column; gap: 16px; }
.acct-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.acct-head { display: flex; align-items: center; gap: 12px; }
.acct-avatar {
    width: 46px; height: 46px; border-radius: 14px; flex: none;
    background: var(--grad); color: #fff;
    display: grid; place-items: center;
    font-size: 18px; font-weight: 700;
    box-shadow: 0 10px 20px -12px rgba(99, 102, 241, .95);
}
.acct-name { min-width: 0; }
.acct-name b { display: block; font-size: 15px; font-weight: 680; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-name span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.acct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 16px 0; }
.acct-grid > div {
    background: var(--surface-2); border: 1px solid var(--line);
    border-radius: 12px; padding: 10px 12px;
}
.acct-grid span { display: block; font-size: 10.5px; color: var(--muted); margin-bottom: 4px; }
.acct-grid b { font-size: 16px; font-weight: 700; letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.acct-grid b.sm { font-size: 13.5px; }

.acct-card .btn-block { height: 42px; font-size: 13px; }

/* 登录卡 */
.login-card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 680; }
.login-card .sub { margin: 0 0 18px; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.login-card .fld { margin-bottom: 12px; }
.login-card .fld input { height: 42px; }
.login-card .hint { margin: 12px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.8; }
.login-error {
    display: none; margin-bottom: 12px; padding: 8px 11px;
    border-radius: 9px; background: #fef2f2; border: 1px solid #fecaca;
    color: #b91c1c; font-size: 12px;
}
.login-error.show { display: block; }

/* 我的记录 */
.mini-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13.5px; font-weight: 650; color: var(--text); }
.mini-title svg { width: 15px; height: 15px; color: var(--brand); }
.mini-title .link { margin-left: auto; font-size: 11.5px; font-weight: 500; color: var(--muted); cursor: pointer; }
.mini-title .link:hover { color: var(--brand); }

.rec-list { display: flex; flex-direction: column; }
.rec-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 0; border-bottom: 1px dashed var(--line);
    font-size: 12.5px;
}
.rec-item:last-child { border-bottom: 0; }
.rec-ico {
    width: 30px; height: 30px; border-radius: 9px; flex: none;
    display: grid; place-items: center; font-size: 14px;
    background: var(--bg-soft);
}
.rec-main { flex: 1; min-width: 0; }
.rec-main b { display: block; font-size: 12.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-main span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.rec-time { font-size: 10.5px; color: var(--muted); flex: none; }

/* ---------- 奖品池 ---------- */
.pool-section { margin-top: 30px; }
.pool-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.pool-head h2 { margin: 0 0 3px; font-size: 19px; font-weight: 720; letter-spacing: -.03em; }
.pool-head p { margin: 0; font-size: 12px; color: var(--muted); }

.pool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.pool-item {
    display: flex; align-items: center; gap: 11px;
    padding: 13px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-xs);
    transition: transform .18s, border-color .18s;
}
.pool-item:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.pool-item .pi {
    width: 38px; height: 38px; border-radius: 11px; flex: none;
    display: grid; place-items: center; font-size: 19px;
    background: var(--brand-soft);
}
.pool-item b { display: block; font-size: 13px; font-weight: 650; color: var(--text); }
.pool-item span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }

/* ---------- 最近中奖播报 ---------- */
.recent-bar {
    margin-top: 22px;
    display: flex; align-items: center; gap: 14px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
    overflow: hidden;
}
.recent-bar .rb-label {
    display: flex; align-items: center; gap: 7px; flex: none;
    font-size: 11.5px; font-weight: 650; color: var(--brand-600);
}
.recent-bar .rb-label svg { width: 14px; height: 14px; }
.recent-bar .rb-track {
    flex: 1; min-width: 0;
    display: flex; gap: 22px; overflow-x: auto;
    font-size: 12px; color: var(--text-2);
    scrollbar-width: none; white-space: nowrap;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent 100%);
}
.recent-bar .rb-track::-webkit-scrollbar { display: none; }
.recent-bar .rb-track em { font-style: normal; color: var(--muted); font-size: 10.5px; margin-left: 5px; }
.recent-bar .rb-empty { font-size: 12px; color: var(--muted); }

/* ---------- 中奖弹窗 ---------- */
.lot-modal {
    position: fixed; inset: 0; z-index: 130;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    background: rgba(8, 12, 24, .72);
    backdrop-filter: blur(5px);
    opacity: 0; pointer-events: none;
    transition: opacity .2s;
}
.lot-modal.show { opacity: 1; pointer-events: auto; }
.lot-panel {
    width: min(356px, 100%);
    background: var(--surface);
    border-radius: 24px;
    padding: 26px 22px 20px;
    text-align: center;
    box-shadow: 0 30px 70px -20px rgba(15, 23, 42, .55);
    transform: translateY(12px) scale(.96);
    transition: transform .24s;
}
.lot-modal.show .lot-panel { transform: none; }
.lot-emoji {
    width: 74px; height: 74px; margin: 0 auto 12px;
    border-radius: 22px;
    display: grid; place-items: center;
    font-size: 38px; line-height: 1;
    background: linear-gradient(150deg, #eef2ff, #fdf4ff);
    border: 1px solid var(--line);
}
.lot-panel h3 { margin: 0 0 6px; font-size: 17px; font-weight: 760; letter-spacing: -.02em; }
.lot-prize { margin: 0 0 4px; font-size: 20px; font-weight: 760; letter-spacing: -.02em; color: var(--brand-600); }
.lot-issue { margin: 0 0 14px; font-size: 12px; color: var(--muted); line-height: 1.7; }
.lot-code {
    margin: 0 0 14px; padding: 10px 12px;
    border-radius: 11px; background: var(--surface-2);
    border: 1px dashed var(--line-strong);
    font-family: ui-monospace, Menlo, monospace;
    font-size: 12px; color: var(--text);
    word-break: break-all;
}
.lot-code span { display: block; font-family: var(--font); font-size: 10.5px; color: var(--muted); margin-bottom: 4px; }
.lot-panel .btn-block { height: 44px; font-size: 13.5px; }
.lot-panel .btn-text {
    margin-top: 10px; border: 0; background: transparent;
    font-family: var(--font); font-size: 12px; color: var(--muted); cursor: pointer;
}
.lot-panel .btn-text:hover { color: var(--text-2); }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
    .lottery-main { grid-template-columns: 1fr; }
    .wheel-card { min-height: 0; padding: 22px 16px 20px; }
    .side-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
    .acct-card { padding: 17px; }
}
@media (max-width: 720px) {
    .lottery-hero { padding: 28px 0 16px; }
    .lottery-hero p { font-size: 12.5px; }
    .wheel-stage { width: min(348px, 86vw); margin-top: 16px; }
    .wheel-hub { width: 92px; height: 92px; border-width: 4px; }
    .wheel-hub b { font-size: 17px; }
    .wheel-labels .wl { width: 76px; margin-left: -38px; }
    .wheel-labels .wl i { font-size: 10.5px; max-width: 76px; }
    .side-col { grid-template-columns: 1fr; }
    .pool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .pool-item { padding: 11px 12px; gap: 9px; }
    .pool-item .pi { width: 34px; height: 34px; font-size: 17px; }
    .pool-item b { font-size: 12.5px; }
    .recent-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
    .recent-bar .rb-track { width: 100%; }
}
@media (max-width: 380px) {
    .wheel-stage { width: 86vw; }
    .pool-grid { grid-template-columns: 1fr; }
}

/* 未登录说明 */
.tip-list { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--text-2); line-height: 2.05; }
.tip-list li::marker { color: var(--brand); }
