@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

body {
  background: #0a0a1a;
  color: #ffffff;
  font-family: 'Press Start 2P', monospace;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}

#game-container {
  position: relative;
  width: 800px;
  height: 680px;
}

canvas {
  display: block;
  border-radius: 4px;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(5, 5, 20, 0.92);
  z-index: 10;
  transition: opacity 0.3s;
}

.overlay.hidden {
  display: none;
}

.title {
  font-size: 48px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #ff00ff, #00ffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  animation: pulse-title 2s ease-in-out infinite;
}

@keyframes pulse-title {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.03); filter: brightness(1.2); }
}

.subtitle {
  font-size: 12px;
  color: #aaaacc;
  margin-bottom: 40px;
  text-align: center;
  line-height: 1.8;
}

.menu-section {
  margin-bottom: 30px;
  text-align: center;
}

.menu-section label {
  font-size: 11px;
  color: #8888aa;
  display: block;
  margin-bottom: 12px;
}

.file-input-wrapper {
  position: relative;
  display: inline-block;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  padding: 14px 28px;
  border: 2px solid #ff00ff;
  background: rgba(255, 0, 255, 0.1);
  color: #ff00ff;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn:hover {
  background: rgba(255, 0, 255, 0.3);
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  border-color: #00ffff;
  color: #00ffff;
  background: rgba(0, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(0, 255, 255, 0.3);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.file-label {
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  padding: 12px 24px;
  border: 2px dashed #00ffff;
  color: #00ffff;
  cursor: pointer;
  transition: all 0.2s;
}

.file-label:hover {
  background: rgba(0, 255, 255, 0.15);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.file-name {
  font-size: 10px;
  color: #00ff00;
  margin-top: 8px;
  height: 16px;
}

.error-message {
  font-size: 10px;
  color: #ff4444;
  margin-top: 12px;
  max-width: 500px;
  text-align: center;
  line-height: 1.8;
  transition: opacity 0.3s;
}

.error-message.hidden {
  display: none;
}

.controls-info {
  font-size: 8px;
  color: #666688;
  line-height: 2;
  margin-top: 20px;
  text-align: center;
}

.controls-info span {
  color: #8888cc;
}

/* Loading */
.loading-text {
  font-size: 16px;
  color: #ff00ff;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0.3; }
}

.loading-sub {
  font-size: 10px;
  color: #8888aa;
  margin-top: 15px;
}

/* Game Over */
.game-over-title {
  font-size: 32px;
  color: #ff0066;
  margin-bottom: 30px;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 40px;
  margin-bottom: 30px;
}

.stat-item {
  text-align: center;
}

.stat-label {
  font-size: 8px;
  color: #8888aa;
  margin-bottom: 5px;
}

.stat-value {
  font-size: 16px;
  color: #00ffff;
}

.stat-value.score {
  font-size: 22px;
  color: #ff00ff;
}

.stat-value.perfect { color: #ff00ff; }
.stat-value.good { color: #00ffff; }
.stat-value.ok { color: #00ff00; }
.stat-value.miss { color: #ff3333; }

.buttons-row {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

/* Pause screen */
.pause-title {
  font-size: 28px;
  color: #00ffff;
  margin-bottom: 20px;
}

.pause-sub {
  font-size: 10px;
  color: #8888aa;
}
