﻿/* ============================================================
 *  user.css —— 用户抽签页
 * ============================================================ */

/* ---------------- 背景 ---------------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; transform: translateZ(0); }
.bg-sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, #173034 0%, #0b1618 42%, #05090a 100%),
    linear-gradient(180deg, #06090a, #040708);
}
.bg-aurora {
  position: absolute;
  width: 70vw; height: 70vw;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .5;
  animation: drift 26s ease-in-out infinite;
}
.bg-aurora.a1 { top: -22vw; left: -12vw; background: radial-gradient(circle, rgba(28,156,141,.55), transparent 65%); }
.bg-aurora.a2 { bottom: -26vw; right: -14vw; background: radial-gradient(circle, rgba(168,132,47,.38), transparent 65%); animation-delay: -13s; }
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(3vw, 2vw, 0) scale(1.12); }
}
.bg-pattern {
  position: absolute; inset: -10%;
  background-image: var(--sheikah-pattern);
  opacity: .85;
  mask-image: radial-gradient(70% 60% at 50% 40%, #000 10%, transparent 78%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000 10%, transparent 78%);
}
.bg-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(80% 60% at 50% 45%, transparent 30%, rgba(0,0,0,.72) 100%);
}
.motes { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .65; transform: translateZ(0); }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 22px 0;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand .tri { width: 30px; height: 28px; filter: drop-shadow(0 0 10px rgba(217,180,91,.5)); }
.brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: .18em;
  color: var(--gold-1);
  text-shadow: 0 0 18px rgba(217,180,91,.35);
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.03);
  color: var(--gold-2); cursor: pointer; transition: .2s;
}
.icon-btn:hover { border-color: rgba(217,180,91,.5); color: var(--gold-1); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------------- 页面骨架 ---------------- */
.page {
  position: relative;
  z-index: 10;
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 22px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--sheikah-2);
  opacity: .85;
}
.eyebrow .dot { color: var(--sheikah-2); animation: breathe 2.6s ease-in-out infinite; }

/* ---------------- 主标题 ---------------- */
.altar { width: 100%; display: flex; flex-direction: column; align-items: center; }
.altar-head { text-align: center; margin: 26px 0 8px; max-width: 640px; }
.campaign-title {
  margin: 14px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(26px, 5.2vw, 42px);
  line-height: 1.24;
  letter-spacing: .06em;
  color: #fff6de;
  text-shadow: 0 0 40px rgba(217,180,91,.35), 0 2px 0 rgba(0,0,0,.4);
}
.campaign-desc {
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
  white-space: pre-wrap;
}

/* ---------------- 舞台 ---------------- */
.stage {
  position: relative;
  width: 100%;
  height: 330px;
  display: grid;
  place-items: center;
  margin: 6px 0 0;
}
.rune-ring {
  position: absolute;
  width: 340px; height: 340px;
  opacity: .55;
  animation: ringSpin 90s linear infinite;
}
.rune-ring svg { width: 100%; height: 100%; }
@keyframes ringSpin { to { transform: rotate(360deg); } }

.halo {
  position: absolute;
  width: 260px; height: 90px;
  bottom: 42px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(85,230,208,.28), transparent 70%);
  filter: blur(10px);
  animation: breathe 4.2s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: .55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.beam {
  position: absolute;
  bottom: 150px; left: 50%;
  width: 210px; height: 300px;
  margin-left: -105px;
  background: linear-gradient(to top, rgba(210,255,248,.9), rgba(85,230,208,.4) 45%, transparent 90%);
  clip-path: polygon(36% 100%, 64% 100%, 100% 0%, 0% 0%);
  filter: blur(7px);
  transform: scaleY(0);
  transform-origin: bottom center;
  opacity: 0;
  pointer-events: none;
}
.stage.is-open .beam {
  animation: beamUp .85s cubic-bezier(.15,.9,.25,1) forwards;
}
@keyframes beamUp {
  0% { transform: scaleY(0); opacity: 0; }
  22% { opacity: 1; }
  60% { transform: scaleY(1); opacity: .95; }
  100% { transform: scaleY(1.06); opacity: 0; }
}

