/* css variables */
:root {
  --color-bg: #0a0a0f;
  --color-bg-secondary: #111118;
  --color-bg-tertiary: #1a1a24;
  --color-accent: #1db954;
  --color-accent-2: #1ed760;
  --color-accent-glow: rgba(29, 185, 84, 0.6);
  --color-accent-dim: rgba(29, 185, 84, 0.15);
  --color-text: #ffffff;
  --color-text-muted: #b3b3b3;
  --color-text-subtle: #7a7a7a;
  --color-border: rgba(255, 255, 255, 0.08);
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.5);
  --font-main: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

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

/* body  */
body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  animation: gradientShift 10s ease infinite alternate;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* floating music notes background layer */
.music-notes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.note {
  position: absolute;
  bottom: -60px;
  color: var(--color-accent);
  opacity: 0;
  animation: floatNote linear infinite;
  text-shadow: 0 0 12px var(--color-accent-glow);
}

.note:nth-child(1) {
  left: 5%;
  font-size: 22px;
  animation-duration: 7s;
  animation-delay: 0s;
}
.note:nth-child(2) {
  left: 13%;
  font-size: 16px;
  animation-duration: 9s;
  animation-delay: 1s;
}
.note:nth-child(3) {
  left: 22%;
  font-size: 28px;
  animation-duration: 6s;
  animation-delay: 2s;
}
.note:nth-child(4) {
  left: 31%;
  font-size: 18px;
  animation-duration: 11s;
  animation-delay: 0.5s;
}
.note:nth-child(5) {
  left: 40%;
  font-size: 24px;
  animation-duration: 8s;
  animation-delay: 3s;
}
.note:nth-child(6) {
  left: 50%;
  font-size: 20px;
  animation-duration: 7s;
  animation-delay: 1.5s;
}
.note:nth-child(7) {
  left: 59%;
  font-size: 30px;
  animation-duration: 9s;
  animation-delay: 4s;
}
.note:nth-child(8) {
  left: 68%;
  font-size: 16px;
  animation-duration: 6s;
  animation-delay: 2.5s;
}
.note:nth-child(9) {
  left: 77%;
  font-size: 26px;
  animation-duration: 10s;
  animation-delay: 0.8s;
}
.note:nth-child(10) {
  left: 86%;
  font-size: 18px;
  animation-duration: 7s;
  animation-delay: 3.5s;
}
.note:nth-child(11) {
  left: 93%;
  font-size: 22px;
  animation-duration: 8s;
  animation-delay: 1.2s;
}
.note:nth-child(12) {
  left: 8%;
  font-size: 14px;
  animation-duration: 12s;
  animation-delay: 5s;
}

/* Content above bg layer */
header,
main,
footer {
  position: relative;
  z-index: 1;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--color-accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 14px;
  transition: top 0.2s;
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

/* nav bar  */
header {
  background-color: rgba(17, 17, 24, 0.92);
  border-bottom: 1px solid var(--color-accent);
  padding: 1rem 2rem;
  box-shadow: 0 2px 20px rgba(29, 185, 84, 0.25);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto;
}

/* Logo pulses gently */
.logo {
  font-size: 20px;
  font-weight: bold;
  color: var(--color-accent);
  letter-spacing: 2px;
  animation: logoPulse 3s ease infinite;
}

nav ul {
  display: flex;
  gap: 2rem;
}

nav ul a {
  color: var(--color-text-muted);
  font-size: 14px;
  transition:
    color 0.2s,
    text-shadow 0.2s;
  display: inline-block;
}

nav ul a:hover {
  color: var(--color-accent);
  text-decoration: none;
  text-shadow: 0 0 10px var(--color-accent-glow);
  animation: wiggle 0.4s ease;
}

/* ================================
   MAIN / SECTIONS
   ================================ */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

section {
  margin-bottom: 4rem;
}

/* ================================
   FOOTER
   ================================ */
footer {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-muted);
  font-size: 14px;
  border-top: 1px solid var(--color-bg-secondary);
}

/* ================================
   PLAYER SECTION
   ================================ */
#player h1 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.player-card {
  display: flex;
  gap: 2rem;
  align-items: center;
  background-color: var(--color-bg-secondary);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid var(--color-accent);
  animation: fadeSlideIn 0.8s ease both;
  transition:
    box-shadow 0.5s ease,
    border-color 0.5s ease;
  position: relative;
  overflow: hidden;
}

