* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

body, html {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background-color: #050508;
  font-family: 'Rajdhani', 'Trebuchet MS', system-ui, sans-serif;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  /* Ruang aman untuk notch / gesture bar iPhone */
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

#game-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 480px; /* Arcade vertical aspect */
  max-height: 960px;
  background: #090a10;
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.15);
  overflow: hidden;
}

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

#ui-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px;
  pointer-events: auto;
  transition: opacity 0.15s ease-out;
}

.hidden {
  display: none !important;
}

/* Typography & Titles */
.glitch-title {
  font-family: 'Orbitron', 'Courier New', monospace;
  font-size: 3.2rem;
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 3px;
  text-shadow: 0 0 15px rgba(0, 255, 200, 0.7);
}

.highlight {
  color: #00f0ff;
  text-shadow: 0 0 25px rgba(0, 240, 255, 0.9);
}

.tagline {
  letter-spacing: 4px;
  font-size: 0.85rem;
  color: #ff007f;
  margin-top: 8px;
  font-weight: 700;
}

.score-display, .stats-card {
  margin: 30px 0;
  background: rgba(18, 20, 32, 0.75);
  padding: 16px 32px;
  border-radius: 8px;
  border: 1px solid rgba(0, 240, 255, 0.25);
  box-shadow: inset 0 0 15px rgba(0, 240, 255, 0.1);
  width: 80%;
  max-width: 320px;
}

.stats-card .stat-row {
  display: flex;
  justify-content: space-between;
  margin: 8px 0;
  font-size: 1.1rem;
}

.label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: #7d889b;
}

.big-val {
  font-family: 'Orbitron', 'Courier New', monospace;
  font-size: 2.2rem;
  font-weight: 800;
  color: #39ff14;
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.5);
}

.glow-btn {
  background: transparent;
  color: #00f0ff;
  font-family: 'Orbitron', 'Courier New', monospace;
  font-size: 1.25rem;
  font-weight: 800;
  padding: 16px 36px;
  border: 2px solid #00f0ff;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 2px;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3), inset 0 0 15px rgba(0, 240, 255, 0.2);
  transition: all 0.1s ease-in-out;
  transform: scale(1);
}

.glow-btn:active {
  transform: scale(0.96);
  background: #00f0ff;
  color: #000;
  box-shadow: 0 0 35px #00f0ff;
}

.controls-hint {
  margin-top: 25px;
  font-size: 0.85rem;
  color: #5d677a;
  line-height: 1.6;
  letter-spacing: 1px;
}

.sub-hint {
  margin-top: 15px;
  font-size: 0.75rem;
  color: #7d889b;
  letter-spacing: 1px;
}

.audio-toggle button {
  background: none;
  border: none;
  color: #9aa5b8;
  font-family: 'Rajdhani', 'Trebuchet MS', system-ui, sans-serif;
  margin-top: 20px;
  font-size: 0.95rem;
  cursor: pointer;
  min-height: 44px;
  padding: 0 12px;
  touch-action: manipulation;
}

/* In-Game HUD */
#hud {
  justify-content: flex-start;
  align-items: stretch;
  padding: 16px 20px;
}

.hud-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hud-top .val {
  font-family: 'Orbitron', 'Courier New', monospace;
  font-size: 1.4rem;
  font-weight: 700;
}

.combo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.combo-val {
  font-family: 'Orbitron', 'Courier New', monospace;
  font-size: 1.6rem;
  font-weight: 900;
  color: #ffea00;
  text-shadow: 0 0 10px rgba(255, 234, 0, 0.6);
}

#combo-meter {
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin-top: 2px;
  overflow: hidden;
}

#combo-fill {
  width: 100%;
  height: 100%;
  background: #ffea00;
  transform-origin: left;
}

#countdown-num {
  font-family: 'Orbitron', 'Courier New', monospace;
  font-size: 6rem;
  font-weight: 900;
  color: #00f0ff;
  text-shadow: 0 0 30px #00f0ff;
  animation: pulse 0.8s infinite alternate;
}

.banner {
  color: #ffea00;
  font-family: 'Orbitron', 'Courier New', monospace;
  font-size: 1rem;
  margin-bottom: 12px;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(255, 234, 0, 0.8);
}

@keyframes pulse {
  from { transform: scale(0.9); opacity: 0.8; }
  to { transform: scale(1.1); opacity: 1; }
}
