:root {
  --panel: rgba(255, 255, 255, 0.9);
  --text: #1f2340;
  --muted: #5e6286;
  --accent: #ff7a18;
  --accent-strong: #ff477e;
  --accent-soft: #ffe29a;
  --success: #20b26b;
  --danger: #ff5f6d;
  --info: #3b82f6;
  --shadow: 0 18px 40px rgba(66, 52, 139, 0.18);
  font-family: "Rubik", "Assistant", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 225, 120, 0.85), transparent 24%),
    radial-gradient(circle at 80% 20%, rgba(255, 108, 168, 0.38), transparent 26%),
    radial-gradient(circle at bottom right, rgba(75, 192, 255, 0.35), transparent 28%),
    linear-gradient(135deg, #fff8cc 0%, #ffd8e8 45%, #d6f0ff 100%);
  color: var(--text);
}

.game-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero,
.status-panel,
.message-bar,
.actions,
.board-wrap {
  margin-bottom: 20px;
}

.hero {
  background: var(--panel);
  border: 1px solid rgba(255, 122, 24, 0.18);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4.6rem);
  line-height: 0.95;
}

.subtitle {
  margin: 16px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.status-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.status-card {
  background: var(--panel);
  border-radius: 22px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.best-time-card {
  background: linear-gradient(135deg, #e6fbff 0%, #dff7e7 100%);
}

.status-card strong {
  font-size: clamp(1.4rem, 4vw, 2.4rem);
}

.status-label {
  color: var(--muted);
  margin-bottom: 8px;
}

.target-card {
  background: linear-gradient(135deg, #fff0b5 0%, #ffd1e6 100%);
}

.message-bar {
  background: linear-gradient(135deg, #4338ca 0%, #2563eb 100%);
  color: #f8fbff;
  border-radius: 20px;
  padding: 16px 20px;
  font-size: 1rem;
  line-height: 1.6;
  box-shadow: var(--shadow);
}

.actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button {
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
  box-shadow: 0 14px 26px rgba(255, 71, 126, 0.28);
}

.ghost-button {
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.ghost-button {
  border: 1px dashed rgba(255, 95, 109, 0.45);
  background: rgba(255, 255, 255, 0.9);
  color: var(--danger);
  box-shadow: 0 10px 20px rgba(255, 95, 109, 0.12);
}

.primary-button:hover {
  transform: translateY(-2px);
}

.ghost-button:hover {
  transform: translateY(-2px);
}

.skip-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.skip-note {
  color: var(--muted);
  font-size: 0.94rem;
  max-width: 260px;
}

.number-board {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(59, 130, 246, 0.16);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(10, minmax(0, 1fr));
}

.number-cell {
  min-height: 58px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #fff7fb 100%);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  font-size: clamp(0.86rem, 1.4vw, 1rem);
  padding: 8px 4px;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(80, 88, 160, 0.12);
  transition:
    transform 140ms ease,
    background-color 140ms ease,
    color 140ms ease;
}

.number-cell:hover {
  transform: scale(1.02);
  background: linear-gradient(135deg, #fff4a8 0%, #ffd8f0 100%);
}

.number-cell.correct {
  background: var(--success);
  color: white;
}

.number-cell.wrong {
  background: var(--danger);
  color: white;
}

.number-cell:disabled {
  cursor: default;
}

@media (max-width: 720px) {
  .game-shell {
    width: min(100% - 20px, 1100px);
    padding-top: 20px;
  }

  .status-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero,
  .status-card,
  .message-bar,
  .number-board {
    border-radius: 22px;
  }

  .actions,
  .skip-wrap {
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .game-shell {
    width: min(100% - 14px, 1100px);
    padding-top: 12px;
    padding-bottom: 24px;
  }

  .hero,
  .status-panel,
  .message-bar,
  .actions,
  .board-wrap {
    margin-bottom: 12px;
  }

  .hero {
    padding: 18px 16px;
  }

  .subtitle {
    margin-top: 10px;
    font-size: 0.94rem;
    line-height: 1.5;
  }

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

  .status-card {
    min-height: 72px;
    padding: 12px 14px;
    border-radius: 16px;
  }

  .status-card strong {
    font-size: 1.05rem;
  }

  .status-label {
    margin-bottom: 4px;
    font-size: 0.82rem;
  }

  .number-board {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
  }

  .number-cell {
    min-height: 52px;
    font-size: 0.82rem;
    padding: 8px 3px;
    border-radius: 12px;
  }

  .message-bar {
    padding: 12px 14px;
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .actions {
    gap: 10px;
  }

  .primary-button,
  .ghost-button {
    padding: 12px 18px;
    font-size: 0.95rem;
  }

  .skip-wrap {
    width: 100%;
  }

  .skip-note {
    max-width: none;
    font-size: 0.92rem;
    line-height: 1.5;
  }
}
