:root {
  --bg-color: #0a0b10;
  --panel-bg: rgba(18, 20, 32, 0.85);
  --primary-cyan: #00f3ff;
  --accent-pink: #ff0055;
  --accent-yellow: #ffe600;
  --text-color: #ffffff;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  padding: 10px;
}

#ui-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--panel-bg);
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid rgba(0, 243, 255, 0.2);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
}

#game-title {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--primary-cyan);
  text-shadow: 0 0 10px var(--primary-cyan);
}

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

.stat-label {
  font-size: 0.65rem;
  color: #888;
  letter-spacing: 1px;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: bold;
  color: #fff;
}

#canvas-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  max-height: calc(100vh - 120px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(0, 243, 255, 0.15);
  border: 2px solid rgba(0, 243, 255, 0.3);
}

#game-canvas {
  width: 100%;
  height: 100%;
  background-color: #050608;
  display: block;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 11, 16, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10;
  padding: 20px;
  text-align: center;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.glow-text {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--primary-cyan);
  text-shadow: 0 0 15px var(--primary-cyan);
}

.glow-text.danger {
  color: var(--accent-pink);
  text-shadow: 0 0 15px var(--accent-pink);
}

.subtitle {
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: #aaa;
}

.primary-btn {
  background: var(--primary-cyan);
  color: #000;
  border: none;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 2px;
  padding: 12px 28px;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 0 15px var(--primary-cyan);
  transition: transform 0.2s;
}

.primary-btn:hover {
  transform: scale(1.05);
}