/* ABOUTME: 马斯克现场摇摆 · 深夜综艺舞台风格主题样式 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* 舞台配色 */
  --stage-black: #14110e;
  --stage-deep: #1d1915;
  --spotlight: #dcb96a;
  --spotlight-soft: rgba(220, 185, 106, 0.16);
  --gold-light: #f0d9a6;
  --gold-deep: #c9a24d;
  --cream: #fff6e8;
  --muted: #b8a99a;
  --vote-red: #ff5d5d;
  --vote-blue: #4d9fff;
  --line: rgba(255, 246, 232, 0.12);
  --track: rgba(255, 246, 232, 0.09);

  /* 字体 */
  --font-display: 'Bungee', 'Outfit', sans-serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  --ease-out: cubic-bezier(0.22, 0.8, 0.36, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--stage-black);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- 舞台氛围层 ---------- */

.spotlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* 唯一光源：顶部聚光灯光晕，呼吸式脉动 */
.spotlight::before {
  content: '';
  position: absolute;
  top: -22%;
  left: 50%;
  width: min(1100px, 130vw);
  height: 62vh;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(220, 185, 106, 0.2) 0%,
    rgba(220, 185, 106, 0.07) 38%,
    transparent 68%
  );
  filter: blur(30px);
  animation: breathe 3.5s ease-in-out infinite alternate;
}

@keyframes breathe {
  from {
    opacity: 0.55;
    transform: translateX(-50%) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1.04);
  }
}

/* 极低透明度噪点纹理 */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* ---------- 顶部跑马灯票根条 ---------- */

.ticker {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-bottom: 1px dashed var(--line);
  background: rgba(220, 185, 106, 0.06);
  padding: 9px 0;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 26s linear infinite;
}

.ticker-group {
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.ticker-group span {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--spotlight);
}

.ticker-group i {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  margin: 0 18px;
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ---------- 版心 ---------- */

.stage {
  position: relative;
  z-index: 2;
  max-width: 880px;
  margin: 0 auto;
  padding: 52px 22px 64px;
}

/* ---------- 节目单标题 ---------- */

.show-header {
  text-align: center;
  margin-bottom: 30px;
}

.show-kicker {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 18px;
  margin-bottom: 20px;
  background: rgba(255, 246, 232, 0.03);
}

.show-title {
  position: relative;
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 6.4vw, 58px);
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--cream);
  text-shadow: 0 4px 22px rgba(0, 0, 0, 0.5);
}

.spot-text {
  /* 鎏金渐变字：浅金到深金的金属质感 */
  background: linear-gradient(
    180deg,
    var(--gold-light) 0%,
    var(--spotlight) 55%,
    var(--gold-deep) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 标题贴纸角标 */
.title-sticker {
  position: absolute;
  top: -16px;
  right: -64px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--stage-black);
  background: var(--spotlight);
  padding: 5px 12px;
  border-radius: 4px;
  transform: rotate(7deg);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.show-sub {
  margin-top: 14px;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- 舞台大屏：视频 ---------- */

.video-card {
  position: relative;
  max-width: 780px;
  margin: 0 auto 36px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.55),
    0 8px 24px rgba(0, 0, 0, 0.4);
}

.video-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
}

/* 轻量声音提示：静音自动播放时的取消静音入口 */
.sound-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--cream);
  background: rgba(20, 17, 14, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition:
    background 0.25s ease,
    transform 0.25s var(--ease-out);
}

.sound-hint:hover {
  background: rgba(20, 17, 14, 0.92);
  transform: translateY(-2px);
}

.sound-hint:focus-visible {
  outline: 2px solid var(--spotlight);
  outline-offset: 3px;
}

.sound-hint svg {
  display: block;
}

.sound-hint.is-hidden {
  display: none;
}

/* ---------- 观众举牌互动：投票 ---------- */

.poll {
  max-width: 640px;
  margin: 0 auto;
  background: var(--stage-deep);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.poll-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(17px, 3vw, 22px);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.poll-hint {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 24px;
}

/* 投票按钮 */
.poll-options {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.vote-btn {
  flex: 1 1 220px;
  max-width: 280px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: transparent;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    background 0.28s var(--ease-out),
    color 0.28s var(--ease-out),
    transform 0.28s var(--ease-out),
    box-shadow 0.28s var(--ease-out);
}

.vote-btn .opt-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  font-size: 13px;
  font-weight: 900;
  flex-shrink: 0;
}

.vote-btn:hover {
  transform: translateY(-3px);
}

.vote-btn:active {
  transform: translateY(0) scale(0.96);
}

.vote-btn:focus-visible {
  outline: 2px solid var(--spotlight);
  outline-offset: 3px;
}

.vote-a {
  border-color: var(--vote-red);
  color: var(--vote-red);
}

.vote-a:hover {
  background: var(--vote-red);
  color: var(--stage-black);
  box-shadow: 0 10px 26px rgba(255, 93, 93, 0.32);
}

.vote-b {
  border-color: var(--vote-blue);
  color: var(--vote-blue);
}

.vote-b:hover {
  background: var(--vote-blue);
  color: var(--stage-black);
  box-shadow: 0 10px 26px rgba(77, 159, 255, 0.32);
}

/* 投票结果 */
.poll-results {
  text-align: left;
}

.vote-badge {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--spotlight);
  border: 1px solid rgba(220, 185, 106, 0.5);
  background: rgba(220, 185, 106, 0.1);
  border-radius: 999px;
  padding: 6px 16px;
  margin: 0 0 22px;
}

