@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@700;900&display=swap');

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

body {
  background: radial-gradient(ellipse at center, #0a0e2e 0%, #05070f 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  font-family: 'Orbitron', sans-serif;
  padding: 16px 8px;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(0,212,255,0.4), transparent),
    radial-gradient(1px 1px at 60% 70%, rgba(168,85,247,0.3), transparent),
    radial-gradient(1px 1px at 80% 20%, rgba(0,255,136,0.3), transparent);
  background-size: 200px 200px, 300px 300px, 150px 150px;
  animation: starsMove 40s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes starsMove {
  from { background-position: 0 0, 0 0, 0 0; }
  to   { background-position: 200px 200px, -300px 300px, 150px -150px; }
}

.canvas-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 820px;
}

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 16px;
  background: rgba(0,212,255,0.06);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.game-title {
  font-size: 1.1rem;
  font-weight: 900;
  color: #00d4ff;
  text-shadow: 0 0 16px rgba(0,212,255,0.6);
  letter-spacing: 2px;
}

.score-display {
  font-size: 0.8rem;
  font-weight: 700;
  color: #a855f7;
  text-shadow: 0 0 10px rgba(168,85,247,0.5);
  letter-spacing: 1px;
}

canvas {
  background: rgba(0,5,20,0.9);
  display: block;
  border-radius: 10px;
  border: 1px solid rgba(0,212,255,0.3);
  box-shadow:
    0 0 30px rgba(0,212,255,0.15),
    0 0 60px rgba(0,212,255,0.05),
    inset 0 0 30px rgba(0,0,0,0.5);
  max-width: 100%;
  height: auto;
  touch-action: none;
}

.mobile-paddle {
  display: none;
  width: 100%;
  max-width: 800px;
  background: rgba(0,212,255,0.06);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 12px;
  padding: 12px;
  touch-action: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mobile-paddle-inner {
  height: 8px;
  background: linear-gradient(90deg, #00d4ff, #a855f7);
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(0,212,255,0.5);
  pointer-events: none;
}

.hint-text {
  font-size: 0.6rem;
  color: rgba(0,212,255,0.4);
  text-align: center;
  letter-spacing: 1px;
  margin-top: 4px;
}

@media (hover: none) and (pointer: coarse), (max-width: 640px) {
  .mobile-paddle { display: block; }
  .hint-text { display: none; }
}

