/* Hangul Beat Rush — K-pop rhythm stage shell */

:root {
  --bg: #0a0014;
  --ink: #ffffff;
  --muted: #d6c6ff;
  --magenta: #ff3cac;
  --blue: #00d4ff;
  --yellow: #ffeb3b;
  --pink-soft: rgba(255, 60, 172, 0.18);
  --blue-soft: rgba(0, 212, 255, 0.16);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: radial-gradient(ellipse at top, #1a002b 0%, var(--bg) 55%, #02000a 100%);
  color: var(--ink);
  font-family: "Noto Sans KR", system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* 무대 조명 — 펄스 애니메이션 */
.stage-lights {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.light {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: pulse 3.6s ease-in-out infinite;
}

.light-magenta {
  width: 480px; height: 480px;
  background: var(--magenta);
  top: -120px; left: -120px;
}

.light-blue {
  width: 520px; height: 520px;
  background: var(--blue);
  top: -100px; right: -160px;
  animation-delay: -1.2s;
}

.light-yellow {
  width: 420px; height: 420px;
  background: var(--yellow);
  bottom: -180px; left: 30%;
  animation-delay: -2.4s;
  opacity: 0.32;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50%      { transform: scale(1.12); opacity: 0.75; }
}

.stage {
  position: relative;
  z-index: 1;
  width: min(820px, calc(100% - 24px));
  margin: 0 auto;
  padding: 28px 0 36px;
  display: grid;
  gap: 18px;
}

/* TOP BAR */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

.show-id { text-align: center; }

.show-id-eyebrow {
  display: block;
  font-family: "Bebas Neue", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.35em;
  color: var(--magenta);
  margin-bottom: 4px;
  text-shadow: 0 0 12px rgba(255, 60, 172, 0.65);
}

.show-id h1 {
  margin: 0;
  font-family: "Black Han Sans", sans-serif;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  letter-spacing: 0.04em;
  color: var(--ink);
  text-shadow:
    0 0 10px rgba(0, 212, 255, 0.6),
    0 0 30px rgba(255, 60, 172, 0.5);
}

.hud-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(8, 0, 24, 0.6);
  backdrop-filter: blur(8px);
  min-width: 88px;
}

.hud-pill span {
  font-family: "Bebas Neue", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.hud-pill strong {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--yellow);
}

/* COMBO BAR */
.combo-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(8, 0, 24, 0.55);
  border: 1px solid rgba(255, 60, 172, 0.25);
  backdrop-filter: blur(8px);
}

.combo-meta { display: flex; flex-direction: column; align-items: flex-start; }
.combo-meta-right { align-items: flex-end; }

.combo-label {
  font-family: "Bebas Neue", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  color: var(--muted);
}

.combo-meta strong {
  font-family: "Black Han Sans", sans-serif;
  font-size: 2rem;
  line-height: 1;
  color: var(--magenta);
  text-shadow: 0 0 14px rgba(255, 60, 172, 0.7);
}

.combo-meta-right strong {
  color: var(--blue);
  text-shadow: 0 0 14px rgba(0, 212, 255, 0.7);
}

.heat-track {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.heat-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--magenta), var(--yellow));
  transition: width 140ms ease;
  box-shadow: 0 0 14px rgba(255, 60, 172, 0.5);
}

/* CURRENT WORD — 무대 중앙 */
.word-stage {
  text-align: center;
  padding: 40px 12px 28px;
  border-radius: 28px;
  background:
    radial-gradient(ellipse at center, rgba(255, 60, 172, 0.22), transparent 70%),
    rgba(10, 0, 22, 0.55);
  border: 1px solid rgba(255, 60, 172, 0.3);
  position: relative;
  overflow: hidden;
}

.word-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 50%, rgba(0, 212, 255, 0.18), transparent 50%),
    radial-gradient(circle at 70% 50%, rgba(255, 235, 59, 0.12), transparent 50%);
  pointer-events: none;
}

#current-word {
  position: relative;
  display: block;
  margin: 0 0 10px;
  font-family: "Black Han Sans", sans-serif;
  font-size: clamp(3.2rem, 12vw, 6.5rem);
  line-height: 1;
  color: var(--ink);
  text-shadow:
    0 0 14px rgba(255, 60, 172, 0.75),
    0 0 40px rgba(0, 212, 255, 0.5);
}

#current-hint {
  position: relative;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* QUEUE */
.queue {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.queue-item {
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(0, 212, 255, 0.06);
  border: 1px solid rgba(0, 212, 255, 0.25);
  text-align: center;
}

.queue-item span {
  display: block;
  font-family: "Bebas Neue", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  color: var(--blue);
  margin-bottom: 4px;
}

.queue-item strong {
  font-family: "Black Han Sans", sans-serif;
  font-size: clamp(1.4rem, 4.5vw, 2rem);
  color: var(--ink);
}

/* INPUT */
.input-wrap { display: block; }

#typing-input {
  width: 100%;
  min-height: 68px;
  padding: 0 24px;
  border-radius: 18px;
  border: 2px solid rgba(255, 60, 172, 0.5);
  background: rgba(0, 0, 0, 0.55);
  color: var(--ink);
  font-family: "Black Han Sans", "Noto Sans KR", sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  text-align: center;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

#typing-input::placeholder { color: rgba(214, 198, 255, 0.5); }

#typing-input:focus {
  outline: none;
  border-color: var(--magenta);
  box-shadow: 0 0 28px rgba(255, 60, 172, 0.55);
}

/* BUTTONS */
.button-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.button-row button {
  min-height: 50px;
  padding: 0 28px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.2em;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.primary {
  background: linear-gradient(135deg, var(--magenta), var(--blue));
  color: var(--ink);
  box-shadow: 0 8px 28px rgba(255, 60, 172, 0.5);
}

.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 36px rgba(255, 60, 172, 0.7); }

.ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--ink);
}

/* FOOTER CHIPS */
.footer-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.chip {
  padding: 10px 12px;
  text-align: center;
  border-radius: 14px;
  background: rgba(8, 0, 24, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.chip span {
  display: block;
  font-family: "Bebas Neue", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.chip strong {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.4rem;
  color: var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (max-width: 640px) {
  .stage { padding: 18px 0 24px; gap: 14px; }
  .topbar { grid-template-columns: 1fr; gap: 8px; }
  .hud-pill { flex-direction: row; gap: 8px; padding: 8px 14px; }
  .combo-bar { padding: 10px 14px; }
  .footer-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
