/* ===================================================================
 * Roulette 下载页样式
 * 目录：css/style.css
 * =================================================================== */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  --txt: #eef2f8;
  --muted: #8b95a8;
  --line: rgba(255, 255, 255, .09);
  --blue: #5b8cff;
  --violet: #7c5cff;
  --green: #2bd67b;
}

html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--txt);
  background: #080a10;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(58% 46% at 12% 0%, rgba(91, 140, 255, .30), transparent 62%),
    radial-gradient(48% 42% at 88% 6%, rgba(124, 92, 255, .26), transparent 62%),
    radial-gradient(50% 40% at 50% 102%, rgba(43, 214, 123, .13), transparent 66%),
    #080a10;
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(circle at 50% 26%, #000 0%, transparent 74%);
  mask-image: radial-gradient(circle at 50% 26%, #000 0%, transparent 74%);
}

.wrap {
  width: min(940px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(26px, 6vh, 60px) 0 44px;
  display: flex; flex-direction: column;
  min-height: 100vh;
}

/* ---------- 顶部 ---------- */
.hero { text-align: center; margin-bottom: clamp(22px, 4vh, 38px); }
.logo {
  width: 74px; height: 74px; margin: 0 auto 18px;
  border-radius: 22px; position: relative; display: grid; place-items: center;
  background: linear-gradient(140deg, #5b8cff, #7c5cff 55%, #b45cff);
  box-shadow: 0 22px 48px -20px rgba(110, 110, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .4);
}
.logo svg { width: 38px; height: 38px; }
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4.4vw, 34px);
  letter-spacing: -.6px; font-weight: 700;
}
.pills { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.pill {
  font-size: 12px; line-height: 1; padding: 7px 11px; border-radius: 999px;
  color: #cfd8ea; background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .09);
}
.pill.accent { color: #cfe0ff; border-color: rgba(91, 140, 255, .38); background: rgba(91, 140, 255, .16); }
.hero p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- 卡片 ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 14px;
  padding: 26px 24px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .062), rgba(255, 255, 255, .022));
  box-shadow: 0 34px 64px -34px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 86% at 50% -18%, var(--glow, rgba(91, 140, 255, .3)), transparent 58%);
  opacity: .55;
}
.card > * { position: relative; z-index: 1; }
.card.win { --glow: rgba(91, 140, 255, .34); }
.card.droid { --glow: rgba(43, 214, 123, .26); }

.card-head { display: flex; align-items: center; gap: 12px; }
.icon {
  width: 44px; height: 44px; border-radius: 13px; flex: none;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .1);
}
.icon svg { width: 23px; height: 23px; }
.card-head h2 { margin: 0; font-size: 17.5px; font-weight: 650; letter-spacing: -.2px; }
.card-head span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.desc { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--muted); }

.facts { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.facts li {
  font-size: 12px; color: #aeb8ca; padding: 5px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .055); border: 1px solid rgba(255, 255, 255, .07);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 50px; padding: 0 20px; border-radius: 14px;
  border: 1px solid transparent; cursor: pointer; user-select: none;
  font-size: 15px; font-weight: 600; letter-spacing: .2px;
  color: #fff; text-decoration: none; background: transparent;
  transition: transform .18s ease, box-shadow .25s ease, background .2s ease, border-color .2s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px) scale(.995); }
