/* design-system · Arcade 主题（H5 版，源 ~/design-system/tokens.wxss） */
:root {
  --bg: #131629;
  --card: rgba(255, 255, 255, .055);
  --line: rgba(255, 255, 255, .12);
  --ink: #f5f6ff;
  --sub: #9aa0bf;
  --gold: #ffcc4d;
  --gold-ink: #241303;
  --cyan: #57e6ff;
  --danger: #ff7043;
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(120% 55% at 50% 0%, rgba(255, 204, 77, .14), transparent 60%),
    radial-gradient(100% 50% at 50% 100%, rgba(87, 230, 255, .10), transparent 65%);
  background-attachment: fixed;
  color: var(--ink);
  display: flex; justify-content: center; min-height: 100vh;
}
#app { width: 100%; max-width: 560px; padding: 24px 16px; }
.screen { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.kicker { font-size: 11px; font-weight: 800; letter-spacing: .22em; color: var(--cyan); }
.mono, .code { font-family: ui-monospace, Menlo, Consolas, monospace; }
h1 { margin-bottom: 12px; letter-spacing: 2px; font-weight: 800; }
h2 { color: var(--sub); }
button {
  font-size: 16px; padding: 12px 28px; border: none; border-radius: 14px;
  background: var(--card); color: var(--ink); cursor: pointer;
  transition: transform 150ms var(--ease-spring);
}
button.primary {
  background: var(--gold); color: var(--gold-ink); font-weight: 800;
  box-shadow: 0 8px 26px rgba(255, 157, 67, .4);
}
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--sub); }
button:active { transform: scale(.97); }
.join-row { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 320px; }
.join-row input {
  flex: 1; font-size: 20px; letter-spacing: 6px; text-align: center; text-transform: uppercase;
  padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.join-row input.id-input { font-size: 14px; letter-spacing: 2px; color: var(--sub); }
.join-submit { width: 100%; max-width: 320px; }
.code {
  font-size: 44px; font-weight: 800; letter-spacing: 12px; color: var(--gold);
  text-shadow: 0 0 18px rgba(255, 204, 77, .45);
  padding: 16px 24px; border: 2px solid rgba(255, 204, 77, .45); border-radius: 18px; background: var(--card);
}
.hint { color: var(--sub); font-size: 14px; }
.hint b { color: var(--gold); }
#status { font-size: 17px; min-height: 24px; }
#banner {
  background: rgba(255, 112, 67, .14); border: 1px solid rgba(255, 112, 67, .4);
  color: #ff8a70; padding: 6px 14px; border-radius: 10px; font-size: 14px;
}

/* VS 横幅：回合方辉光呼吸 */
.vs {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 18px;
}
.vs .p { display: flex; align-items: center; gap: 8px; border-radius: 12px; padding: 2px 6px; }
.vs .pa {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800;
}
.vs .me .pa { background: rgba(255, 204, 77, .18); color: var(--gold); }
.vs .op .pa { background: rgba(87, 230, 255, .15); color: var(--cyan); }
.vs .pi { font-size: 12px; color: var(--sub); font-family: ui-monospace, Menlo, monospace; }
.vs .v { font-size: 13px; font-weight: 800; color: var(--sub); font-family: ui-monospace, monospace; }
.vs .me.act { animation: glowMe 2s ease-in-out infinite; }
.vs .op.act { animation: glowOp 2s ease-in-out infinite; }
@keyframes glowMe { 0%, 100% { box-shadow: 0 0 0 rgba(255, 204, 77, 0); } 50% { box-shadow: 0 0 14px rgba(255, 204, 77, .4); } }
@keyframes glowOp { 0%, 100% { box-shadow: 0 0 0 rgba(87, 230, 255, 0); } 50% { box-shadow: 0 0 14px rgba(87, 230, 255, .35); } }

.board-wrap { width: 100%; display: flex; justify-content: center; }
canvas { touch-action: manipulation; border-radius: 14px; box-shadow: 0 8px 32px rgba(0, 0, 0, .55); }
#overlay {
  position: fixed; inset: 0; background: rgba(19, 22, 41, .82);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  animation: fadein .2s ease-out;
}
@keyframes fadein { from { opacity: 0; } }
#result { font-size: 38px; font-weight: 800; letter-spacing: 2px; }
.hidden { display: none !important; }