/* Shimmer sweep on card load */
.player-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(29, 185, 84, 0.12),
    transparent
  );
  animation: shimmerCard 3s ease 0.8s 1 forwards;
}

/* ================================
   ALBUM ART
   ================================ */
.album-art {
  width: 140px;
  height: 140px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  transition:
    opacity 0.4s ease,
    border-radius 0.5s ease,
    box-shadow 0.5s ease;
}

.player-info {
  flex: 1;
}

.track-title {
  font-size: 22px;
  font-weight: bold;
  color: var(--color-text);
  margin-bottom: 4px;
  transition:
    color 0.3s,
    text-shadow 0.3s;
}

.track-artist {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 1.2rem;
}

/* ================================
   PROGRESS BAR
   ================================ */
.progress-bar-wrapper {
  background-color: #1e1e2e;
  border-radius: 4px;
  height: 6px;
  width: 100%;
  margin-bottom: 1.2rem;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1db954, #1ed760);
  border-radius: 4px;
  transition: width 0.3s ease;
  position: relative;
}

/* Glowing dot tip on progress bar */
.progress-bar::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 8px #1ed760,
    0 0 16px #1db954;
}

/* ================================
   PLAYING STATE
   ================================ */
.playing {
  box-shadow:
    0 0 30px rgba(29, 185, 84, 0.5),
    0 0 60px rgba(29, 185, 84, 0.2),
    inset 0 0 30px rgba(29, 185, 84, 0.05);
  border-color: var(--color-accent-2);
}

/* Album art: circular spinning vinyl */
.playing .album-art {
  border-radius: 50%;
  animation: spinVinyl 6s linear infinite;
  box-shadow:
    0 0 20px rgba(29, 185, 84, 0.6),
    0 0 40px rgba(29, 185, 84, 0.3),
    0 0 60px rgba(29, 185, 84, 0.1);
}

/* Track title glows when playing */
.playing .track-title {
  color: var(--color-accent);
  text-shadow: 0 0 16px rgba(29, 185, 84, 0.7);
  animation: titlePop 0.4s ease;
}

/* ================================
   PLAYER CONTROLS
   ================================ */
.player-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.ctrl-btn {
  background: transparent;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 12px;
  transition:
    background-color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.ctrl-btn:hover {
  background-color: var(--color-accent);
  color: #fff;
  transform: scale(1.15);
  box-shadow: 0 0 14px var(--color-accent-glow);
}

.ctrl-btn:active {
  animation: btnPop 0.2s ease;
}

.play-btn {
  width: 52px;
  height: 52px;
  font-size: 18px;
  box-shadow: 0 0 10px rgba(29, 185, 84, 0.3);
  transition:
    background-color 0.2s,
    transform 0.2s,
    box-shadow 0.3s;
}

.play-btn:hover {
  box-shadow:
    0 0 24px var(--color-accent-glow),
    0 0 48px rgba(29, 185, 84, 0.2);
}

.ctrl-btn:focus {
  outline: 2px solid var(--color-accent-2);
  outline-offset: 2px;
}

/* ================================
   DUAL PULSE RINGS on play button
   ================================ */
.play-btn.pulsing::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--color-accent);
  animation: pulseRing 1.1s ease-out infinite;
}

.play-btn.pulsing::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--color-accent-2);
  animation: pulseRing 1.1s ease-out 0.55s infinite;
}

/* ================================
   RIPPLE on button click
   ================================ */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(29, 185, 84, 0.45);
  transform: scale(0);
  animation: rippleOut 0.55s ease-out forwards;
  pointer-events: none;
}

/* ================================
   VISUALIZER BARS
   ================================ */
.visualizer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 100px;
  padding: 0 1rem;
  transition: filter 0.4s ease;
}

.visualizer.active {
  filter: drop-shadow(0 0 10px rgba(29, 185, 84, 0.7));
}

