/* ============================================
   LIEKSTER - Neon Music Game
   ============================================ */

/* Google Fonts loaded via HTML <link> */

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

:root {
  --bg-dark: #0d0221;
  --bg-darker: #070114;
  --cyan: #00e5ff;
  --magenta: #ff00ff;
  --pink: #ff2d7c;
  --yellow: #ffe600;
  --green: #39ff14;
  --orange: #ff8c00;
  --white: #ffffff;
  --glow-cyan: 0 0 10px #00e5ff, 0 0 20px #00e5ff, 0 0 40px #00e5ff;
  --glow-pink: 0 0 10px #ff2d7c, 0 0 20px #ff2d7c, 0 0 40px #ff2d7c;
  --glow-magenta: 0 0 10px #ff00ff, 0 0 20px #ff00ff, 0 0 40px #ff00ff;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Montserrat', sans-serif;
  background: var(--bg-dark);
  color: var(--white);
}

/* ============================================
   NEON BACKGROUND LINES
   ============================================ */

.neon-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.neon-line {
  position: absolute;
  width: 2px;
  height: 250vh;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  opacity: 0.6;
}

.neon-line:nth-child(1) {
  background: var(--cyan);
  box-shadow: var(--glow-cyan);
  transform: translate(-50%, -50%) rotate(15deg);
  left: 20%;
}

.neon-line:nth-child(2) {
  background: var(--magenta);
  box-shadow: var(--glow-magenta);
  transform: translate(-50%, -50%) rotate(-25deg);
  left: 35%;
}

.neon-line:nth-child(3) {
  background: var(--yellow);
  box-shadow: 0 0 10px var(--yellow), 0 0 20px var(--yellow), 0 0 40px var(--yellow);
  transform: translate(-50%, -50%) rotate(50deg);
  left: 55%;
}

.neon-line:nth-child(4) {
  background: var(--green);
  box-shadow: 0 0 10px var(--green), 0 0 20px var(--green), 0 0 40px var(--green);
  transform: translate(-50%, -50%) rotate(-60deg);
  left: 70%;
}

.neon-line:nth-child(5) {
  background: var(--pink);
  box-shadow: var(--glow-pink);
  transform: translate(-50%, -50%) rotate(80deg);
  left: 45%;
}

.neon-line:nth-child(6) {
  background: var(--cyan);
  box-shadow: var(--glow-cyan);
  transform: translate(-50%, -50%) rotate(-45deg);
  left: 80%;
}

.neon-line:nth-child(7) {
  background: var(--orange);
  box-shadow: 0 0 10px var(--orange), 0 0 20px var(--orange), 0 0 40px var(--orange);
  transform: translate(-50%, -50%) rotate(35deg);
  left: 10%;
}

.neon-line:nth-child(8) {
  background: var(--magenta);
  box-shadow: var(--glow-magenta);
  transform: translate(-50%, -50%) rotate(-10deg);
  left: 60%;
}

.neon-line:nth-child(9) {
  background: var(--yellow);
  box-shadow: 0 0 10px var(--yellow), 0 0 20px var(--yellow), 0 0 40px var(--yellow);
  transform: translate(-50%, -50%) rotate(65deg);
  left: 90%;
}

.neon-line:nth-child(10) {
  background: var(--green);
  box-shadow: 0 0 10px var(--green), 0 0 20px var(--green), 0 0 40px var(--green);
  transform: translate(-50%, -50%) rotate(-75deg);
  left: 5%;
}

/* Subtle dark overlay to soften the lines */
.neon-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, transparent 20%, var(--bg-dark) 70%);
  z-index: 1;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

.content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 20px;
  text-align: center;
}

/* ============================================
   LOGO
   ============================================ */

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 40px;
  user-select: none;
}

.logo-wave {
  width: 48px;
  height: 48px;
}

.logo-wave svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 6px var(--cyan));
}

.logo-text {
  font-weight: 900;
  font-size: 3.5rem;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--pink), var(--magenta), var(--yellow));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 45, 124, 0.5));
}

/* ============================================
   SCREENS (landing / player / error)
   ============================================ */

.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.screen.active {
  display: flex;
}

/* ============================================
   LANDING SCREEN
   ============================================ */

.landing-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  max-width: 300px;
  line-height: 1.6;
}

.scan-icon {
  width: 80px;
  height: 80px;
  opacity: 0.5;
}

.scan-icon svg {
  width: 100%;
  height: 100%;
  stroke: var(--cyan);
  filter: drop-shadow(0 0 8px var(--cyan));
}

/* ============================================
   PLAY BUTTON
   ============================================ */

.play-btn {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  border: 3px solid var(--cyan);
  background: rgba(13, 2, 33, 0.7);
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.3),
              inset 0 0 15px rgba(0, 229, 255, 0.1);
  outline: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.play-btn:hover {
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.6),
              inset 0 0 25px rgba(0, 229, 255, 0.2);
  transform: scale(1.05);
}

.play-btn:active {
  transform: scale(0.97);
}

.play-btn.playing {
  border-color: var(--pink);
  box-shadow: 0 0 15px rgba(255, 45, 124, 0.4),
              inset 0 0 15px rgba(255, 45, 124, 0.15);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(255, 45, 124, 0.4),
                inset 0 0 15px rgba(255, 45, 124, 0.15);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 45, 124, 0.7),
                inset 0 0 30px rgba(255, 45, 124, 0.3);
  }
}

/* ============================================
   LOADING SPINNER
   ============================================ */

.loading-spinner {
  display: none;
  width: 50px;
  height: 50px;
  border: 3px solid rgba(0, 229, 255, 0.2);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-spinner.active {
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   ERROR SCREEN
   ============================================ */

.error-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pink);
  max-width: 300px;
  line-height: 1.6;
}

.retry-btn {
  padding: 12px 30px;
  border-radius: 30px;
  border: 2px solid var(--cyan);
  background: transparent;
  color: var(--white);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.retry-btn:hover {
  background: rgba(0, 229, 255, 0.15);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
}

/* ============================================
   RESPONSIVE - LANDSCAPE
   ============================================ */

@media (orientation: landscape) and (max-height: 500px) {
  .logo {
    margin-bottom: 20px;
  }

  .logo-text {
    font-size: 2.5rem;
  }

  .logo-wave {
    width: 36px;
    height: 36px;
  }

  .play-btn {
    width: 120px;
    height: 120px;
    font-size: 1.3rem;
  }

  .screen {
    gap: 15px;
  }

  .landing-text {
    font-size: 1rem;
  }
}

/* Small phones */
@media (max-width: 360px) {
  .logo-text {
    font-size: 2.5rem;
  }

  .play-btn {
    width: 140px;
    height: 140px;
    font-size: 1.4rem;
  }
}
