:root {
  --bg: #101318;
  --panel: #171b22;
  --line: #303743;
  --text: #f8fbff;
  --muted: #aeb8c5;
  --gold: #f3c766;
  --green: #67d1b0;
  --red: #ef6b68;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--gold);
}

.game-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.game-nav,
.game-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.game-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
}

.game-nav a {
  text-decoration: none;
  font-weight: 700;
}

.game-nav div {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 14px;
}

.game-stage {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

.game-panel,
.side-panel,
.lobby-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.game-panel {
  min-height: 650px;
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.game-title {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 14px;
}

.game-title h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.game-title p {
  margin: 10px 0 0;
  color: var(--muted);
}

.tag {
  padding: 7px 10px;
  border-radius: 999px;
  color: #101318;
  background: var(--gold);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.playfield {
  position: relative;
  flex: 1;
  min-height: 420px;
  overflow: hidden;
  border-radius: 8px;
  background: #0c0f14;
}

.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #101318;
  background: var(--gold);
  font-weight: 800;
  cursor: pointer;
}

button.secondary {
  color: var(--text);
  background: #2a3039;
}

.side-panel {
  padding: 18px;
}

.meter {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.meter div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.meter span {
  color: var(--muted);
}

.meter strong {
  font-size: 22px;
}

.status {
  min-height: 84px;
  padding: 14px;
  border-radius: 8px;
  background: #222832;
  color: #dbe4ee;
}

.track {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0 60%, rgba(243, 199, 102, 0.18) 60% 63%, transparent 63%),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: auto, 80px 100%;
}

.runner {
  position: absolute;
  left: 12%;
  bottom: 72px;
  width: 54px;
  height: 92px;
  border-radius: 28px 28px 12px 12px;
  background: var(--gold);
  transition: bottom 0.22s ease-out;
}

.runner::before {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  left: 10px;
  top: -28px;
  background: #ffffff;
}

.runner.is-jumping {
  bottom: 190px;
}

.obstacle {
  position: absolute;
  right: 12%;
  bottom: 72px;
  width: 38px;
  height: 82px;
  border-radius: 8px 8px 0 0;
  background: var(--red);
  transition: right 0.95s linear;
}

.obstacle.is-moving {
  right: 84%;
}

.slot-window {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 24px;
  background: radial-gradient(circle at 50% 35%, rgba(243, 199, 102, 0.18), transparent 34%), #0c0f14;
}

.slot-reels {
  display: grid;
  grid-template-columns: repeat(3, minmax(74px, 140px));
  gap: 12px;
}

.slot-reels span {
  display: grid;
  min-height: 150px;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff5dc, #dfb75a 48%, #4a2619);
  color: #17100b;
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 900;
}

.pots-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 14px;
  height: 100%;
  align-content: center;
}

.pot {
  min-height: 230px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  padding: 14px;
  background: #222832;
  text-align: center;
}

.pot-visual {
  width: 86px;
  height: 104px;
  margin: 18px auto;
  border-radius: 14px 14px 46px 46px;
  background: var(--gold);
  box-shadow: inset 0 -16px 0 rgba(0,0,0,0.16);
}

.pot.is-ready .pot-visual {
  background: var(--green);
}

.gem-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(74px, 120px));
  gap: 12px;
}

.gem-grid span {
  display: grid;
  min-height: 110px;
  place-items: center;
  border-radius: 8px;
  background: #232a34;
  font-size: 36px;
  font-weight: 900;
}

.lobby-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 42px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.lobby-card {
  min-height: 220px;
  padding: 18px;
  color: var(--text);
  text-decoration: none;
}

.lobby-card strong,
.lobby-card span {
  display: block;
}

.lobby-card strong {
  font-size: 26px;
}

.lobby-card span {
  margin-top: 10px;
  color: var(--muted);
}

.game-footer {
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding: 24px 0 34px;
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .game-stage,
  .lobby-grid {
    grid-template-columns: 1fr;
  }

  .game-panel {
    min-height: auto;
  }

  .pots-grid {
    grid-template-columns: 1fr;
  }
}