.bar {
  flex: 1;
  max-width: 20px;
  height: 5px;
  background: linear-gradient(to top, #1db954, #1ed760);
  border-radius: 3px 3px 0 0;
  transform-origin: bottom;
}

.visualizer.active .bar:nth-child(1) {
  animation:
    bounce 0.7s 0s ease infinite alternate,
    barColor 1.8s 0s ease infinite alternate;
}
.visualizer.active .bar:nth-child(2) {
  animation:
    bounce 0.9s 0.05s ease infinite alternate,
    barColor 2s 0.1s ease infinite alternate;
}
.visualizer.active .bar:nth-child(3) {
  animation:
    bounce 0.6s 0.1s ease infinite alternate,
    barColor 1.6s 0.2s ease infinite alternate;
}
.visualizer.active .bar:nth-child(4) {
  animation:
    bounce 0.8s 0.15s ease infinite alternate,
    barColor 1.9s 0.3s ease infinite alternate;
}
.visualizer.active .bar:nth-child(5) {
  animation:
    bounce 0.7s 0.2s ease infinite alternate,
    barColor 1.7s 0.4s ease infinite alternate;
}
.visualizer.active .bar:nth-child(6) {
  animation:
    bounce 1s 0.25s ease infinite alternate,
    barColor 2.1s 0.5s ease infinite alternate;
}
.visualizer.active .bar:nth-child(7) {
  animation:
    bounce 0.65s 0.3s ease infinite alternate,
    barColor 1.8s 0.4s ease infinite alternate;
}
.visualizer.active .bar:nth-child(8) {
  animation:
    bounce 0.85s 0.35s ease infinite alternate,
    barColor 2s 0.3s ease infinite alternate;
}
.visualizer.active .bar:nth-child(9) {
  animation:
    bounce 0.75s 0.4s ease infinite alternate,
    barColor 1.6s 0.2s ease infinite alternate;
}
.visualizer.active .bar:nth-child(10) {
  animation:
    bounce 0.9s 0.45s ease infinite alternate,
    barColor 1.9s 0.1s ease infinite alternate;
}
.visualizer.active .bar:nth-child(11) {
  animation:
    bounce 0.7s 0.5s ease infinite alternate,
    barColor 1.7s 0s ease infinite alternate;
}
.visualizer.active .bar:nth-child(12) {
  animation:
    bounce 0.8s 0.45s ease infinite alternate,
    barColor 2s 0.1s ease infinite alternate;
}
.visualizer.active .bar:nth-child(13) {
  animation:
    bounce 0.65s 0.4s ease infinite alternate,
    barColor 1.8s 0.2s ease infinite alternate;
}
.visualizer.active .bar:nth-child(14) {
  animation:
    bounce 0.95s 0.35s ease infinite alternate,
    barColor 1.6s 0.3s ease infinite alternate;
}
.visualizer.active .bar:nth-child(15) {
  animation:
    bounce 0.72s 0.3s ease infinite alternate,
    barColor 2.1s 0.4s ease infinite alternate;
}
.visualizer.active .bar:nth-child(16) {
  animation:
    bounce 0.88s 0.25s ease infinite alternate,
    barColor 1.9s 0.5s ease infinite alternate;
}
.visualizer.active .bar:nth-child(17) {
  animation:
    bounce 0.68s 0.2s ease infinite alternate,
    barColor 1.7s 0.4s ease infinite alternate;
}
.visualizer.active .bar:nth-child(18) {
  animation:
    bounce 0.82s 0.15s ease infinite alternate,
    barColor 1.8s 0.3s ease infinite alternate;
}
.visualizer.active .bar:nth-child(19) {
  animation:
    bounce 0.77s 0.1s ease infinite alternate,
    barColor 2s 0.2s ease infinite alternate;
}
.visualizer.active .bar:nth-child(20) {
  animation:
    bounce 0.92s 0.05s ease infinite alternate,
    barColor 1.6s 0.1s ease infinite alternate;
}

/* ================================
   TRACKLIST
   ================================ */
.tracklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.track-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  animation: slideInRow 0.5s ease both;
}

.track-row:nth-child(1) {
  animation-delay: 0.1s;
}
.track-row:nth-child(2) {
  animation-delay: 0.2s;
}
.track-row:nth-child(3) {
  animation-delay: 0.3s;
}
.track-row:nth-child(4) {
  animation-delay: 0.4s;
}
.track-row:nth-child(5) {
  animation-delay: 0.5s;
}

/* Green left bar swipes in on hover */
.track-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: var(--color-accent);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.25s ease;
  border-radius: 0 2px 2px 0;
}

