* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
  background: #03040c;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rajdhani', 'Segoe UI', sans-serif;
  background:
    radial-gradient(ellipse 80% 60% at 20% -10%, rgba(64, 22, 110, 0.35), transparent),
    radial-gradient(ellipse 70% 50% at 90% 110%, rgba(10, 60, 90, 0.3), transparent),
    #03040c;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

#stage {
  position: relative;
  height: min(100dvh, 150vw);
  aspect-ratio: 2 / 3;
  container-type: size;
  border-radius: 1cqw;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(90, 240, 255, 0.25),
    0 0 40px rgba(50, 200, 255, 0.18),
    0 0 120px rgba(180, 60, 255, 0.12);
  background: #04060f;
}

#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.02) 0px,
    rgba(255, 255, 255, 0.02) 1px,
    transparent 1px,
    transparent 3px
  );
}

#fx-layer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 105% at 50% 45%, transparent 55%, rgba(2, 2, 10, 0.55) 100%);
}

.hidden {
  display: none !important;
}

#hud {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  color: #dff8ff;
}

.hud-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2.2cqw 3cqw 0;
}

.hud-block.center {
  text-align: center;
}

.hud-block.right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1cqw;
}

.label {
  font-size: 2cqw;
  letter-spacing: 0.35em;
  color: rgba(140, 235, 255, 0.75);
  font-weight: 600;
}

.value {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 4.4cqw;
  line-height: 1.05;
  color: #fff;
  text-shadow: 0 0 12px rgba(80, 230, 255, 0.9), 0 0 34px rgba(80, 230, 255, 0.35);
}

.sub {
  font-size: 2.2cqw;
  letter-spacing: 0.25em;
  color: rgba(255, 210, 120, 0.85);
  margin-top: 0.4cqw;
}

.lives-row,
.bombs-row {
  display: flex;
  gap: 1cqw;
  align-items: center;
}

.life-icon {
  width: 3.4cqw;
  height: 3.4cqw;
  background: linear-gradient(#aefcff, #35d5ff);
  clip-path: polygon(50% 0%, 100% 100%, 50% 78%, 0% 100%);
  filter: drop-shadow(0 0 4px rgba(80, 220, 255, 0.9));
}

.life-icon.lost {
  background: rgba(120, 160, 190, 0.25);
  filter: none;
}

.bomb-icon {
  width: 2cqw;
  height: 2cqw;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffb0f7, #ff2bd6);
  box-shadow: 0 0 8px rgba(255, 70, 220, 0.9);
}

.bomb-icon.empty {
  background: rgba(120, 130, 170, 0.25);
  box-shadow: none;
}

#comboWrap {
  position: absolute;
  left: 50%;
  bottom: 4cqw;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.6cqw;
  opacity: 0;
  transition: opacity 0.25s ease;
}

#comboWrap.active {
  opacity: 1;
}

.combo-label {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 4.6cqw;
  color: #ffe45e;
  text-shadow: 0 0 14px rgba(255, 210, 60, 0.95), 0 0 40px rgba(255, 160, 20, 0.5);
  transform-origin: left center;
  transition: transform 0.08s ease-out;
}

.combo-bar {
  width: 26cqw;
  height: 1.4cqw;
  border: 1px solid rgba(255, 220, 90, 0.55);
  border-radius: 1cqw;
  overflow: hidden;
  background: rgba(20, 16, 4, 0.6);
}

.combo-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ffd94a, #ff9a1f);
  box-shadow: 0 0 10px rgba(255, 190, 50, 0.9);
  transform-origin: left center;
}

#banner {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#bannerText {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 9cqw;
  letter-spacing: 0.12em;
  color: #b8fbff;
  text-align: center;
  text-shadow:
    0 0 18px rgba(90, 240, 255, 0.95),
    0 0 60px rgba(90, 240, 255, 0.45),
    0 0 120px rgba(200, 80, 255, 0.4);
  animation: bannerIn 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#bannerText.danger {
  color: #ffd7f6;
  text-shadow:
    0 0 18px rgba(255, 80, 220, 0.95),
    0 0 60px rgba(255, 60, 200, 0.5),
    0 0 130px rgba(255, 60, 120, 0.45);
}

@keyframes bannerIn {
  0% { opacity: 0; transform: scale(2.2); letter-spacing: 0.6em; filter: blur(8px); }
  18% { opacity: 1; transform: scale(1); letter-spacing: 0.12em; filter: blur(0); }
  75% { opacity: 1; transform: scale(1.04); }
  100% { opacity: 0; transform: scale(1.12); }
}

.overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3cqh;
  text-align: center;
  color: #dff6ff;
  background: rgba(3, 6, 18, 0.72);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: overlayFade 0.35s ease-out;
}

