@import url('https://fonts.googleapis.com/css2?family=Anton&family=Bebas+Neue&display=swap');

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

html {
  height: 100%;
  height: 100dvh;
}

body {
  background: #0a0a0a;
  color: #fff;
  font-family: 'Bebas Neue', 'Arial Black', sans-serif;
  overflow: hidden;
  height: 100%;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  position: fixed;
  top: 0; left: 0;
}

#app {
  width: 100%;
  height: 100%;
  position: relative;
}

/* SCREENS */
.screen {
  display: none;
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.screen.active {
  display: flex;
}

/* MENU */
.menu-content {
  text-align: center;
}
.game-title {
  font-family: 'Anton', 'Impact', sans-serif;
  font-size: clamp(60px, 15vw, 140px);
  line-height: 0.9;
  letter-spacing: 4px;
  background: linear-gradient(180deg, #ff3c00, #ff8800, #ffcc00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 30px rgba(255, 60, 0, 0.5));
  margin-bottom: 10px;
}
.menu-tagline {
  font-size: clamp(14px, 3vw, 24px);
  color: #888;
  letter-spacing: 6px;
  margin-bottom: 40px;
}
.menu-btn {
  display: block;
  margin: 10px auto;
  padding: 14px 50px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(18px, 3vw, 28px);
  letter-spacing: 3px;
  color: #fff;
  background: linear-gradient(180deg, #333, #1a1a1a);
  border: 2px solid #555;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 240px;
}
.menu-btn:hover {
  background: linear-gradient(180deg, #ff3c00, #cc2200);
  border-color: #ff6600;
  transform: scale(1.05);
}
.menu-btn:active {
  transform: scale(0.98);
}

/* SONG SELECT */
.screen-title {
  font-family: 'Anton', sans-serif;
  font-size: clamp(28px, 6vw, 52px);
  letter-spacing: 4px;
  margin-bottom: 30px;
  color: #ff6600;
}
#expert-toggle {
  margin-bottom: 15px;
}
.expert-btn {
  min-width: 200px !important;
  padding: 10px 30px !important;
  font-size: clamp(14px, 2.5vw, 20px) !important;
}
.expert-btn.active {
  background: linear-gradient(180deg, #ff3c00, #cc2200) !important;
  border-color: #ff6600 !important;
  color: #fff;
}
.song-list {
  width: 90%;
  max-width: 600px;
  max-height: 60vh;
  max-height: 60dvh;
  overflow-y: auto;
}
.song-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  margin: 6px 0;
  background: #1a1a1a;
  border: 1px solid #333;
  cursor: pointer;
  transition: all 0.15s;
}
.song-item:hover {
  background: #2a1a0a;
  border-color: #ff6600;
}
.song-item-info {
  text-align: left;
}
.song-item-title {
  font-size: clamp(16px, 3vw, 22px);
  letter-spacing: 2px;
}
.song-item-artist {
  font-size: clamp(12px, 2vw, 16px);
  color: #888;
  letter-spacing: 1px;
}
.song-item-difficulty {
  display: flex;
  gap: 3px;
}
.diff-bar {
  width: 8px;
  height: 20px;
  background: #333;
}
.diff-bar.filled {
  background: #ff6600;
}
.song-item.locked {
  opacity: 0.35;
  pointer-events: none;
}
.song-item.locked .song-item-title::after {
  content: ' (COMING SOON)';
  color: #666;
  font-size: 0.7em;
}

/* GAME SCREEN */
#game-screen {
  padding: 0;
}
#bg-video {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%; min-height: 100%;
  width: auto; height: auto;
  object-fit: cover;
  z-index: 0;
  opacity: 0.35;
  filter: blur(2px) saturate(1.2);
  transition: opacity 0.5s;
}
#bg-video.hidden {
  opacity: 0;
}
#game-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
}