.btn-win {
  background: linear-gradient(135deg, #5286ff, #3a63f5);
  box-shadow: 0 12px 28px -12px rgba(82, 134, 255, .95);
}
.btn-win:hover { transform: translateY(-1px); box-shadow: 0 18px 34px -14px rgba(82, 134, 255, 1); }
.btn-droid {
  background: linear-gradient(135deg, #2bd67b, #11a568);
  box-shadow: 0 12px 28px -12px rgba(43, 214, 123, .85);
}
.btn-droid:hover { transform: translateY(-1px); box-shadow: 0 18px 34px -14px rgba(43, 214, 123, .95); }
.btn-ghost {
  background: rgba(255, 255, 255, .045); border-color: var(--line); color: #dbe2ee;
  font-weight: 500; font-size: 13.5px; height: 42px; border-radius: 12px; padding: 0 16px;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.btn-lg { height: 56px; font-size: 16px; border-radius: 16px; }
.btn-block { width: 100%; }
.hint { margin: auto 0 0; font-size: 12px; line-height: 1.6; color: #737d90; }

/* ---------- 二维码 ---------- */
.qr-box {
  display: inline-block; position: relative; padding: 10px; border-radius: 16px; line-height: 0;
  background: #fff; box-shadow: 0 16px 34px -20px rgba(0, 0, 0, .95);
}
.qr-empty {
  display: none; width: 138px; height: 138px; border-radius: 8px;
  flex-direction: column; align-items: center; justify-content: center; text-align: center;
  font-size: 11.5px; line-height: 1.7; color: #8a93a5;
  border: 1px dashed #c9cfdb; background: #f7f8fb;
}
.qr-box.missing .qr-empty { display: flex; }
.qr-box.missing img { display: none; }
.qr-empty b { color: #5b6475; font-weight: 600; word-break: break-all; padding: 0 6px; }

/* ---------- 移动端 ---------- */
.mobile-card { max-width: 460px; margin: 0 auto; width: 100%; }
.mobile-card .facts { justify-content: center; }
.tips { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.tips li {
  position: relative; padding-left: 20px; font-size: 13px; line-height: 1.65; color: var(--muted);
}
.tips li::before {
  content: ""; position: absolute; left: 4px; top: 8px;
  width: 6px; height: 6px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--violet));
}
.big-badge {
  width: 56px; height: 56px; border-radius: 16px; margin: 2px auto 0;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1);
}
.big-badge svg { width: 30px; height: 30px; }
.center { text-align: center; }
.ios-title { margin: 0; font-size: 18px; font-weight: 650; }

/* ---------- 页脚 ---------- */
footer {
  margin-top: auto; padding-top: 34px; text-align: center;
  font-size: 12px; color: #5d6678; line-height: 1.8;
}
footer a { color: #7d8797; text-decoration: none; border-bottom: 1px dotted rgba(255, 255, 255, .25); }

/* ---------- 二维码弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 22px;
  background: rgba(4, 6, 11, .74);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .22s ease;
}
.modal.open { opacity: 1; }
.modal-card {
  position: relative;
  width: min(352px, 100%); padding: 26px; text-align: center;
  border-radius: 24px; border: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(180deg, #171d29, #0f131b);
  box-shadow: 0 44px 90px -34px #000;
  transform: translateY(12px) scale(.97);
  transition: transform .26s cubic-bezier(.2, .8, .2, 1);
}
.modal.open .modal-card { transform: none; }
.modal-card h3 { margin: 0 0 6px; font-size: 17px; }
.modal-card p { margin: 0 0 18px; font-size: 12.5px; color: var(--muted); }
.modal-qr {
  display: inline-block; padding: 12px; border-radius: 16px; background: #fff; line-height: 0;
  cursor: default;
}
.modal-qr:hover { transform: none; box-shadow: 0 16px 34px -20px rgba(0, 0, 0, .95); }
.modal-qr img { display: block; width: 210px; height: 210px; object-fit: contain; border-radius: 6px; }
.modal-qr .qr-empty { width: 210px; height: 210px; font-size: 12px; }
.modal-close {
  position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .08); color: #cfd8ea; font-size: 18px; cursor: pointer;
}
.modal-foot { margin-top: 16px; display: flex; gap: 10px; justify-content: center; }

/* ---------- 微信遮罩 ---------- */
.wx-mask {
  position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 26px;
  background: rgba(5, 7, 12, .93);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  text-align: center; opacity: 0; transition: opacity .25s ease;
}
.wx-mask.open { opacity: 1; }
.wx-mask h2 { margin: 0 0 12px; font-size: 21px; letter-spacing: -.3px; }
.wx-mask .wx-text { margin: 0 0 8px; max-width: 340px; font-size: 14px; line-height: 1.8; color: #aab4c6; }
.wx-mask .wx-text b { color: #fff; font-weight: 600; }
.wx-actions { display: flex; flex-direction: column; gap: 10px; width: min(300px, 100%); margin-top: 22px; }
.wx-tip {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  font-size: 12px; color: #6f7a8d;
}
.wx-top-hint {
  position: fixed; top: 12px; right: 14px;
  display: flex; align-items: center; gap: 8px;
}
.wx-dots {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 26px; border-radius: 8px;
  background: rgba(255, 255, 255, .12); color: #fff; font-size: 16px; letter-spacing: 1px;
  line-height: 1;
}
.wx-arrow {
  position: fixed; top: 42px; right: 26px; width: 88px; height: 88px; opacity: .85;
  animation: nudge 1.9s ease-in-out infinite;
}
@keyframes nudge {
  0%, 100% { transform: translate(0, 0) rotate(6deg); }
  50% { transform: translate(6px, -6px) rotate(6deg); }
}

/* ---------- 提示条 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; z-index: 120;
  transform: translate(-50%, 14px);
  padding: 11px 18px; border-radius: 12px; font-size: 13px;
  color: #fff; background: rgba(28, 34, 46, .96);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .9);
  opacity: 0; pointer-events: none; transition: opacity .22s ease, transform .22s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 响应式 ---------- */
@media (max-width: 780px) {
  .grid { grid-template-columns: 1fr; }
  .wrap { width: calc(100% - 32px); padding-top: 22px; }
  .card { padding: 22px 20px; border-radius: 20px; }
  .logo { width: 62px; height: 62px; border-radius: 19px; }
  .logo svg { width: 32px; height: 32px; }
  .qr-box img { width: 150px; height: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
