:root {
  --background: #1a0a14;
  --primary: #e84393;
  --secondary: #fd79a8;
  --accent: #6c5ce7;
  --text: #ffffff;
  --glass: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
}

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

body {
  background-color: var(--background);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  width: 100vw;
}

#game-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 1200px;
  max-height: 800px;
  background: var(--background);
  overflow: hidden;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

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

#ui-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.score-container {
  background: var(--glass);
  backdrop-filter: blur(10px);
  padding: 15px 25px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.score-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--secondary);
}

#score {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  text-shadow: 0 0 10px rgba(232, 67, 147, 0.5);
}

.lives-container {
  display: flex;
  gap: 10px;
}

.life {
  width: 30px;
  height: 30px;
  background: var(--primary);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l8.84-8.84 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'%3E%3C/path%3E%3C/svg%3E") no-repeat center;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l8.84-8.84 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'%3E%3C/path%3E%3C/svg%3E") no-repeat center;
  transition: opacity 0.3s ease;
}

.life.lost {
  opacity: 0.2;
}

#start-screen, #game-over-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 10, 20, 0.8);
  backdrop-filter: blur(15px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
  pointer-events: auto;
}

.hidden {
  display: none !important;
}

h1 {
  font-size: 4rem;
  margin-bottom: 10px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 5px;
  text-shadow: 0 0 20px rgba(232, 67, 147, 0.5);
}

.high-score {
  font-size: 1.2rem;
  color: var(--secondary);
  margin-bottom: 30px;
}

button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 15px 40px;
  font-size: 1.5rem;
  font-weight: bold;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 15px rgba(232, 67, 147, 0.4);
}

button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(232, 67, 147, 0.6);
}

button:active {
  transform: translateY(0) scale(0.98);
}

.final-score {
  font-size: 3rem;
  margin-bottom: 10px;
  color: var(--accent);
}

.combo-text {
  position: absolute;
  color: var(--accent);
  font-weight: 800;
  font-size: 2rem;
  pointer-events: none;
  text-shadow: 0 0 10px rgba(108, 92, 231, 0.8);
  animation: combo-float 1s ease-out forwards;
}

@keyframes combo-float {
  0% { transform: translateY(0) scale(0.5); opacity: 0; }
  20% { transform: translateY(-20px) scale(1.2); opacity: 1; }
  100% { transform: translateY(-100px) scale(1); opacity: 0; }
}
