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

body {
  background: #000;
  color: #fff;
  font-family: 'Courier New', monospace;
  overflow: hidden;
  width: 100vw;
  height: 100vh;
}

canvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

/* ドラッグ中の全画面ハイライト */
body.dragging #title-screen {
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.8);
  transition: box-shadow 0.2s;
}
body.dragging #drop-zone {
  border-color: #fff;
  background: rgba(255,255,255,0.1);
}

#title-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  background: #000;
}

.title-container {
  text-align: center;
}

.title-text {
  font-size: 48px;
  letter-spacing: 8px;
  margin-bottom: 8px;
  text-shadow: 0 0 20px rgba(255,255,255,0.5);
  animation: flicker 3s infinite alternate;
}

@keyframes flicker {
  0%, 90%, 100% { opacity: 1; }
  92% { opacity: 0.8; }
  94% { opacity: 1; }
  96% { opacity: 0.6; }
  98% { opacity: 1; }
}

.subtitle-text {
  font-size: 16px;
  letter-spacing: 6px;
  margin-bottom: 48px;
  opacity: 0.6;
}

#drop-zone {
  width: 400px;
  height: 200px;
  margin: 0 auto 32px;
  border: 1px dashed rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

#drop-zone:hover,
#drop-zone.drag-over {
  border-color: #fff;
  background: rgba(255,255,255,0.05);
}

.drop-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  opacity: 0.6;
}

.drop-icon {
  font-size: 32px;
}

.drop-formats {
  font-size: 11px;
  opacity: 0.5;
}

.controls-info {
  margin-top: 24px;
}

.control-row {
  font-size: 13px;
  opacity: 0.4;
  letter-spacing: 2px;
}

.key {
  display: inline-block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 12px;
  vertical-align: middle;
  margin-right: 2px;
}

#analysis-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  background: #000;
}

.analysis-container {
  text-align: center;
}

.analysis-text {
  font-size: 20px;
  letter-spacing: 6px;
  margin-bottom: 32px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.progress-bar-container {
  width: 300px;
  height: 2px;
  background: rgba(255,255,255,0.1);
  margin: 0 auto 16px;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: #fff;
  transition: width 0.1s;
}

.analysis-status {
  font-size: 11px;
  opacity: 0.4;
  letter-spacing: 2px;
}

#result-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  background: rgba(0,0,0,0.9);
}

.result-container {
  text-align: center;
}

.result-title {
  font-size: 36px;
  letter-spacing: 8px;
  margin-bottom: 48px;
}

.score-display {
  margin-bottom: 48px;
}

.score-label {
  display: block;
  font-size: 12px;
  letter-spacing: 4px;
  opacity: 0.5;
  margin-bottom: 8px;
}

.score-value {
  display: block;
  font-size: 48px;
  letter-spacing: 4px;
}

.result-stats {
  margin-bottom: 48px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  width: 240px;
  margin: 0 auto;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
  letter-spacing: 2px;
}

.retry-hint {
  font-size: 12px;
  opacity: 0.3;
  letter-spacing: 2px;
  animation: pulse 2s ease-in-out infinite;
}

#gameover-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  background: rgba(0,0,0,0.9);
}

.gameover-container {
  text-align: center;
}

.gameover-title {
  font-size: 36px;
  letter-spacing: 8px;
  margin-bottom: 48px;
  color: #f44;
}