/* HUD */
#hud {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  z-index: 10;
}
#hud-score {
  font-family: 'Anton', sans-serif;
  font-size: clamp(24px, 5vw, 48px);
  letter-spacing: 2px;
}
#hud-combo {
  font-size: clamp(16px, 3vw, 28px);
  color: #ff8800;
  letter-spacing: 2px;
}
#hud-multiplier {
  font-size: clamp(20px, 4vw, 36px);
  color: #ffcc00;
  letter-spacing: 1px;
}
#btn-pause-mobile {
  display: none;
  pointer-events: auto;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  color: #fff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  letter-spacing: 2px;
  padding: 8px 16px;
  cursor: pointer;
  position: absolute;
  top: 15px;
  right: 20px;
}
@media (pointer: coarse) {
  #btn-pause-mobile {
    display: block;
  }
}

/* HIT FLASH */
#hit-flash {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.1s;
}
#hit-flash.perfect {
  background: radial-gradient(ellipse at 50% 85%, rgba(255, 200, 0, 0.3), transparent 60%);
  opacity: 1;
}
#hit-flash.good {
  background: radial-gradient(ellipse at 50% 85%, rgba(0, 200, 255, 0.2), transparent 60%);
  opacity: 1;
}
#hit-flash.miss {
  background: radial-gradient(ellipse at 50% 85%, rgba(255, 0, 0, 0.2), transparent 60%);
  opacity: 1;
}

/* TOUCH LANES (mobile) */
#touch-lanes {
  display: none;
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  height: 120px;
  z-index: 20;
}
@media (pointer: coarse) {
  #touch-lanes {
    display: flex;
  }
}
.touch-lane {
  width: 80px;
  height: 100%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
}
.touch-lane:active {
  background: rgba(255,255,255,0.15);
}

/* RESULTS */
#results-content {
  text-align: center;
  margin-bottom: 30px;
}
#results-song-name {
  font-size: clamp(18px, 4vw, 32px);
  color: #aaa;
  letter-spacing: 2px;
  margin-bottom: 20px;
}
#results-score {
  font-family: 'Anton', sans-serif;
  font-size: clamp(48px, 10vw, 96px);
  letter-spacing: 3px;
  background: linear-gradient(180deg, #ffcc00, #ff6600);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
#results-stats {
  font-size: clamp(14px, 2.5vw, 22px);
  color: #999;
  letter-spacing: 2px;
  line-height: 1.8;
  margin: 20px 0;
}
#results-grade {
  font-family: 'Anton', sans-serif;
  font-size: clamp(60px, 12vw, 120px);
  margin: 10px 0;
}
#results-initials {
  margin-top: 15px;
}
#initials-input {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(24px, 5vw, 40px);
  letter-spacing: 4px;
  text-align: center;
  background: #111;
  border: 2px solid #555;
  color: #ff6600;
  padding: 8px 16px;
  width: 200px;
  text-transform: uppercase;
  margin-top: 8px;
}
#initials-input:focus {
  outline: none;
  border-color: #ff6600;
}

/* SCORES */
#scores-list {
  width: 90%;
  max-width: 500px;
  max-height: 60vh;
  max-height: 60dvh;
  overflow-y: auto;
}
.score-entry {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  margin: 4px 0;
  background: #1a1a1a;
  border: 1px solid #222;
}
.score-entry-song {
  letter-spacing: 1px;
}
.score-entry-score {
  color: #ff8800;
  letter-spacing: 1px;
}

/* OVERLAYS */
.overlay {
  display: none;
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.overlay.active {
  display: flex;
}
#countdown-text {
  font-family: 'Anton', sans-serif;
  font-size: clamp(80px, 20vw, 200px);
  color: #ff6600;
  text-shadow: 0 0 40px rgba(255, 100, 0, 0.6);
}
.pause-content {
  text-align: center;
}
.pause-content h2 {
  font-family: 'Anton', sans-serif;
  font-size: clamp(40px, 8vw, 72px);
  letter-spacing: 6px;
  margin-bottom: 30px;
  color: #ff6600;
}

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb { background: #444; }

.back-btn {
  margin-top: 20px;
}
