:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #111317;
  color: #f7f5eb;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 199, 64, 0.2), transparent 28%),
    radial-gradient(circle at 88% 80%, rgba(37, 207, 188, 0.16), transparent 30%),
    linear-gradient(135deg, #15171d 0%, #22222a 48%, #151719 100%);
}

button,
input {
  font: inherit;
}

.app {
  width: min(1180px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(320px, 680px) minmax(280px, 1fr);
  gap: 22px;
  align-items: center;
}

.game-shell {
  min-height: 720px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(16, 18, 24, 0.82);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.topbar > div {
  padding: 14px 16px;
  background: #181c23;
}

.label {
  display: block;
  color: #a7b0b3;
  font-size: 11px;
  letter-spacing: 0;
  margin-bottom: 4px;
}

.topbar strong {
  font-size: clamp(20px, 4vw, 30px);
  color: #ffd15d;
  line-height: 1;
}

#game {
  min-height: 510px;
  background: #080a0e;
}

#game canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.panel {
  padding: 14px;
  background: #181c23;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.controls {
  display: grid;
  grid-template-columns: 44px minmax(72px, 1fr) 44px 58px minmax(112px, 1.35fr);
  gap: 8px;
}

button,
input {
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f7f5eb;
  background: #242b31;
}

button {
  cursor: pointer;
  font-weight: 800;
}

button:disabled {
  cursor: not-allowed;
  color: #778086;
  background: #1a1f24;
}

button:not(:disabled):active {
  transform: translateY(1px);
}

input {
  width: 100%;
  padding: 0 10px;
  text-align: center;
  color: #ffd15d;
  font-weight: 800;
}

.spin {
  background: linear-gradient(180deg, #ffda62, #f68b22);
  color: #171717;
  border: 0;
  box-shadow: 0 10px 24px rgba(246, 139, 34, 0.3);
}

.message {
  min-height: 28px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  color: #cbd4d7;
  font-size: 13px;
}

.feature-panel {
  padding: 26px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.feature-panel h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 0.96;
}

.feature-panel p {
  color: #cbd4d7;
}

.feature-panel ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.feature-panel li {
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #dce4e6;
}

.feature-panel b {
  color: #65e1d4;
}

@media (max-width: 820px) {
  body {
    overflow: hidden;
  }

  .app {
    min-height: 100svh;
    padding: 8px;
    display: block;
  }

  .game-shell {
    height: calc(100svh - 16px);
    min-height: 0;
  }

  .topbar > div {
    padding: 10px 9px;
  }

  .label {
    font-size: 10px;
  }

  #game {
    min-height: 0;
  }

  .panel {
    padding: 10px;
  }

  .controls {
    grid-template-columns: 38px minmax(64px, 1fr) 38px 52px minmax(88px, 1.35fr);
    gap: 6px;
  }

  button,
  input {
    min-height: 40px;
    border-radius: 7px;
  }

  .message {
    font-size: 12px;
    line-height: 1.25;
  }

  .feature-panel {
    display: none;
  }
}
