body {
  margin: 0;
  padding: 0;
  font-family: 'Courier New', monospace;
  background: radial-gradient(ellipse at center, #1a1a3e 0%, #0a0a1a 70%, #050510 100%);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
}

/* ─── Стартовый экран ─── */
.mode-select {
  text-align: center;
  padding: 50px 40px;
  background: rgba(26, 26, 62, 0.5);
  border-radius: 20px;
  border: 1px solid rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 80px rgba(0, 255, 255, 0.06), inset 0 0 80px rgba(0, 255, 255, 0.02);
  width: 320px;
  margin: 20px;
}

.mode-select .logo {
  font-size: 56px;
  font-weight: bold;
  color: #00FFFF;
  text-shadow: 0 0 30px rgba(0,255,255,0.4), 0 0 60px rgba(0,255,255,0.15), 0 4px 8px rgba(0,0,0,0.5);
  margin-bottom: 6px;
  letter-spacing: 10px;
}

.mode-select .subtitle {
  font-size: 11px;
  color: #447;
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 36px;
}

.mode-select button {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 16px 20px;
  font-size: 16px;
  font-family: inherit;
  background: linear-gradient(180deg, #1a1a4e 0%, #12123a 100%);
  color: #ccc;
  border: 1px solid rgba(42, 42, 78, 0.6);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06);
  text-align: left;
  position: relative;
}

.mode-select button .btn-title {
  display: block;
  font-size: 17px;
  color: #fff;
  font-weight: bold;
}

.mode-select button .btn-desc {
  display: block;
  font-size: 11px;
  color: #557;
  margin-top: 2px;
}

.mode-select button .btn-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  opacity: 0.3;
  transition: opacity 0.2s;
}

.mode-select button:hover {
  background: linear-gradient(180deg, #2a2a6e 0%, #1a1a4e 100%);
  border-color: rgba(0, 255, 255, 0.3);
  color: #fff;
  box-shadow: 0 0 24px rgba(0,255,255,0.1), 0 4px 12px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}

.mode-select button:hover .btn-icon {
  opacity: 0.8;
}

.mode-select button:active {
  transform: translateY(0);
}

/* Рекорды на стартовом экране */
.records-box {
  margin-top: 24px;
  text-align: left;
  color: #555;
  font-size: 12px;
  padding: 16px;
  background: rgba(0,0,0,0.2);
  border-radius: 10px;
  border: 1px solid rgba(42, 42, 78, 0.3);
}
.records-box h3 {
  color: #FF8800;
  text-align: center;
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(255,136,0,0.2);
}
.records-box .rec-item {
  padding: 2px 0;
  display: flex;
  justify-content: space-between;
}

/* ─── Игровой интерфейс ─── */
.game-wrapper {
  display: none;
  flex-direction: column;
  align-items: center;
}

.game-container {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.side-panel {
  width: 130px;
  text-align: center;
  background: rgba(15, 15, 35, 0.5);
  border-radius: 12px;
  padding: 14px 8px;
  border: 1px solid rgba(42, 42, 78, 0.3);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.side-panel h3 {
  color: #00FFFF;
  font-size: 11px;
  letter-spacing: 3px;
  margin: 0 0 10px;
  text-shadow: 0 0 10px rgba(0,255,255,0.2);
  font-weight: normal;
}

#holdCanvas, #nextCanvas {
  background: linear-gradient(180deg, #0d0d1f 0%, #111128 100%);
  border: 1px solid rgba(42, 42, 78, 0.5);
  border-radius: 6px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
}

#gameCanvas {
  border: 1px solid rgba(0, 255, 255, 0.25);
  display: block;
  background: #0d0d1f;
  border-radius: 6px;
  box-shadow: 0 0 30px rgba(0,255,255,0.06), 0 8px 32px rgba(0,0,0,0.4);
}

/* ─── HUD ─── */
.hud {
  display: flex;
  gap: 20px;
  margin-top: 14px;
  justify-content: center;
  flex-wrap: wrap;
  background: rgba(15, 15, 35, 0.5);
  border-radius: 10px;
  padding: 8px 20px;
  border: 1px solid rgba(42, 42, 78, 0.3);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.hud-item {
  text-align: center;
  min-width: 50px;
}

.hud-label {
  display: block;
  font-size: 9px;
  color: #445;
  letter-spacing: 1px;
}

.hud-value {
  display: block;
  font-size: 20px;
  color: #eee;
  text-shadow: 0 0 8px rgba(255,255,255,0.05);
}

.hud-combo {
  color: #FF8800;
  font-weight: bold;
  font-size: 14px;
  display: block;
  margin-top: 10px;
  text-shadow: 0 0 12px rgba(255,136,0,0.3);
}

/* ─── Кнопки управления ─── */
.controls {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.controls button {
  width: 58px;
  height: 48px;
  font-size: 18px;
  background: linear-gradient(180deg, #1a1a4e 0%, #12123a 100%);
  color: #667;
  border: 1px solid rgba(42, 42, 78, 0.4);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

.controls button:hover {
  background: linear-gradient(180deg, #2a2a6e 0%, #1a1a4e 100%);
  color: #ccd;
  border-color: rgba(0, 255, 255, 0.2);
  box-shadow: 0 0 12px rgba(0,255,255,0.06), 0 3px 8px rgba(0,0,0,0.3);
}

.controls button:active {
  transform: translateY(1px);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}