.result-row {
  margin-bottom: 18px;
  transition: opacity 0.4s ease;
}

.result-row.is-user {
  opacity: 1;
}

.result-row.is-other {
  opacity: 0.62;
}

.result-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 7px;
  font-size: 14.5px;
}

.result-label {
  color: var(--cream);
  font-weight: 500;
}

.result-percent {
  font-weight: 900;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.result-row[data-option='A'] .result-percent {
  color: var(--vote-red);
}

.result-row[data-option='B'] .result-percent {
  color: var(--vote-blue);
}

.result-track {
  width: 100%;
  height: 13px;
  background: var(--track);
  border-radius: 999px;
  overflow: hidden;
}

.result-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 1.2s var(--ease-out);
}

.fill-a {
  background: var(--vote-red);
}

.fill-b {
  background: var(--vote-blue);
}

.result-total {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.result-total strong {
  color: var(--spotlight);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.revote-btn {
  display: block;
  margin: 16px auto 0;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(184, 169, 154, 0.5);
  cursor: pointer;
  transition: color 0.25s ease;
}

.revote-btn:hover {
  color: var(--cream);
}

/* ---------- 观众留言墙：评论区 ---------- */

.comments {
  max-width: 640px;
  margin: 44px auto 0;
  text-align: left;
}

.comments-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(17px, 3vw, 22px);
  letter-spacing: 0.02em;
  text-align: center;
  margin-bottom: 6px;
}

.comments-hint {
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 20px;
}

.nickname-input,
.comment-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--cream);
  background: rgba(255, 246, 232, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.nickname-input {
  margin-bottom: 10px;
}

.comment-input {
  resize: vertical;
  min-height: 76px;
  line-height: 1.6;
}

.nickname-input::placeholder,
.comment-input::placeholder {
  color: rgba(184, 169, 154, 0.7);
}

.nickname-input:focus,
.comment-input:focus {
  outline: none;
  border-color: var(--spotlight);
  background: rgba(255, 246, 232, 0.06);
}

.comment-form-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.char-count {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.comment-submit {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--stage-black);
  background: var(--spotlight);
  border: none;
  border-radius: 999px;
  padding: 9px 24px;
  cursor: pointer;
  transition:
    background 0.25s var(--ease-out),
    transform 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out);
}

.comment-submit:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(220, 185, 106, 0.25);
}

.comment-submit:active {
  transform: translateY(0) scale(0.97);
}

.comment-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.comment-submit:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

.comment-status {
  margin-top: 12px;
  font-size: 13px;
  text-align: center;
  border-radius: 10px;
  padding: 8px 14px;
}

.comment-status.is-ok {
  color: var(--gold-light);
  background: rgba(220, 185, 106, 0.1);
  border: 1px solid rgba(220, 185, 106, 0.4);
}

.comment-status.is-error {
  color: var(--vote-red);
  background: rgba(255, 93, 93, 0.08);
  border: 1px solid rgba(255, 93, 93, 0.4);
}

.comment-list {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comments-note {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 14px 0;
}

.comment-item {
  display: flex;
  gap: 12px;
  background: rgba(255, 246, 232, 0.03);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
}

.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
  color: var(--stage-black);
  background: linear-gradient(160deg, var(--gold-light), var(--gold-deep));
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 3px;
}

.comment-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--spotlight);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comment-time {
  font-size: 11.5px;
  color: var(--muted);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.comment-text {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--cream);
  word-break: break-word;
  white-space: pre-wrap;
}

/* ---------- 页脚 ---------- */

.stage-footer {
  margin-top: 44px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.footer-emoji {
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.28em;
  color: rgba(184, 169, 154, 0.65);
}

/* ---------- 彩带纸屑 ---------- */

.confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

/* ---------- 入场动画 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  animation: reveal-in 0.85s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes reveal-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- 响应式 ---------- */

@media (max-width: 620px) {
  .stage {
    padding: 38px 16px 52px;
  }

  .title-sticker {
    right: -10px;
    top: -26px;
    font-size: 13px;
  }

  .poll {
    padding: 26px 18px;
  }

  .vote-btn {
    flex: 1 1 100%;
    max-width: none;
  }
}

/* ---------- 无障碍：动效降级 ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
