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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #1a0a2e 0%, #16213e 100%);
  color: #e4e4e7;
  min-height: 100vh;
  line-height: 1.6;
}

.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.back {
  display: inline-block;
  color: #a78bfa;
  text-decoration: none;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.back:hover {
  text-decoration: underline;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.subtitle {
  color: #94a3b8;
  font-size: 1rem;
}

.game-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #0a0a1a;
  border-radius: 12px;
  border: 2px solid #2d1b4e;
  overflow: hidden;
}

canvas {
  display: block;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(10, 10, 26, 0.95);
  text-align: center;
  padding: 2rem;
}

.overlay.hidden {
  display: none;
}

.overlay h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.overlay p {
  color: #94a3b8;
  margin-bottom: 0.5rem;
}

.controls-info {
  margin: 1.5rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.controls-info p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
}

.play-btn {
  margin-top: 1rem;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.play-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4);
}

.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, transparent 100%);
}

.hud.hidden {
  display: none;
}

.hud-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hud-label {
  font-size: 0.7rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hud-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
}

.boss-bar, .health-bar {
  width: 100px;
  height: 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 0.25rem;
}

.boss-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #7c3aed 0%, #a78bfa 100%);
  transition: width 0.3s;
}

.health-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ef4444 0%, #22c55e 50%, #22c55e 100%);
  transition: width 0.3s;
}

footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #64748b;
  font-size: 0.875rem;
}

footer a {
  color: #a78bfa;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}
