:root {
  --bg: #07111f;
  --bg-alt: #101a2c;
  --panel: rgba(12, 20, 35, 0.86);
  --line: rgba(122, 164, 255, 0.18);
  --text: #edf4ff;
  --muted: #96a9d1;
  --cyan: #56e4ff;
  --blue: #7a8fff;
  --pink: #ff6ea8;
  --danger: #ff6b6b;
  --gold: #ffd55c;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.38);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(86, 228, 255, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(255, 110, 168, 0.12), transparent 32%),
    linear-gradient(180deg, #06111e, #0d1728 42%, #08111f);
}
button { font: inherit; }
.app-shell {
  width: min(920px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 18px 0 44px;
  display: grid;
  gap: 14px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}
.glow {
  position: relative;
  overflow: hidden;
}
.glow::after {
  content: "";
  position: absolute;
  inset: -20% auto auto -10%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(86, 228, 255, 0.18), transparent 65%);
  pointer-events: none;
}
.hero-top, .section-title-row, .status-grid, .result-stats, .result-actions, .action-grid, .meta-strip, .players {
  display: flex;
  gap: 12px;
}
.hero-top, .section-title-row { justify-content: space-between; align-items: flex-start; }
.eyebrow {
  margin: 0 0 6px;
  color: var(--cyan);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(32px, 8vw, 54px); line-height: 1; margin-bottom: 8px; }
.subtitle { color: var(--muted); line-height: 1.7; max-width: 32rem; }
.score-box, .status-item, .meta-pill, .player-card, .claim-card, .you-card, .hint-box, .feed-item, .help-card li {
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.035);
}
.score-box {
  min-width: 110px;
  padding: 12px;
  border-radius: 18px;
  text-align: center;
}
.score-box span, .status-item span, .claim-label, .timer-label, .player-meta, .feed-item small, .result-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.score-box strong { font-size: 36px; color: var(--gold); }
.meta-strip { flex-wrap: wrap; margin-top: 14px; }
.meta-pill {
  padding: 10px 12px;
  border-radius: 999px;
  color: #dce7ff;
  font-size: 14px;
}
.status-panel {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 12px;
}
.timer-wrap {
  border-radius: 18px;
  background: rgba(255,255,255,0.035);
  padding: 14px;
}
.timer-row { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 10px; }
.timer-row strong { font-size: 42px; color: var(--gold); }
.timer-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
#timerFill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--pink));
}
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.status-item {
  border-radius: 18px;
  padding: 14px;
  text-align: center;
}
.status-item strong { font-size: 28px; }
.players { flex-wrap: wrap; margin: 14px 0; }
.player-card {
  flex: 1 1 180px;
  min-width: 0;
  border-radius: 18px;
  padding: 14px;
}
.player-card.you { outline: 1px solid rgba(86,228,255,0.55); }
.player-header { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.player-name { font-weight: 700; }
.player-emotion { font-size: 20px; }
.player-meta { margin-top: 10px; line-height: 1.7; }
.claim-card {
  border-radius: 20px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(122,143,255,0.18), rgba(255,110,168,0.12));
}
.claim-main {
  margin: 8px 0;
  font-size: clamp(28px, 8vw, 42px);
  font-weight: 800;
}
#claimSpeaker { color: #dbe5ff; line-height: 1.7; }
.you-card {
  margin-top: 12px;
  border-radius: 18px;
  padding: 16px;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.dice-row { display:flex; flex-wrap:wrap; gap:10px; }
.die {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 26px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
}
.action-grid { margin-top: 14px; }
.action-btn {
  flex: 1;
  border: none;
  border-radius: 18px;
  padding: 15px 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}
.action-btn:active { transform: scale(.98); }
.action-btn:disabled { opacity: .5; cursor: not-allowed; }
.primary { color: #04131d; background: linear-gradient(135deg, var(--cyan), var(--blue)); }
.danger { color: white; background: linear-gradient(135deg, #ff856a, #ff4d7c); }
.secondary { color: white; background: linear-gradient(135deg, rgba(122,143,255,0.45), rgba(255,110,168,0.45)); }
.ghost-btn {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  color: var(--text);
  background: rgba(255,255,255,0.05);
  padding: 8px 12px;
}
.hint-box {
  margin-top: 12px;
  padding: 14px;
  border-radius: 16px;
  color: #dfe8ff;
  line-height: 1.7;
}
.feed { margin-top: 12px; display: grid; gap: 10px; }
.feed-item {
  padding: 13px 14px;
  border-radius: 16px;
  line-height: 1.65;
}
.feed-item strong { color: var(--gold); }
.overlay {
  position: fixed;
  inset: 0;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 9, 18, 0.72);
  z-index: 30;
}
.hidden { display: none; }
.result-card, .help-card { width: min(560px, 100%); }
.result-desc { color: var(--muted); line-height: 1.7; margin: 12px 0 18px; }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.result-stats div {
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
}
.result-stats strong { display:block; margin-top: 6px; font-size: 20px; }
.help-card ol { padding-left: 18px; margin: 12px 0 0; display:grid; gap:10px; color:#dce6ff; line-height:1.7; }
@media (max-width: 760px) {
  .app-shell { width: min(100vw - 14px, 560px); }
  .status-panel { grid-template-columns: 1fr; }
  .status-grid { grid-template-columns: repeat(3, 1fr); }
  .action-grid, .result-actions, .hero-top { flex-direction: column; }
  .score-box { width: 100%; }
}