.track-row:hover::before,
.track-row.active::before {
  transform: scaleY(1);
}

.track-row:hover {
  transform: translateX(8px) scale(1.01);
  background-color: var(--color-bg-secondary);
  border-color: var(--color-accent);
  box-shadow: 0 0 14px rgba(29, 185, 84, 0.2);
}

.track-row.active {
  background-color: var(--color-bg-tertiary);
  border-color: var(--color-accent);
  box-shadow: 0 0 20px rgba(29, 185, 84, 0.25);
}

.track-row.active .track-row-title {
  color: var(--color-accent);
  text-shadow: 0 0 8px rgba(29, 185, 84, 0.4);
}

.track-row.active .track-num {
  color: var(--color-accent);
  animation: activeNumBounce 0.5s ease;
}

.track-num {
  font-size: 13px;
  color: var(--color-text-muted);
  width: 24px;
  flex-shrink: 0;
  transition: color 0.2s;
}

.track-thumb {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  transition:
    transform 0.25s ease,
    border-radius 0.4s ease,
    box-shadow 0.4s ease;
}

.track-row:hover .track-thumb {
  transform: scale(1.12) rotate(-2deg);
}

/* Active track thumbnail spins like a mini vinyl */
.track-row.active .track-thumb {
  border-radius: 50%;
  animation: thumbSpin 8s linear infinite;
  box-shadow: 0 0 10px rgba(29, 185, 84, 0.5);
}

.track-details {
  flex: 1;
}

.track-row-title {
  font-size: 15px;
  color: var(--color-text);
  font-weight: bold;
  transition:
    color 0.2s,
    text-shadow 0.2s;
}

.track-row-artist {
  font-size: 13px;
  color: var(--color-text-muted);
}

