:root {
  --bg: #06080e;
  --panel: rgba(4, 10, 23, 0.72);
  --line: rgba(102, 184, 255, 0.4);
  --text: #d6ecff;
  --muted: #8db2d9;
  --accent: #3da9fc;
  --win: #4cd964;
  --lose: #ff5f56;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(130deg, #04060b, #0b1224 52%, #050910);
  min-height: 100vh;
}

.kiosk-body::before,
.player-body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(3, 8, 20, 0.52), rgba(3, 8, 20, 0.7)), url("/assets/background.jpg");
  background-size: cover;
  background-position: center;
  z-index: -2;
}

.kiosk-body::after,
.player-body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 8%, rgba(61, 169, 252, 0.15), transparent 30%);
  z-index: -1;
}

.kiosk-body,
.player-body {
  display: grid;
  place-items: center;
}

.kiosk-shell,
.player-shell {
  width: min(1200px, 92vw);
}

.kiosk-shell {
  width: 100vw;
  min-height: 100dvh;
  padding: clamp(16px, 2vw, 28px);
}

.kiosk-shell .panel {
  min-height: calc(100dvh - 118px);
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  text-align: center;
  letter-spacing: 0.02em;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  padding: clamp(16px, 2.2vw, 32px);
}

.center,
.status {
  text-align: center;
}

.brand {
  max-width: min(560px, 66vw);
  width: 100%;
  height: auto;
  margin: 0 auto 14px;
  display: block;
}

.logo-brand {
  max-width: min(460px, 62vw);
}

.qr {
  margin: 16px auto;
  width: min(470px, 84vw);
  background: white;
  border-radius: 12px;
  padding: 14px;
}

.qr img {
  display: block;
  width: 100%;
  height: auto;
}

.subtle {
  color: var(--muted);
}

.start-copy {
  font-size: clamp(1.05rem, 2.2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.panel.idle-mode {
  background: transparent;
  border: none;
  box-shadow: none;
  padding-top: 0;
}

.kiosk-game {
  display: grid;
  gap: 16px;
}

.versus {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
}

.fighter {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  text-align: center;
  min-height: 220px;
}

.choice-icon {
  font-size: clamp(3rem, 8vw, 6rem);
  margin-top: 18px;
}

.choice-image {
  display: block;
  width: min(240px, 34vw);
  max-width: 100%;
  height: auto;
  margin: 18px auto 10px;
  border-radius: 14px;
  box-shadow: 0 0 26px rgba(156, 247, 255, 0.28);
}

.winner-outline {
  border: 3px solid var(--win);
  box-shadow: 0 0 0 4px rgba(76, 217, 100, 0.2);
}

.winner-banner {
  font-size: clamp(2.3rem, 5.5vw, 4.4rem);
  line-height: 1.05;
  margin: 6px 0 2px;
  color: #e8ffe9;
  text-shadow: 0 0 16px rgba(76, 217, 100, 0.4);
}

.winner-showcase {
  animation: winnerPulse 1s ease-in-out infinite;
}

.showcase-text {
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@keyframes winnerPulse {
  0%, 100% {
    transform: scale(1);
    text-shadow: 0 0 16px rgba(76, 217, 100, 0.4);
  }
  50% {
    transform: scale(1.03);
    text-shadow: 0 0 26px rgba(76, 217, 100, 0.75);
  }
}

.countdown {
  font-size: clamp(2.2rem, 7vw, 5rem);
  line-height: 1;
  text-align: center;
}

.player-form {
  display: grid;
  gap: 12px;
  max-width: 420px;
  margin: 0 auto;
}

input,
button {
  font: inherit;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 12px 14px;
}

input {
  color: #0b1224;
}

button {
  cursor: pointer;
  color: #041120;
  background: var(--accent);
  font-weight: 700;
  touch-action: manipulation;
}

.choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}

.choice-btn {
  min-height: 116px;
  background: rgba(61, 169, 252, 0.08);
  color: var(--text);
  border: 1px solid rgba(61, 169, 252, 0.26);
  display: grid;
  gap: 6px;
  place-items: center;
  padding: 8px;
  transition: transform 130ms ease, box-shadow 130ms ease, border-color 130ms ease;
}

.choice-btn:enabled:hover,
.choice-btn:enabled:active {
  transform: translateY(-1px);
  border-color: rgba(61, 169, 252, 0.45);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.choice-btn:enabled:active {
  transform: scale(0.99);
}

.choice-btn img {
  width: 100%;
  max-width: 90px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(156, 247, 255, 0.16);
}

.choice-label {
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.choice-btn.is-selected {
  border: 3px solid var(--win);
  box-shadow: 0 0 0 4px rgba(76, 217, 100, 0.25), 0 0 24px rgba(76, 217, 100, 0.22);
  background: linear-gradient(180deg, rgba(76, 217, 100, 0.24), rgba(61, 169, 252, 0.12));
}

.restart-btn {
  min-width: 220px;
  margin: 8px 0 4px;
  font-size: 1.1rem;
  background: linear-gradient(90deg, #3da9fc, #6ff8ff);
  color: #061224;
}

.restart-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.close-btn {
  margin-top: 8px;
  background: linear-gradient(90deg, #9ac8ff, #d7e8ff);
}

.restart-instruction {
  font-size: clamp(1.25rem, 5.2vw, 2rem);
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.small-count {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.result-win { color: var(--win); }
.result-lose { color: var(--lose); }

@media (max-width: 760px) {
  .versus {
    grid-template-columns: 1fr;
  }
  .player-shell { width: min(640px, 96vw); }
  .choices { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .choice-btn { min-height: 106px; padding: 6px; }
  .choice-btn img { max-width: 72px; }
  .choice-label { font-size: 0.8rem; }
}