@keyframes overlayFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.game-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 13cqw;
  line-height: 1.02;
  letter-spacing: 0.1em;
  color: #ecfeff;
  text-shadow:
    0 0 16px rgba(90, 240, 255, 0.9),
    0 0 55px rgba(60, 210, 255, 0.5),
    0 0 140px rgba(60, 210, 255, 0.3);
  animation: titlePulse 2.6s ease-in-out infinite;
}

.game-title span {
  display: block;
  color: #ffd9fa;
  text-shadow:
    0 0 16px rgba(255, 90, 230, 0.9),
    0 0 55px rgba(255, 70, 220, 0.5),
    0 0 140px rgba(255, 60, 180, 0.35);
}

@keyframes titlePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.82; }
}

.tagline {
  font-size: 2.8cqw;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(160, 225, 245, 0.85);
}

.neon-btn {
  pointer-events: auto;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 3.6cqw;
  letter-spacing: 0.28em;
  padding: 2.4cqw 7cqw;
  color: #aefcff;
  background: rgba(20, 60, 80, 0.25);
  border: 1px solid rgba(110, 240, 255, 0.8);
  border-radius: 1cqw;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow:
    inset 0 0 18px rgba(80, 220, 255, 0.12),
    0 0 18px rgba(80, 220, 255, 0.25);
  text-shadow: 0 0 10px rgba(110, 240, 255, 0.8);
}

.neon-btn:hover {
  background: rgba(80, 220, 255, 0.16);
  box-shadow:
    inset 0 0 24px rgba(80, 220, 255, 0.25),
    0 0 32px rgba(80, 220, 255, 0.65);
  transform: translateY(-1px) scale(1.03);
}

.neon-btn:active {
  transform: scale(0.97);
}

.ghost-btn {
  pointer-events: auto;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 2.6cqw;
  letter-spacing: 0.3em;
  padding: 1.4cqw 4cqw;
  color: rgba(170, 195, 215, 0.75);
  background: transparent;
  border: 1px solid rgba(150, 180, 210, 0.3);
  border-radius: 1cqw;
  cursor: pointer;
  transition: all 0.18s ease;
}

.ghost-btn:hover {
  color: #fff;
  border-color: rgba(200, 230, 255, 0.7);
  text-shadow: 0 0 8px rgba(200, 230, 255, 0.8);
}

.controls-hint {
  display: flex;
  flex-direction: column;
  gap: 1.2cqh;
  font-size: 2.5cqw;
  letter-spacing: 0.14em;
  color: rgba(185, 215, 235, 0.9);
}

.controls-hint b {
  color: #9ff3ff;
  font-weight: 700;
}

.controls-hint .dim {
  font-size: 2.1cqw;
  color: rgba(150, 175, 195, 0.55);
}

.menu-hi {
  font-size: 2.6cqw;
  letter-spacing: 0.3em;
  color: rgba(255, 214, 110, 0.9);
  text-shadow: 0 0 12px rgba(255, 190, 60, 0.5);
}

.pause-title,
.over-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 900;
  font-size: 9cqw;
  letter-spacing: 0.18em;
  color: #ecfeff;
  text-shadow:
    0 0 18px rgba(90, 240, 255, 0.9),
    0 0 60px rgba(90, 240, 255, 0.4);
}

.over-title {
  color: #ffdce4;
  text-shadow:
    0 0 18px rgba(255, 90, 140, 0.9),
    0 0 60px rgba(255, 60, 120, 0.45);
}

.new-record {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 3.4cqw;
  letter-spacing: 0.3em;
  color: #ffe45e;
  text-shadow: 0 0 16px rgba(255, 210, 60, 0.95);
  animation: recordBlink 0.9s ease-in-out infinite;
}

@keyframes recordBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.stats {
  display: flex;
  gap: 8cqw;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 1cqh;
}

.s-label {
  font-size: 2.2cqw;
  letter-spacing: 0.35em;
  color: rgba(150, 200, 225, 0.7);
}

.s-value {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 6cqw;
  color: #fff;
  text-shadow: 0 0 14px rgba(120, 235, 255, 0.8);
}

#muteBtn {
  position: absolute;
  right: 2cqw;
  bottom: 2cqw;
  z-index: 12;
  width: 7cqw;
  height: 7cqw;
  border-radius: 50%;
  font-size: 3.2cqw;
  color: rgba(170, 220, 245, 0.85);
  background: rgba(10, 25, 40, 0.55);
  border: 1px solid rgba(120, 210, 240, 0.35);
  cursor: pointer;
  transition: all 0.18s ease;
}

#muteBtn:hover {
  color: #fff;
  border-color: rgba(150, 235, 255, 0.8);
  box-shadow: 0 0 14px rgba(90, 220, 255, 0.4);
}
