/* WHGJ-01 网红粉丝抽奖 H5 · 13色板 + 6场景 + Canvas转盘 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background 0.35s ease, color 0.35s ease;
  padding-bottom: calc(5rem + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
body.showcase-back-active { padding-top: calc(44px + env(safe-area-inset-top, 0)); }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; }
button:disabled { opacity: 0.55; cursor: not-allowed; }
a { color: inherit; }

body[data-theme='hongjin'] { --primary:#C41E17; --accent:#FFD700; --bg:#1A0A0A; --bg-card:rgba(255,255,255,.08); --text:#FFF8F0; --text-light:rgba(255,248,240,.72); --border:rgba(255,215,0,.25); --hero-grad:linear-gradient(180deg,#1A0A0A,#3D0A0A); }
body[data-theme='jiangzi'] { --primary:#5B2C82; --accent:#E8D5F5; --bg:#0D0D1A; --bg-card:rgba(255,255,255,.07); --text:#F3E8FF; --text-light:rgba(232,213,245,.7); --border:rgba(232,213,245,.2); --hero-grad:linear-gradient(180deg,#0D0D1A,#5B2C82); }
body[data-theme='molv'] { --primary:#1B5E20; --accent:#A5D6A7; --bg:#0A0F0A; --bg-card:rgba(255,255,255,.07); --text:#E8F5E9; --text-light:rgba(165,214,167,.75); --border:rgba(165,214,167,.22); --hero-grad:linear-gradient(180deg,#0A0F0A,#1B5E20); }
body[data-theme='shenlan'] { --primary:#64B5F6; --accent:#0D2137; --bg:#060D14; --bg-card:rgba(255,255,255,.06); --text:#E3F2FD; --text-light:rgba(100,181,246,.75); --border:rgba(100,181,246,.22); --hero-grad:linear-gradient(180deg,#060D14,#0D2137); }
body[data-theme='chengjin'] { --primary:#E65100; --accent:#FFD54F; --bg:#1A0F05; --bg-card:rgba(255,255,255,.08); --text:#FFF8E1; --text-light:rgba(255,213,79,.75); --border:rgba(255,213,79,.25); --hero-grad:linear-gradient(180deg,#1A0F05,#E65100); }
body[data-theme='qianfen'] { --primary:#E91E63; --accent:#F8BBD0; --bg:#FFF0F5; --bg-card:#FFF; --text:#880E4F; --text-light:#AD1457; --border:#F8BBD0; --hero-grad:linear-gradient(180deg,#FFF0F5,#F8BBD0); }
body[data-theme='jijing'] { --primary:#212121; --accent:#F5F5F5; --bg:#FFFFFF; --bg-card:#FAFAFA; --text:#212121; --text-light:#757575; --border:#E0E0E0; --hero-grad:linear-gradient(180deg,#FAFAFA,#E0E0E0); }
body[data-theme='huopo'] { --primary:#7C4DFF; --accent:#00E676; --bg:#FFEB3B; --bg-card:#FFF; --text:#311B92; --text-light:#5E35B1; --border:#CE93D8; --hero-grad:linear-gradient(135deg,#7C4DFF,#00E676); }
body[data-theme='dihai'] { --primary:#42A5F5; --accent:#1A237E; --bg:#0D1130; --bg-card:rgba(255,255,255,.07); --text:#E8EAF6; --text-light:rgba(66,165,245,.8); --border:rgba(66,165,245,.25); --hero-grad:linear-gradient(180deg,#0D1130,#1A237E); }
body[data-theme='chamo'] { --primary:#3E2723; --accent:#BCAAA4; --bg:#EFEBE9; --bg-card:#FFFDF7; --text:#3E2723; --text-light:#795548; --border:#D7CCC8; --hero-grad:linear-gradient(180deg,#EFEBE9,#BCAAA4); }
body[data-theme='lvyi'] { --primary:#2E7D32; --accent:#C8E6C9; --bg:#F1F8E9; --bg-card:#FFF; --text:#1B5E20; --text-light:#388E3C; --border:#C8E6C9; --hero-grad:linear-gradient(180deg,#F1F8E9,#C8E6C9); }
body[data-theme='saibo'] { --primary:#00E5FF; --accent:#FF007F; --bg:#0A0A0A; --bg-card:rgba(255,255,255,.06); --text:#E0FFFF; --text-light:rgba(0,229,255,.75); --border:rgba(0,229,255,.3); --hero-grad:linear-gradient(135deg,#0A0A0A,#FF007F); }
body[data-theme='xingkong'] { --primary:#B39DDB; --accent:#311B92; --bg:#0A0A20; --bg-card:rgba(255,255,255,.07); --text:#EDE7F6; --text-light:rgba(179,157,219,.8); --border:rgba(179,157,219,.25); --hero-grad:linear-gradient(180deg,#0A0A20,#311B92); }

body[data-theme='qianfen'] .hero,
body[data-theme='jijing'] .hero,
body[data-theme='huopo'] .hero,
body[data-theme='chamo'] .hero,
body[data-theme='lvyi'] .hero { color: var(--text); }

.particle-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}

.section { position: relative; z-index: 1; max-width: 960px; margin: 0 auto; padding: 2.5rem 1.25rem; }
.section__title { font-size: 1.35rem; text-align: center; margin-bottom: 1.25rem; color: var(--accent); letter-spacing: 0.08em; }

.hero {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: #fff; overflow: hidden;
}
.hero__grad { position: absolute; inset: 0; background: var(--hero-grad); opacity: 0.88; }
.hero__content { position: relative; z-index: 2; padding: 2rem 1.5rem; animation: fadeUp .8s ease; max-width: 420px; }
.hero__avatar-wrap { position: relative; width: 88px; height: 88px; margin: 0 auto 1rem; }
.hero__avatar {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255,255,255,.85); box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
.hero__badge {
  position: absolute; bottom: -4px; right: -4px;
  background: var(--primary); color: #fff; font-size: .65rem;
  padding: .15rem .45rem; border-radius: 999px; font-weight: 700;
}
.hero__brand { font-size: .9rem; opacity: .85; margin-bottom: .35rem; letter-spacing: 0.06em; }
.hero__title {
  font-size: clamp(1.75rem, 7vw, 2.5rem); font-weight: 900;
  margin-bottom: .5rem; text-shadow: 0 2px 20px rgba(0,0,0,.25);
}
.hero__subtitle { font-size: clamp(.95rem, 3.5vw, 1.15rem); opacity: .92; margin-bottom: .5rem; }
.hero__tagline { font-size: .82rem; opacity: .75; margin-bottom: 1rem; }
.hero__stats {
  display: flex; flex-wrap: wrap; gap: .65rem; justify-content: center;
  font-size: .78rem; opacity: .88; margin-bottom: 1.5rem;
}
.hero__stats span {
  padding: .35rem .65rem; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
}
.hero__scroll { display: inline-block; margin-top: 1.25rem; font-size: .85rem; opacity: .65; text-decoration: none; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

.btn-draw {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85rem 2rem; border-radius: 999px; font-size: 1.05rem; font-weight: 700;
  background: rgba(255,255,255,.12); backdrop-filter: blur(12px);
  border: 1.5px solid rgba(255,255,255,.35); color: #fff;
  box-shadow: 0 0 24px rgba(255,215,0,.35);
  animation: pulseGlow 2s ease-in-out infinite;
  transition: transform .15s ease;
}
.btn-draw:active { transform: scale(0.96); }
@keyframes pulseGlow {
  0%,100% { box-shadow: 0 0 20px rgba(255,215,0,.3); }
  50% { box-shadow: 0 0 36px rgba(255,215,0,.55), 0 0 60px rgba(255,215,0,.2); }
}

.wheel-section { text-align: center; }
.wheel-wrap {
  position: relative; width: min(92vw, 360px); margin: 0 auto 1.25rem;
  filter: drop-shadow(0 12px 40px rgba(0,0,0,.2));
}
.lottery-wheel {
  width: 100%; height: auto; display: block;
  border-radius: 50%;
}
.btn-spin { min-width: 200px; font-size: 1rem; padding: .75rem 2rem; }
.draw-limit-hint { font-size: .78rem; color: var(--text-light); margin-top: .75rem; }
.shake-hint { font-size: 1rem; margin-bottom: .75rem; animation: shakeHint 1.2s ease-in-out infinite; }
@keyframes shakeHint { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }

.passcode-wrap, .draw-input-wrap { max-width: 320px; margin: 0 auto 1.25rem; }
.draw-input {
  width: 100%; padding: .75rem 1rem; border-radius: .75rem;
  border: 1.5px solid var(--border); background: var(--bg-card);
  color: var(--text); font-size: 1rem; margin-bottom: .5rem;
}
.passcode-hint, .draw-input-hint { font-size: .78rem; color: var(--text-light); margin-bottom: .75rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: .65rem 1.35rem; border-radius: 999px; font-weight: 600; font-size: .9rem; transition: transform .15s; text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; border: none; }
.btn-outline { border: 1.5px solid var(--primary); color: var(--primary); background: transparent; }

.dashboard-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem;
}
@media (min-width: 640px) { .dashboard-grid { grid-template-columns: repeat(4, 1fr); } }
.dash-card {
  padding: 1rem; border-radius: .75rem; text-align: center;
  background: var(--bg-card); border: 1px solid var(--border);
}
.dash-card__num { display: block; font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.dash-card__label { font-size: .75rem; color: var(--text-light); margin-top: .25rem; }
.dash-note { text-align: center; font-size: .72rem; color: var(--text-light); margin-top: .75rem; }

.result-section { text-align: center; opacity: 0; transform: translateY(20px); transition: opacity .5s, transform .5s; }
.result-section.visible { opacity: 1; transform: translateY(0); }
.result-section.hidden { display: none; }
.result-status { font-size: 1rem; color: var(--accent); font-weight: 700; margin-bottom: .5rem; }
.result-name { font-size: clamp(2rem, 8vw, 3rem); font-weight: 800; margin: .5rem 0; line-height: 1.15; }
.result-emoji { font-size: clamp(3rem, 12vw, 4rem); margin: .25rem 0; }
.result-tagline { font-size: clamp(1rem, 3.5vw, 1.15rem); color: var(--text-light); margin-bottom: 1.25rem; }
.result-card {
  text-align: left; padding: 1.25rem; border-radius: 1rem;
  background: var(--bg-card); border: 1px solid var(--border);
  backdrop-filter: blur(10px); margin-bottom: 1.25rem;
  line-height: 1.75; font-size: .95rem;
}
.glass-card { backdrop-filter: blur(12px); }
.result-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

.pool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 640px) { .pool-grid { grid-template-columns: repeat(4, 1fr); } }
.pool-card {
  padding: 1rem .65rem; border-radius: .75rem; text-align: center;
  background: var(--bg-card); border: 1.5px solid var(--border);
  transition: transform .2s, box-shadow .2s;
}
.pool-card:hover { transform: scale(1.03); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.pool-card__emoji { font-size: 1.75rem; margin-bottom: .35rem; }
.pool-card__name { font-size: .85rem; font-weight: 700; }
.pool-card__prob { font-size: .72rem; color: var(--text-light); margin-top: .25rem; }
.pool-card__stock { font-size: .68rem; color: var(--primary); margin-top: .15rem; }
.pool-cta { text-align: center; margin-top: 1rem; color: var(--text-light); font-size: .88rem; }

.cta-section { text-align: center; }
.cta-btns { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

.rules-section { text-align: center; }
.rules-text { font-size: .85rem; color: var(--text-light); line-height: 1.8; max-width: 560px; margin: 0 auto; }

.site-footer {
  text-align: center; padding: 1.5rem 1rem 2rem;
  font-size: .78rem; color: var(--text-light);
  border-top: 1px solid var(--border);
}

.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.modal__box {
  position: relative; background: var(--bg); border-radius: 1rem;
  padding: 1.25rem; max-width: 400px; width: 100%; text-align: center;
  border: 1px solid var(--border); max-height: 90vh; overflow-y: auto;
}
.modal__close { position: absolute; top: .75rem; right: .75rem; font-size: 1.25rem; color: var(--text-light); }
.modal__title { font-weight: 700; margin-bottom: .75rem; }
.modal__preview { width: 100%; border-radius: .5rem; margin-bottom: .75rem; box-shadow: 0 4px 20px rgba(0,0,0,.2); }
.modal__hint { font-size: .78rem; color: var(--text-light); }
.captcha-input { max-width: 120px; margin: .75rem auto; text-align: center; }

.scene-panel, .theme-panel { position: fixed; z-index: 50; }
.scene-panel { bottom: calc(5.5rem + env(safe-area-inset-bottom)); left: 1rem; }
.theme-panel { bottom: calc(5.5rem + env(safe-area-inset-bottom)); right: 1rem; }
.scene-panel__toggle, .theme-panel__toggle {
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,.15); font-size: 1.25rem;
}
.scene-panel__list, .theme-panel__list {
  position: absolute; bottom: calc(100% + .5rem); left: 0;
  background: var(--bg); border: 1px solid var(--border); border-radius: .75rem;
  padding: .5rem; min-width: 10rem; max-height: 50vh; overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.theme-panel__list { left: auto; right: 0; min-width: 8rem; }
.scene-panel__list button, .theme-panel__list button {
  display: block; width: 100%; text-align: left; padding: .45rem .65rem;
  border-radius: .4rem; font-size: .82rem; color: var(--text);
}
.scene-panel__list button:hover, .theme-panel__list button:hover,
.scene-panel__list button.active, .theme-panel__list button.active {
  background: var(--primary); color: #fff;
}

.back-top {
  position: fixed; bottom: calc(1rem + env(safe-area-inset-bottom)); right: 1rem;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--primary); color: #fff; font-size: 1.1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.2); z-index: 40;
}
.back-top[hidden] { display: none; }

.contact-footer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 45;
  padding: .65rem 1rem calc(.65rem + env(safe-area-inset-bottom));
  background: rgba(0,0,0,.82); backdrop-filter: blur(8px); color: #fff;
  text-align: center;
}
.contact-footer__btns { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; margin-bottom: .35rem; }
.contact-footer__cta {
  padding: .45rem 1rem; border-radius: 999px;
  background: #c41e1e !important; color: #fff;
  text-decoration: none; font-size: .82rem; font-weight: 600;
}
.contact-footer__btn { padding: .45rem .85rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); color: #fff; background: transparent; font-size: .82rem; text-decoration: none; }
.contact-footer__brand { font-size: .68rem; opacity: .65; }

@media (min-width: 1024px) {
  .particle-canvas { opacity: 1; }
}