.track-duration {
  font-size: 13px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

/* ================================
   SUBSCRIBE FORM
   ================================ */
.subscribe-desc {
  font-size: 15px;
  color: var(--color-text-muted);
  margin-bottom: 1.2rem;
}

.form-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.subscribe-form input[type="email"] {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--color-accent);
  background-color: var(--color-bg-secondary);
  color: var(--color-text);
  font-size: 15px;
  font-family: var(--font-main);
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.subscribe-form input[type="email"]:focus {
  border-color: var(--color-accent-2);
  outline: 2px solid var(--color-accent-2);
  outline-offset: 2px;
  box-shadow: 0 0 14px rgba(29, 185, 84, 0.3);
}

.submit-btn {
  position: relative;
  padding: 0.65rem 1.5rem;
  background-color: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-family: var(--font-main);
  cursor: pointer;
  overflow: hidden;
  transition:
    background-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
  min-width: 130px;
}

.submit-btn:hover {
  background-color: var(--color-accent-2);
  box-shadow: 0 0 20px var(--color-accent-glow);
  transform: translateY(-2px);
}

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

.submit-btn:focus {
  outline: 2px solid var(--color-accent-2);
  outline-offset: 2px;
}

.btn-label {
  transition: opacity 0.3s ease;
}

.btn-plane {
  position: absolute;
  left: -30px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  opacity: 0;
}

.submit-btn.submitted .btn-label {
  opacity: 0;
}

.submit-btn.submitted .btn-plane {
  animation: flyAcross 0.8s ease forwards;
}

/* ================================
   SR-ONLY
   ================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ================================
   KEYFRAMES
   ================================ */

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRow {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounce {
  from {
    height: 5px;
  }
  to {
    height: 85px;
  }
}

@keyframes barColor {
  0% {
    background: linear-gradient(to top, #1db954, #1ed760);
  }
  50% {
    background: linear-gradient(to top, #17a045, #1db954);
  }
  100% {
    background: linear-gradient(to top, #23e868, #6fffb0);
  }
}

@keyframes gradientShift {
  0% {
    background-color: #0a0a0f;
  }
  25% {
    background-color: #080f14;
  }
  50% {
    background-color: #0f080f;
  }
  75% {
    background-color: #080f0c;
  }
  100% {
    background-color: #0f0f08;
  }
}

@keyframes floatNote {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 0;
  }
  8% {
    opacity: 0.55;
  }
  90% {
    opacity: 0.15;
  }
  100% {
    transform: translateY(-105vh) rotate(25deg) scale(0.6);
    opacity: 0;
  }
}

@keyframes spinVinyl {
  from {
    transform: rotate(0deg) scale(1.05);
  }
  to {
    transform: rotate(360deg) scale(1.05);
  }
}

@keyframes thumbSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulseRing {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.85;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.4);
    opacity: 0;
  }
}

@keyframes rippleOut {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes btnPop {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(0.85);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes flyAcross {
  0% {
    left: -30px;
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  100% {
    left: 110%;
    opacity: 0;
  }
}

@keyframes logoPulse {
  0%,
  100% {
    text-shadow: 0 0 6px rgba(29, 185, 84, 0.4);
  }
  50% {
    text-shadow:
      0 0 20px rgba(29, 185, 84, 1),
      0 0 36px rgba(29, 185, 84, 0.5);
  }
}

@keyframes wiggle {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes shimmerCard {
  0% {
    left: -100%;
  }
  100% {
    left: 150%;
  }
}

@keyframes titlePop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.07);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes activeNumBounce {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.5);
  }
  100% {
    transform: scale(1);
  }
}

/* ================================
   MEDIA QUERIES
   ================================ */
@media (max-width: 600px) {
  .player-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .album-art {
    width: 100%;
    height: auto;
  }

  .form-row {
    flex-direction: column;
    align-items: stretch;
  }

  .submit-btn {
    width: 100%;
  }

  nav ul {
    gap: 1rem;
  }
}

.scenery {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  /* Sky gradient — deep space at top fading to hot-pink horizon */
  background: linear-gradient(
    to bottom,
    #0a0a0f 0%,
    #0d0520 35%,
    #1a0535 55%,
    #2d0a4e 68%,
    #4a0e6e 78%,
    #c0286e 88%,
    #ff6a3d 95%,
    #ffb347 100%
  );
}

/* Stars */
.stars {
  position: absolute;
  inset: 0;
}

.stars span {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  animation: twinkle 3s ease-in-out infinite;
}

/* Spread stars across the top 65% of the sky using nth-child */
.stars span:nth-child(1) {
  top: 3%;
  left: 12%;
  animation-delay: 0s;
  animation-duration: 2.8s;
}
.stars span:nth-child(2) {
  top: 7%;
  left: 28%;
  animation-delay: 0.4s;
  animation-duration: 3.5s;
}
.stars span:nth-child(3) {
  top: 5%;
  left: 47%;
  animation-delay: 0.9s;
  animation-duration: 2.5s;
}
.stars span:nth-child(4) {
  top: 9%;
  left: 63%;
  animation-delay: 1.2s;
  animation-duration: 3.1s;
}
.stars span:nth-child(5) {
  top: 2%;
  left: 81%;
  animation-delay: 0.2s;
  animation-duration: 2.9s;
}
.stars span:nth-child(6) {
  top: 14%;
  left: 6%;
  animation-delay: 1.8s;
  animation-duration: 3.3s;
}
.stars span:nth-child(7) {
  top: 18%;
  left: 22%;
  animation-delay: 0.6s;
  animation-duration: 2.6s;
}
.stars span:nth-child(8) {
  top: 11%;
  left: 39%;
  animation-delay: 2.1s;
  animation-duration: 3.7s;
}
.stars span:nth-child(9) {
  top: 20%;
  left: 55%;
  animation-delay: 1.4s;
  animation-duration: 2.4s;
}
.stars span:nth-child(10) {
  top: 15%;
  left: 74%;
  animation-delay: 0.7s;
  animation-duration: 3s;
}
.stars span:nth-child(11) {
  top: 22%;
  left: 90%;
  animation-delay: 2.4s;
  animation-duration: 2.7s;
}
.stars span:nth-child(12) {
  top: 28%;
  left: 3%;
  animation-delay: 1s;
  animation-duration: 3.4s;
}
.stars span:nth-child(13) {
  top: 31%;
  left: 18%;
  animation-delay: 0.3s;
  animation-duration: 2.9s;
}
.stars span:nth-child(14) {
  top: 25%;
  left: 34%;
  animation-delay: 1.6s;
  animation-duration: 3.2s;
}
.stars span:nth-child(15) {
  top: 33%;
  left: 50%;
  animation-delay: 2.8s;
  animation-duration: 2.6s;
}
.stars span:nth-child(16) {
  top: 27%;
  left: 67%;
  animation-delay: 0.5s;
  animation-duration: 3.6s;
}
.stars span:nth-child(17) {
  top: 35%;
  left: 84%;
  animation-delay: 1.9s;
  animation-duration: 2.8s;
}
.stars span:nth-child(18) {
  top: 40%;
  left: 10%;
  animation-delay: 0.8s;
  animation-duration: 3.1s;
}
.stars span:nth-child(19) {
  top: 38%;
  left: 25%;
  animation-delay: 2.2s;
  animation-duration: 2.5s;
}
.stars span:nth-child(20) {
  top: 43%;
  left: 43%;
  animation-delay: 1.3s;
  animation-duration: 3.8s;
}
.stars span:nth-child(21) {
  top: 6%;
  left: 95%;
  animation-delay: 3s;
  animation-duration: 2.7s;
  width: 3px;
  height: 3px;
}
.stars span:nth-child(22) {
  top: 10%;
  left: 52%;
  animation-delay: 1.5s;
  animation-duration: 3s;
  width: 3px;
  height: 3px;
}
.stars span:nth-child(23) {
  top: 19%;
  left: 78%;
  animation-delay: 2.6s;
  animation-duration: 2.4s;
}
.stars span:nth-child(24) {
  top: 30%;
  left: 60%;
  animation-delay: 0.1s;
  animation-duration: 3.5s;
}
.stars span:nth-child(25) {
  top: 44%;
  left: 88%;
  animation-delay: 1.7s;
  animation-duration: 2.8s;
}
.stars span:nth-child(26) {
  top: 1%;
  left: 71%;
  animation-delay: 2.3s;
  animation-duration: 3.3s;
}
.stars span:nth-child(27) {
  top: 24%;
  left: 14%;
  animation-delay: 0.9s;
  animation-duration: 2.6s;
  width: 3px;
  height: 3px;
}
.stars span:nth-child(28) {
  top: 36%;
  left: 31%;
  animation-delay: 1.1s;
  animation-duration: 3.7s;
}
.stars span:nth-child(29) {
  top: 42%;
  left: 57%;
  animation-delay: 2.7s;
  animation-duration: 2.9s;
}
.stars span:nth-child(30) {
  top: 17%;
  left: 97%;
  animation-delay: 0.4s;
  animation-duration: 3.4s;
}

/* Twinkle: fade in bright fade out */
@keyframes twinkle {
  0% {
    opacity: 0;
    transform: scale(4);
  }
  40% {
    opacity: 0.9;
    transform: scale(1.3);
  }
  60% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.8);
  }
}

/* RETRO SUN */

.sun {
  position: absolute;
  /* Sit at the horizon: roughly 72% down the viewport */
  bottom: 28%;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 180px;
  border-radius: 50%;
  /* Layered radial gradient gives the orange-magenta retro glow */
  background: radial-gradient(
    circle,
    #ffe566 0%,
    #ff9a3c 35%,
    #e03c78 65%,
    #8b0a6e 100%
  );
  box-shadow:
    0 0 40px 6px rgba(255, 154, 60, 0.7),
    0 0 80px 20px rgba(224, 60, 120, 0.5),
    0 0 130px 40px rgba(139, 10, 110, 0.3);
  overflow: hidden; /* clip the horizontal stripes */
  animation: sunPulse 4s ease-in-out infinite alternate;
}

/* Horizontal stripe lines — sit in the bottom half of the sun,
   giving the classic retrowave sliced-sun look */
.sun-lines {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
}

.sun-lines span {
  display: block;
  width: 100%;
  /* Lines get thicker toward the bottom (perspective illusion) */
  background: rgba(10, 10, 15, 0.55);
}
.sun-lines span:nth-child(1) {
  height: 3px;
}
.sun-lines span:nth-child(2) {
  height: 4px;
}
.sun-lines span:nth-child(3) {
  height: 5px;
}
.sun-lines span:nth-child(4) {
  height: 6px;
}
.sun-lines span:nth-child(5) {
  height: 7px;
}
.sun-lines span:nth-child(6) {
  height: 8px;
}
.sun-lines span:nth-child(7) {
  height: 9px;
}
.sun-lines span:nth-child(8) {
  height: 10px;
}

/* Gentle breathing glow pulse */
@keyframes sunPulse {
  from {
    box-shadow:
      0 0 40px 6px rgba(255, 154, 60, 0.7),
      0 0 80px 20px rgba(224, 60, 120, 0.5),
      0 0 130px 40px rgba(139, 10, 110, 0.3);
    transform: translateX(-50%) scale(1);
  }
  to {
    box-shadow:
      0 0 55px 10px rgba(255, 154, 60, 0.9),
      0 0 100px 30px rgba(224, 60, 120, 0.65),
      0 0 160px 55px rgba(139, 10, 110, 0.45);
    transform: translateX(-50%) scale(1.04);
  }
}

/* city buildings  */
.city-silhouette {
  position: absolute;
  bottom: 28%; /* sits right at horizon line, above the grid */
  left: -5%;
  width: 110%;
  height: 140px;
  background: #0a0a0f;
  /* Each point pair is (x% y%) — 0% y = top of element, 100% = bottom */
  clip-path: polygon(
    0% 100%,
    0% 60%,
    3% 60%,
    3% 30%,
    5% 30%,
    5% 50%,
    7% 50%,
    7% 20%,
    9% 20%,
    9% 50%,
    11% 50%,
    11% 35%,
    12% 35%,
    12% 50%,
    14% 50%,
    14% 25%,
    15% 25%,
    15% 15%,
    16% 15%,
    16% 25%,
    17% 25%,
    17% 50%,
    19% 50%,
    19% 40%,
    21% 40%,
    21% 55%,
    24% 55%,
    24% 45%,
    26% 45%,
    26% 10%,
    27% 10%,
    27% 45%,
    29% 45%,
    29% 55%,
    31% 55%,
    31% 42%,
    33% 42%,
    33% 30%,
    34% 30%,
    34% 22%,
    35% 22%,
    35% 30%,
    37% 30%,
    37% 48%,
    39% 48%,
    39% 55%,
    42% 55%,
    42% 35%,
    44% 35%,
    44% 50%,
    46% 50%,
    46% 38%,
    48% 38%,
    48% 8%,
    49% 8%,
    49% 38%,
    51% 38%,
    51% 50%,
    53% 50%,
    53% 42%,
    55% 42%,
    55% 55%,
    57% 55%,
    57% 30%,
    59% 30%,
    59% 20%,
    60% 20%,
    60% 30%,
    62% 30%,
    62% 50%,
    64% 50%,
    64% 40%,
    66% 40%,
    66% 55%,
    68% 55%,
    68% 25%,
    70% 25%,
    70% 50%,
    72% 50%,
    72% 35%,
    74% 35%,
    74% 45%,
    76% 45%,
    76% 28%,
    77% 28%,
    77% 15%,
    78% 15%,
    78% 28%,
    80% 28%,
    80% 45%,
    82% 45%,
    82% 38%,
    84% 38%,
    84% 55%,
    86% 55%,
    86% 42%,
    88% 42%,
    88% 30%,
    90% 30%,
    90% 50%,
    92% 50%,
    92% 60%,
    94% 60%,
    94% 45%,
    96% 45%,
    96% 55%,
    98% 55%,
    98% 65%,
    100% 65%,
    100% 100%
  );
  animation: cityDrift 25s linear infinite;
}

/* Slow horizontal drift — gives parallax "moving" feel */
@keyframes cityDrift {
  0% {
    transform: translateX(0%);
  }
  50% {
    transform: translateX(-2%);
  }
  100% {
    transform: translateX(0%);
  }
}

/* Grid floor */
.grid-floor {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  /* Height covers from horizon (28% from bottom) to screen bottom */
  height: 28%;
  perspective: 300px;
  overflow: hidden;
}

/* Horizon glow line */
.scenery::after {
  content: "";
  position: absolute;
  bottom: 28%;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255, 80, 120, 0.6) 20%,
    rgba(255, 180, 60, 0.9) 50%,
    rgba(255, 80, 120, 0.6) 80%,
    transparent 100%
  );
  box-shadow: 0 0 18px 4px rgba(255, 140, 60, 0.5);
  animation: horizonPulse 4s ease-in-out infinite alternate;
}

@keyframes horizonPulse {
  from {
    opacity: 0.7;
  }
  to {
    opacity: 1;
  }
}