.chest-wrap {
  position: relative;
  width: 260px;
  filter: drop-shadow(0 22px 26px rgba(0,0,0,.65));
  animation: floatChest 5.4s ease-in-out infinite;
  will-change: transform;
}
@keyframes floatChest {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.chest { width: 100%; display: block; overflow: visible; }
.chest-lid, .chest-lock, .chest-mouth {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  will-change: transform;
}
.chest-lid { transition: transform .62s cubic-bezier(.2,.9,.25,1); }
.chest-lock { transition: transform .4s ease, opacity .4s ease; }
.chest-mouth { opacity: 0; filter: blur(.5px); transition: opacity .5s ease .05s; }

/* 蓄力 */
.stage.is-charging .chest-wrap { animation: shake .12s linear infinite; }
@keyframes shake {
  0%   { transform: translate(0, 0) rotate(0deg); }
  25%  { transform: translate(1.6px, -1px) rotate(.5deg); }
  50%  { transform: translate(-1.8px, .6px) rotate(-.6deg); }
  75%  { transform: translate(1px, 1.4px) rotate(.3deg); }
  100% { transform: translate(-1px, -1px) rotate(-.3deg); }
}
.stage.is-charging .halo { background: radial-gradient(ellipse at center, rgba(85,230,208,.6), transparent 70%); animation-duration: .7s; }
.stage.is-charging .rune-ring { opacity: 1; animation-duration: 6s; }

/* 开箱 */
.stage.is-open .chest-lid {
  transform: perspective(760px) rotateX(-104deg);
  transition: transform .55s cubic-bezier(.3,1.5,.5,1);
}
.stage.is-open .chest-lock { transform: translateY(14px) scaleY(.8); opacity: 0; }
.stage.is-open .chest-mouth { opacity: 1; }
.stage.is-open .chest-wrap {
  animation: none;
  filter: drop-shadow(0 0 34px rgba(85,230,208,.55)) drop-shadow(0 18px 22px rgba(0,0,0,.6));
}
.stage.is-open .halo { opacity: 1; transform: scale(1.35); transition: transform .6s ease, opacity .6s ease; }
.stage.is-open .rune-ring { opacity: 1; animation-duration: 26s; }

/* 粒子 */
.particles { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.particle {
  position: absolute;
  left: 50%; bottom: 168px;
  width: 7px; height: 7px;
  margin-left: -3.5px;
  border-radius: 1px;
  background: var(--sheikah-1);
  box-shadow: 0 0 14px var(--sheikah-2);
  animation: shoot 1.1s cubic-bezier(.2,.7,.3,1) forwards;
}
@keyframes shoot {
  0% { transform: translate(0, 0) scale(.4) rotate(0deg); opacity: 0; }
  18% { opacity: 1; }
  100% { transform: translate(var(--dx, 0), var(--dy, -180px)) scale(1.1) rotate(180deg); opacity: 0; }
}

/* ---------------- 抽签控件 ---------------- */
.draw-controls {
  position: relative;
  z-index: 12;
  width: min(430px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: -6px;
}

.form-fields { display: flex; flex-direction: column; gap: 10px; width: 100%; }

.name-field {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 16px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(4,10,11,.62);
  transition: .22s;
}
.name-field:focus-within { border-color: rgba(85,230,208,.45); box-shadow: 0 0 0 3px rgba(85,230,208,.08); }
.name-field svg { width: 18px; height: 18px; color: var(--muted-dim); flex: none; }
.name-input {
  flex: 1;
  min-width: 0;
  border: 0; outline: 0; background: transparent;
  color: var(--parchment);
  font-size: 14px;
  letter-spacing: .04em;
  font-family: var(--font-ui);
}
.name-input::placeholder { color: #4d6360; }

.btn-draw {
  position: relative;
  width: 100%;
  padding: 15px 20px 14px;
  border-radius: 18px;
  border: 1px solid rgba(217,180,91,.55);
  background:
    linear-gradient(180deg, rgba(217,180,91,.2), rgba(217,180,91,.04)),
    linear-gradient(180deg, #16292c, #0a1414);
  color: var(--gold-1);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: .25s cubic-bezier(.2,.8,.3,1);
  box-shadow: 0 10px 34px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08);
}
.btn-draw::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.22), transparent);
  transform: skewX(-18deg);
  transition: left .6s ease;
}
.btn-draw:hover:not(:disabled)::after { left: 130%; }
.btn-draw:hover:not(:disabled) {
  border-color: rgba(247,226,168,.9);
  box-shadow: 0 14px 44px rgba(217,180,91,.28), inset 0 1px 0 rgba(255,255,255,.14);
  transform: translateY(-2px);
}
.btn-draw:active:not(:disabled) { transform: translateY(0) scale(.994); }
.btn-draw-text {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: .28em;
  text-indent: .28em;
  text-shadow: 0 0 22px rgba(217,180,91,.55);
}
.btn-draw-sub {
  font-size: 11.5px;
  letter-spacing: .14em;
  color: rgba(236,224,198,.5);
}
.btn-draw-glow {
  position: absolute; inset: 0;
  background: radial-gradient(60% 120% at 50% 120%, rgba(85,230,208,.3), transparent 70%);
  opacity: 0; transition: opacity .3s;
}
.btn-draw:hover:not(:disabled) .btn-draw-glow { opacity: 1; }
.btn-draw.is-busy { pointer-events: none; opacity: .85; }
.btn-draw.is-busy .btn-draw-text { animation: pulseText .9s ease-in-out infinite; }
@keyframes pulseText { 50% { opacity: .45; } }
.btn-draw:disabled { cursor: not-allowed; border-color: rgba(255,255,255,.12); color: #6a7d7a; box-shadow: none; }
.btn-draw:disabled .btn-draw-text { text-shadow: none; }

.draw-hint {
  font-size: 12.5px;
  letter-spacing: .1em;
  color: var(--muted-dim);
  text-align: center;
  min-height: 18px;
}
.draw-hint b { color: var(--gold-1); font-weight: 600; }
.draw-hint.is-warn { color: #ffb3ad; }

/* ---------------- 抽签选择 ---------------- */
.picker { width: 100%; padding-top: 30px; text-align: center; }
.page-title {
  margin: 14px 0 26px;
  font-family: var(--font-display);
  font-size: clamp(24px, 4.6vw, 34px);
  letter-spacing: .08em;
  color: #fff6de;
}
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; text-align: left; }
.picker-card {
  padding: 20px;
  border-radius: var(--radius-l);
  border: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(16,31,34,.9), rgba(6,12,13,.94));
  cursor: pointer;
  transition: .25s;
}
.picker-card:hover { border-color: rgba(217,180,91,.5); transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0,0,0,.5); }
.picker-card h3 { font-family: var(--font-display); font-size: 17px; color: var(--gold-1); margin-bottom: 8px; letter-spacing: .04em; }
.picker-card p { font-size: 13px; color: var(--muted); line-height: 1.7; }
.picker-card .meta { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 12px; color: var(--muted-dim); }
.status-tag { font-size: 11px; padding: 2px 9px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); color: var(--muted); }
.status-tag.live { color: var(--sheikah-2); border-color: rgba(85,230,208,.45); }
.status-tag.live::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--sheikah-2); margin-right: 5px; box-shadow: 0 0 8px var(--sheikah-2); }
.status-tag.ended, .status-tag.closed, .status-tag.empty { color: #8b9b98; }

/* ---------------- 区块 ---------------- */
.section { width: 100%; margin-top: 54px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(217,180,91,.16);
}
.section-head h2 {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: .16em;
  color: var(--gold-1);
}
.section-head h2 .dot { color: var(--sheikah-2); }
.section-note { font-size: 12.5px; color: var(--muted-dim); letter-spacing: .04em; }

/* 奖池卡片 */
.pool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; }
.pool-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--rar) 32%, transparent);
  background: linear-gradient(180deg, rgba(16,31,34,.9), rgba(6,12,13,.95));
  transition: .25s;
}
.pool-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--rar) 70%, transparent); box-shadow: 0 14px 34px rgba(0,0,0,.5), 0 0 22px color-mix(in srgb, var(--rar) 22%, transparent); }
.pool-card.is-taken { opacity: .5; filter: saturate(.3); }
.pool-card.is-taken:hover { transform: none; box-shadow: none; border-color: color-mix(in srgb, var(--rar) 32%, transparent); }
.pool-media { position: relative; aspect-ratio: 1 / 1; background: radial-gradient(circle at 50% 55%, rgba(255,255,255,.07), rgba(255,255,255,.01) 72%); overflow: hidden; }
.pool-media img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.pool-media .glyph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; opacity: .5; }
.pool-body { padding: 11px 12px 13px; }
.pool-name {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--parchment);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 39px;
}
.pool-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 9px; }
.pool-left { font-size: 11px; color: var(--muted-dim); font-family: var(--font-mono); }
.pool-left.sold { color: #ff9d94; }
.pool-won { position: absolute; top: 8px; right: 8px; font-size: 10px; padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,.6); border: 1px solid rgba(217,180,91,.5); color: var(--gold-1); }

