:root {
  --bg: #050814;
  --panel: rgba(12, 20, 46, 0.92);
  --line: rgba(137, 175, 255, 0.38);
  --text: #eaf2ff;
  --cyan: #71f3ff;
  --pink: #ff7cc8;
  --mint: #80ffcb;
  --gold: #ffd781;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -5%, #41307d 0%, transparent 42%),
    radial-gradient(circle at 90% 110%, #124f74 0%, transparent 42%),
    var(--bg);
}

.cabinet {
  width: min(980px, 100%);
  border: 2px solid #365998;
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(9, 16, 40, 0.98), rgba(6, 10, 28, 0.98));
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(118, 243, 255, 0.18);
}

.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  font-size: 0.78rem;
  color: var(--gold);
}

h1 {
  margin: 6px 0 0;
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(113, 243, 255, 0.45);
}

.subtitle {
  margin: 8px 0 0;
  color: #b7c8f2;
}

.layout {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(230px, 280px);
  gap: 14px;
  align-items: start;
}

.playfield-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}

#game {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 1px solid rgba(147, 180, 255, 0.4);
  background: #070d20;
}

.status {
  margin: 10px 2px 2px;
  min-height: 1.3em;
  color: #ffd1eb;
  font-size: 0.92rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}

.stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  margin-bottom: 8px;
  border-radius: 10px;
  border: 1px solid rgba(138, 171, 245, 0.35);
  background: rgba(13, 24, 58, 0.95);
}

.stat span {
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-size: 0.72rem;
  color: #a2b7ea;
}

.stat strong {
  font-size: 1.03rem;
  color: #f6fbff;
}

.next-wrap {
  margin-top: 12px;
  border-radius: 10px;
  padding: 10px;
  border: 1px solid rgba(137, 170, 240, 0.34);
  background: rgba(13, 24, 56, 0.88);
}

.next-wrap p {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-size: 0.72rem;
  color: #a8bdf0;
}

#next {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  border: 1px solid rgba(138, 170, 245, 0.35);
  background: #081329;
}

.actions {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
  letter-spacing: 0.45px;
  cursor: pointer;
}

.primary {
  background: linear-gradient(180deg, #86ffd8, #4de0b7);
  color: #05332e;
}

.ghost {
  background: rgba(20, 32, 70, 0.96);
  border: 1px solid rgba(154, 182, 255, 0.38);
  color: #e0ecff;
}

.tips {
  margin: 12px 0 0;
  padding-left: 18px;
  color: #9cb2e4;
  font-size: 0.83rem;
  line-height: 1.4;
}

@media (max-width: 780px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .stat,
  .next-wrap,
  .actions,
  .tips {
    grid-column: 1 / -1;
  }
}
