/* ============ 幸运抽奖 · 共享主题 ============ */
:root {
  --red-1: #3d0202;
  --red-2: #6b0606;
  --red-3: #9e1010;
  --red-4: #c21f1f;
  --gold-1: #fff3c4;
  --gold-2: #ffe066;
  --gold-3: #ffd700;
  --gold-4: #f5b301;
  --ink: #fff8e7;
  --ink-dim: rgba(255, 248, 231, 0.72);
  --card-bg: rgba(255, 255, 255, 0.055);
  --card-border: rgba(255, 215, 0, 0.32);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --font-cn: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Heiti SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font-cn);
  color: var(--ink);
  background: linear-gradient(165deg, var(--red-1) 0%, var(--red-2) 45%, var(--red-3) 100%) fixed;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* 祥云底纹 */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='260' viewBox='0 0 420 260'%3E%3Cg fill='none' stroke='%23ffd700' stroke-opacity='0.05' stroke-width='2'%3E%3Cpath d='M60 90c-18 0-30-12-30-26s14-24 28-22c3-16 17-28 34-28 14 0 26 8 31 20 3-2 8-3 12-3 14 0 25 11 25 25s-11 26-25 26z'/%3E%3Cpath d='M300 220c-18 0-30-12-30-26s14-24 28-22c3-16 17-28 34-28 14 0 26 8 31 20 3-2 8-3 12-3 14 0 25 11 25 25s-11 26-25 26z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

main, .page { position: relative; z-index: 1; }

/* 鎏金渐变标题（流光扫过） */
.gold-text {
  background: linear-gradient(100deg, #fff8d8 0%, #ffe066 18%, #ffd700 36%, #fffdf0 50%, #f5b301 66%, #ffe066 84%, #fff8d8 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
  letter-spacing: 0.06em;
  animation: gold-shimmer 3.8s linear infinite;
}
@keyframes gold-shimmer {
  0% { background-position: 0% center; }
  100% { background-position: -220% center; }
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px;
  border: none; border-radius: 10px;
  font-family: var(--font-cn); font-size: 15px; font-weight: 700;
  cursor: pointer; user-select: none;
  background: linear-gradient(135deg, var(--gold-2), var(--gold-4));
  color: #6b0a0a;
  box-shadow: 0 4px 14px rgba(245, 179, 1, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s;
}
.btn:hover { filter: brightness(1.06); box-shadow: 0 6px 20px rgba(245, 179, 1, 0.5); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.ghost {
  background: transparent; color: var(--gold-2);
  border: 1px solid rgba(255, 215, 0, 0.5);
  box-shadow: none;
}
.btn.ghost:hover { background: rgba(255, 215, 0, 0.1); }
.btn.danger { background: linear-gradient(135deg, #ff7676, #d63031); color: #fff; box-shadow: 0 4px 14px rgba(214,48,49,.4); }
.btn.small { padding: 5px 12px; font-size: 13px; border-radius: 8px; }

.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.05em;
}
.badge.gold { background: rgba(255, 215, 0, 0.15); color: var(--gold-2); border: 1px solid rgba(255, 215, 0, 0.4); }
.badge.gray { background: rgba(255, 255, 255, 0.08); color: var(--ink-dim); border: 1px solid rgba(255,255,255,0.15); }
.badge.red { background: rgba(255, 90, 90, 0.18); color: #ff9b9b; border: 1px solid rgba(255,90,90,.4); }

.avatar {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 215, 0, 0.55);
  background: #7a1515;
}

/* 离线提示条 */
#net-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  display: none;
  padding: 7px 12px; text-align: center;
  font-size: 13px; font-weight: 600;
  background: #b3261e; color: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
}
#net-bar.show { display: block; }

/* 灯笼装饰（SVG 内联使用） */
.lantern { position: absolute; top: 0; width: 74px; z-index: 2; filter: drop-shadow(0 6px 14px rgba(0,0,0,.35)); transform-origin: 50% -10px; animation: lantern-swing 5.5s ease-in-out infinite; }
.lantern.l { left: 3%; }
.lantern.r { right: 3%; animation-delay: -2.7s; }
@keyframes lantern-swing {
  0%, 100% { transform: rotate(4deg); }
  50% { transform: rotate(-4deg); }
}

@keyframes float-up {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  12% { opacity: .8; }
  100% { transform: translateY(-105vh) scale(0.4); opacity: 0; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 24px rgba(255, 215, 0, 0.25); }
  50% { box-shadow: 0 0 54px rgba(255, 215, 0, 0.6); }
}

/* 通用弹层 */
.toast {
  position: fixed; left: 50%; bottom: 9vh; transform: translateX(-50%);
  z-index: 1000; padding: 11px 22px; border-radius: 10px;
  background: rgba(20, 2, 2, 0.92); color: var(--gold-1);
  border: 1px solid var(--card-border);
  font-size: 14px; max-width: 86vw; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.toast.show { opacity: 1; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 215, 0, 0.25); border-radius: 4px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); }