/* 我的记录 */
.my-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.my-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(8,16,17,.62);
  animation: rowIn .4s ease backwards;
}
@keyframes rowIn { from { opacity: 0; transform: translateY(8px); } }
.my-thumb {
  width: 46px; height: 46px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--rar, var(--gold-2)) 26%, transparent), rgba(255,255,255,.03));
  border: 1px solid color-mix(in srgb, var(--rar, var(--gold-2)) 35%, transparent);
  overflow: hidden; font-size: 20px;
}
.my-thumb img { width: 100%; height: 100%; object-fit: cover; }
.my-main { flex: 1; min-width: 0; }
.my-title { font-size: 14px; color: var(--parchment); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.my-time { font-size: 11.5px; color: var(--muted-dim); margin-top: 4px; font-family: var(--font-mono); }
.my-go { font-size: 12px; color: var(--gold-2); border-bottom: 1px dashed rgba(217,180,91,.4); white-space: nowrap; }
.my-go:hover { color: var(--gold-1); }
.my-empty { padding: 26px; text-align: center; font-size: 13px; color: var(--muted-dim); border: 1px dashed rgba(255,255,255,.08); border-radius: 14px; }

/* ---------------- 页脚 ---------------- */
.site-foot { margin-top: 64px; text-align: center; color: var(--muted-dim); font-size: 12.5px; letter-spacing: .1em; }
.site-foot #footTagline { color: rgba(217,180,91,.55); margin-bottom: 8px; }
.foot-meta { font-size: 11.5px; opacity: .65; }
.foot-meta span { color: rgba(217,180,91,.7); }
.foot-meta a { border-bottom: 1px dotted rgba(255,255,255,.2); }

/* ============================================================
 *  结果层
 * ============================================================ */
.result-layer {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.result-layer.show { opacity: 1; pointer-events: auto; }
.result-veil {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(6,20,20,.72), rgba(1,4,4,.94) 70%);
  backdrop-filter: blur(7px);
}
.result-layer::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--sheikah-pattern);
  opacity: .35;
  animation: veilDrift 40s linear infinite;
}
@keyframes veilDrift { to { background-position: 360px 360px; } }

