/* ===== GradLive 手机端毕业典礼直播页 ===== */
:root {
  --red-deep: #6e0d10;
  --red: #8f1418;
  --red-bright: #a81b1f;
  --red-card: linear-gradient(135deg, #9c181c 0%, #7a0f12 100%);
  --gold: #d9b45c;
  --gold-light: #f0d795;
  --gold-grad: linear-gradient(135deg, #f4dd9c 0%, #ddb967 45%, #c99c46 100%);
  --bg: #f5eedc;
  --card: #fffdf7;
  --ink: #660c0f;
  --ink-soft: #8c8069;
  --line: #e7dcc2;
  --shadow: 0 6px 18px rgba(110, 13, 16, 0.10);
  --radius: 14px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #3d080a;
  line-height: 1.55;
}
.app {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
  position: relative;
  padding-bottom: 64px;
  box-shadow: 0 0 40px rgba(0,0,0,.4);
}
img { max-width: 100%; display: block; }

/* ===== Loading ===== */
.loading {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
  background: var(--red-deep); color: var(--gold-light); z-index: 99;
}
.loading-spinner {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid rgba(240,215,149,.25); border-top-color: var(--gold-light);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #9c181c 0%, #7a0f12 60%, #660c0f 100%);
  color: #fff; padding: 18px 22px 30px;
}
.hero-wm {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  color: rgba(255,255,255,.06); font-size: 46px; font-weight: 800;
  white-space: nowrap; pointer-events: none; transform: rotate(-6deg);
}
.hero-wm span:last-child { font-size: 26px; letter-spacing: 8px; }
.hero-school { position: relative; font-size: 15px; font-weight: 700; }
.hero-school small { display: block; font-size: 11px; font-weight: 400; opacity: .8; margin-top: 2px; }
.hero-nav {
  position: relative; display: flex; justify-content: space-between;
  margin: 20px 0 26px; font-size: 14px; color: rgba(255,255,255,.85);
}
.hero-nav a { color: inherit; text-decoration: none; }
.hero-body { position: relative; }
.hero-badge { color: var(--gold-light); font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.hero-title { font-size: 32px; font-weight: 800; line-height: 1.3; letter-spacing: 1px; }
.hero-gold {
  font-size: 38px; font-weight: 800; color: var(--gold-light);
  margin: 6px 0 10px; letter-spacing: 2px;
}
.hero-sub { font-size: 15px; color: rgba(255,255,255,.88); margin-bottom: 24px; }
.btn {
  display: block; width: 100%; border: none; cursor: pointer;
  border-radius: 12px; height: 52px; line-height: 52px;
  font-size: 17px; font-weight: 700; text-align: center; text-decoration: none;
}
.btn-gold {
  background: var(--gold-grad); color: #5e3c12;
  box-shadow: 0 6px 16px rgba(201,156,70,.35);
}
.btn-gold:active { transform: scale(.98); }
.btn-ghost {
  background: rgba(255,253,247,.95); color: var(--red); margin-top: 14px;
  border: 1px solid rgba(255,255,255,.6);
}

/* ===== Section 通用 ===== */
.section { padding: 26px 18px 6px; }
.sec-label { color: var(--red-bright); font-size: 13px; font-weight: 700; }
.sec-title { font-size: 27px; font-weight: 800; color: var(--ink); margin: 4px 0 6px; }
.sec-sub { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 16px; }

/* ===== 播放器 ===== */
.player {
  position: relative; border-radius: 12px; overflow: hidden;
  border: 2px solid var(--red); background: #000; aspect-ratio: 16/9;
}
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(110,13,16,.55); display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
}
.player-play::before {
  content: ""; border-left: 18px solid rgba(255,255,255,.92);
  border-top: 11px solid transparent; border-bottom: 11px solid transparent;
  margin-left: 4px;
}
.tip-card {
  background: var(--card); border-radius: var(--radius); padding: 18px;
  margin-top: 16px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.tip-card h3 { font-size: 19px; color: var(--ink); margin-bottom: 10px; }
.tip-card p { font-size: 14.5px; color: #7a6f5c; white-space: pre-line; }

/* ===== 数据驾驶舱 ===== */
.heat-card {
  background: var(--red-card); color: #fff; border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.heat-card .k { font-size: 14px; opacity: .9; }
.heat-card .v { font-size: 40px; font-weight: 800; margin: 4px 0; }
.heat-card .n { font-size: 12.5px; opacity: .8; }
.metric-card {
  background: var(--card); border-radius: var(--radius); padding: 16px 18px;
  margin-top: 12px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.metric-card .k { font-size: 14px; color: var(--ink-soft); }
.metric-card .v { font-size: 34px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.metric-card .d { font-size: 12.5px; color: var(--ink-soft); }
.identity-card {
  background: var(--card); border-radius: var(--radius); padding: 18px;
  margin-top: 12px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.identity-card > .k { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.identity-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 14px; }
.identity-row:last-child { margin-bottom: 0; }
.identity-row .name { width: 42px; flex-shrink: 0; }
.identity-row .num { width: 78px; flex-shrink: 0; font-weight: 700; }
.bar { flex: 1; height: 9px; border-radius: 6px; background: #efe6cf; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--gold-light), var(--red-bright)); }

/* ===== 祝福表单 ===== */
.role-tabs {
  display: flex; background: #f3e8cf; border-radius: 12px; padding: 5px; margin-bottom: 18px;
}
.role-tabs button {
  flex: 1; border: none; background: transparent; height: 42px; border-radius: 9px;
  font-size: 16px; font-weight: 700; color: var(--ink-soft); cursor: pointer;
}
.role-tabs button.active { background: var(--red-card); color: #fff; box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px;
  background: var(--card); padding: 13px 14px; font-size: 15px; color: var(--ink);
  font-family: inherit; outline: none;
}
.field input:focus, .field textarea:focus { border-color: var(--gold); }
.field textarea { resize: none; height: 110px; }
.char-count { text-align: right; font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; }
.quick-list { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 18px; }
.quick-list button {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 22px;
  padding: 10px 16px; font-size: 14px; color: var(--ink); text-align: left; cursor: pointer;
}
.quick-list button:active { border-color: var(--gold); }
.btn-red {
  background: var(--red-card); color: #fff; height: 52px; line-height: 52px;
  box-shadow: 0 6px 16px rgba(122,15,18,.3);
}
.btn-red:active { transform: scale(.98); }

/* ===== 盲盒 ===== */
.blindbox-card {
  background: var(--card); border-radius: var(--radius); padding: 22px 18px;
  box-shadow: var(--shadow); border: 1px solid var(--line); text-align: center;
}
.envelope {
  width: 150px; height: 104px; margin: 8px auto 18px; position: relative;
}
.envelope .body {
  position: absolute; bottom: 0; width: 150px; height: 92px; border-radius: 8px;
  background:
    linear-gradient(to top right, transparent calc(50% - 1px), rgba(217,180,92,.8) 50%, transparent calc(50% + 1px)),
    linear-gradient(to top left, transparent calc(50% - 1px), rgba(217,180,92,.8) 50%, transparent calc(50% + 1px)),
    linear-gradient(135deg, #a81b1f, #7a0f12);
}
.envelope .lid {
  position: absolute; top: 0; left: 0; width: 110px; height: 46px; left: 20px;
  background: var(--gold-grad); border-radius: 6px; z-index: 2;
}
.blindbox-tip {
  border: 1.5px dashed var(--line); border-radius: 10px; padding: 14px;
  font-size: 15px; color: #7a6f5c; margin-bottom: 16px;
}
.blindbox-result {
  font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 14px; min-height: 26px;
}
.btn-outline {
  background: transparent; border: 1.5px solid var(--line); color: var(--red);
  height: 48px; line-height: 46px; margin-top: 10px; box-shadow: none;
}

/* ===== 观礼席灯泡矩阵 ===== */
.seat-board {
  background: var(--red-card); border-radius: var(--radius); padding: 18px 14px;
  display: grid; gap: 9px; box-shadow: var(--shadow);
}
.bulb {
  width: 100%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,235,180,.35), rgba(255,235,180,.08));
}
.bulb.lit {
  background: radial-gradient(circle at 35% 30%, #fff6d8, #f0d795 55%, #c99c46);
  box-shadow: 0 0 8px rgba(240,215,149,.8);
}

/* ===== 祝福墙 ===== */
.search-box {
  display: flex; align-items: center; gap: 8px; background: var(--card);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px;
}
.search-box input {
  flex: 1; border: none; outline: none; background: transparent; font-size: 14.5px; color: var(--ink);
}
.filter-tabs { display: flex; background: #f3e8cf; border-radius: 12px; padding: 5px; margin-bottom: 12px; }
.filter-tabs button {
  flex: 1; border: none; background: transparent; height: 40px; border-radius: 9px;
  font-size: 15px; font-weight: 700; color: var(--ink-soft); cursor: pointer;
}
.filter-tabs button.active { background: var(--red-card); color: #fff; }
.wall-total { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 12px; }
.blessing-card {
  position: relative; background: var(--card); border-radius: 12px; padding: 16px;
  margin-bottom: 12px; box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden;
}
.blessing-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--red-bright), var(--gold));
}
.blessing-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.role-pill {
  background: var(--red-card); color: #fff; font-size: 12px; font-weight: 700;
  padding: 3px 12px; border-radius: 14px;
}
.blessing-no { color: var(--gold); font-size: 13px; font-weight: 700; }
.blessing-name { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.blessing-content { font-size: 14.5px; color: #5d5446; }
.blessing-foot { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); }

/* ===== 底部固定栏 ===== */
.footer {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; height: 50px;
  background: linear-gradient(90deg, #7a0f12, #9c181c);
  color: var(--gold-light); display: flex; align-items: center; justify-content: center;
  font-size: 13px; gap: 8px; z-index: 20;
}
.footer::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-light); }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%);
  background: rgba(60,8,10,.92); color: #fff; padding: 11px 22px; border-radius: 24px;
  font-size: 14px; z-index: 80; max-width: 80%; text-align: center;
}