/* 传说闪光 */
.result-layer.flash::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(255,220,150,.9), transparent 60%);
  animation: flashOut .9s ease-out forwards;
  pointer-events: none;
}
@keyframes flashOut { 0% { opacity: .95; } 100% { opacity: 0; } }

.reward-card {
  position: relative;
  width: min(380px, 82vw);
  height: min(540px, 68vh);
  perspective: 1400px;
  z-index: 2;
  transform: scale(.86) translateY(20px);
  opacity: 0;
  transition: transform .5s cubic-bezier(.2,1.2,.4,1), opacity .4s ease;
}
.result-layer.show .reward-card { transform: none; opacity: 1; }
.reward-inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .85s cubic-bezier(.4,.05,.2,1);
}
.reward-card.is-flipped .reward-inner { transform: rotateY(180deg); }

.reward-face {
  position: absolute; inset: 0;
  border-radius: 22px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* 背面（符文） */
.reward-face-back {
  align-items: center; justify-content: center; gap: 20px;
  background:
    radial-gradient(circle at 50% 45%, rgba(85,230,208,.16), transparent 62%),
    linear-gradient(180deg, #0d1c1e, #050a0b);
  border: 1px solid rgba(85,230,208,.35);
  box-shadow: 0 0 60px rgba(85,230,208,.25), inset 0 0 60px rgba(85,230,208,.08);
}
.rune-mark { width: 130px; height: 130px; animation: ringSpin 14s linear infinite; filter: drop-shadow(0 0 12px rgba(85,230,208,.6)); }
.rune-text { font-family: var(--font-display); letter-spacing: .4em; font-size: 13px; color: var(--sheikah-2); text-indent: .4em; }

/* 正面（伴手礼） */
.reward-face-front {
  transform: rotateY(180deg);
  padding: 18px 18px 20px;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--rar) 22%, transparent), transparent 62%),
    linear-gradient(180deg, #101f22, #060d0e);
  border: 1px solid color-mix(in srgb, var(--rar) 55%, transparent);
  box-shadow: 0 0 70px color-mix(in srgb, var(--rar) 30%, transparent), inset 0 0 50px rgba(0,0,0,.5);
}
.reward-rarity {
  align-self: center;
  font-size: 11px;
  letter-spacing: .4em;
  text-indent: .4em;
  padding: 5px 16px;
  border-radius: 999px;
  color: var(--rar);
  border: 1px solid color-mix(in srgb, var(--rar) 55%, transparent);
  background: color-mix(in srgb, var(--rar) 14%, transparent);
}
.reward-media {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 16px 0 14px;
  border-radius: 14px;
  overflow: hidden;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 55%, rgba(255,255,255,.08), rgba(255,255,255,.01) 70%);
  border: 1px solid rgba(255,255,255,.07);
}
.reward-media img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.reward-media img.hidden { display: none; }
.reward-ph { font-size: 64px; line-height: 1; filter: drop-shadow(0 0 24px color-mix(in srgb, var(--rar) 60%, transparent)); }
.reward-name {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.35;
  text-align: center;
  color: #fff8e8;
  letter-spacing: .04em;
  text-shadow: 0 0 30px color-mix(in srgb, var(--rar) 55%, transparent);
}
.reward-desc {
  margin-top: 9px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
  text-align: center;
  max-height: 3.5em;
  overflow: auto;
}
.reward-actions { margin-top: 16px; display: flex; flex-direction: column; gap: 9px; }
.reward-link { border-color: color-mix(in srgb, var(--rar) 55%, transparent); color: #fff3d8; }
.reward-link:hover { background: color-mix(in srgb, var(--rar) 18%, transparent); }

/* 未中奖 / 已抽完 */
.result-layer.is-miss .reward-face-front {
  --rar: #7c8c8a;
  background: linear-gradient(180deg, #121a1b, #080d0e);
}
.result-layer.is-miss .reward-rarity { color: #9aaaa7; border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.04); }
.result-layer.is-miss .reward-name { text-shadow: none; color: #d9d3c4; }
.result-tip {
  position: absolute;
  bottom: 6vh;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--muted-dim);
  z-index: 2;
  white-space: nowrap;
}
.result-actions-row { display: flex; gap: 10px; justify-content: center; }

/* ============================================================
 *  响应式
 * ============================================================ */
@media (max-width: 720px) {
  .topbar { padding: 14px 16px 0; }
  .brand-name { font-size: 14px; letter-spacing: .12em; }
  .page { padding: 6px 16px 48px; }
  .stage { height: 268px; }
  .chest-wrap { width: 208px; }
  .rune-ring { width: 270px; height: 270px; }
  .halo { width: 200px; bottom: 30px; }
  .beam { bottom: 146px; width: 160px; margin-left: -80px; height: 220px; }
  .particle { bottom: 150px; }
  .altar-head { margin-top: 20px; }
  .campaign-desc { font-size: 13px; }
  .btn-draw { padding: 14px 18px 12px; }
  .btn-draw-text { font-size: 17px; letter-spacing: .22em; }
  .pool-grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 11px; }
  .reward-card { height: min(500px, 64vh); }
  .reward-name { font-size: 18px; }
  .result-tip { bottom: 3vh; font-size: 11px; letter-spacing: .12em; }
  .my-row { padding: 10px 12px; gap: 11px; }
  .section { margin-top: 40px; }
}
@media (max-width: 380px) {
  .pool-grid { grid-template-columns: repeat(2, 1fr); }
  .stage { height: 240px; }
}

/* ============================================================
 *  精简动效模式（html.lite）
 *  手机 / 低配设备自动启用，也可以点页脚按钮手动切换。
 *  原则：保留"开箱→翻牌"这条主线的观感，砍掉常驻的大面积模糊与循环动画。
 * ============================================================ */
html.lite .motes { opacity: .5; }

/* 大幅降低两类最贵的常驻动画：大面积 blur 的极光层、呼吸光晕 */
html.lite .bg-aurora {
  animation: none;
  filter: blur(40px);
  opacity: .34;
}
html.lite .bg-pattern { opacity: .5; }
html.lite .halo {
  animation: none;
  filter: none;
  opacity: .55;
}

/* 符文环转得慢一些，减少每帧重绘 */
html.lite .rune-ring { animation-duration: 260s; opacity: .4; }

/* 宝箱不再上下浮动，也不挂持久投影（SVG 里已有地面阴影） */
html.lite .chest-wrap { animation: none; filter: none; }
html.lite .stage.is-open .chest-wrap { filter: drop-shadow(0 0 20px rgba(85, 230, 208, .5)); }
html.lite .stage.is-charging .chest-wrap { animation: shake .14s linear infinite; }

/* 弹层：去掉 backdrop-filter（移动端合成很贵），改用更实的底色 */
html.lite .result-veil {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(2, 6, 7, .93);
}
html.lite .result-layer::before { animation: none; opacity: .22; }
html.lite .modal {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(2, 6, 7, .88);
}
html.lite .reward-face-front { box-shadow: 0 0 34px color-mix(in srgb, var(--rar) 26%, transparent), inset 0 0 40px rgba(0, 0, 0, .5); }
html.lite .reward-card { perspective: 900px; }

/* 按钮上的扫光 */
html.lite .btn-draw::after { display: none; }

/* 页脚的手动切换入口 */
.foot-perf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .03);
  color: var(--muted-dim);
  font-size: 11.5px;
  letter-spacing: .06em;
  cursor: pointer;
  transition: .2s;
}
.foot-perf:hover { color: var(--parchment); border-color: rgba(255, 255, 255, .24); }
.foot-perf.is-on { color: var(--sheikah-2); border-color: rgba(85, 230, 208, .4); }
