@font-face {
  font-family: "Geist";
  src: url("/fonts/geist/Geist-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist/GeistMono-Variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ps-blue: #0a84ff;
  --ps-blue-pressed: #006fe5;
  --ps-blue-active: #0057b8;
  --calm-teal: #64d8ca;
  --lamp-amber: #f4c66a;
  --canvas-dark: #030506;
  --ink: #000000;
  --ink-deep: #111416;
  --ink-elevated: #15191c;
  --surface-card: #f6f8fb;
  --surface-soft: #eef3f6;
  --body-dark: rgba(246, 248, 250, 0.72);
  --mute-dark: rgba(229, 236, 240, 0.56);
  --hairline-dark: rgba(226, 238, 244, 0.18);
  --on-dark: #f6f8fa;
  --on-primary: #ffffff;
  --warning: #c82c46;
  --radius-card: 8px;
  --radius-pill: 9999px;
  --font-ui: "Geist", "Avenir Next", "Helvetica Neue", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "Geist Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.share-preview-image {
  position: absolute;
  top: 0;
  left: -9999px;
  width: 600px;
  height: 600px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.share-preview-image img {
  display: block;
  width: 600px;
  height: 600px;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--on-dark);
  background: var(--canvas-dark);
  font-family: var(--font-ui);
  font-feature-settings: "kern" 1, "liga" 1;
}

button,
input {
  font: inherit;
}

button {
  min-height: 48px;
  padding: 12px 28px;
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--on-dark);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: 0;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

button:hover:not(:disabled),
button:focus-visible {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  color: #cccccc;
  background: rgba(243, 243, 243, 0.12);
}

.stream-shell {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  overflow: hidden;
  background: var(--canvas-dark);
  --scene-filter: saturate(0.88) contrast(1.08) brightness(0.7);
  --mist-background:
    linear-gradient(90deg, rgba(3, 5, 6, 0.86), rgba(3, 5, 6, 0.2) 48%, rgba(100, 216, 202, 0.13)),
    linear-gradient(180deg, transparent 42%, rgba(3, 5, 6, 0.44) 70%, rgba(10, 132, 255, 0.66));
}

.stream-shell[data-time="late-night"] {
  --scene-filter: saturate(0.72) contrast(1.12) brightness(0.56);
  --mist-background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(3, 5, 12, 0.38) 48%, rgba(10, 132, 255, 0.1)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(1, 4, 9, 0.5) 68%, rgba(6, 36, 70, 0.7));
}

.stream-shell[data-time="dawn"] {
  --scene-filter: saturate(0.9) contrast(1.04) brightness(0.82);
  --mist-background:
    linear-gradient(90deg, rgba(8, 10, 10, 0.72), rgba(26, 34, 35, 0.18) 52%, rgba(100, 216, 202, 0.14)),
    linear-gradient(180deg, rgba(244, 198, 106, 0.1), rgba(3, 5, 6, 0.24) 64%, rgba(10, 132, 255, 0.42));
}

.stream-shell[data-time="day"] {
  --scene-filter: saturate(0.96) contrast(1.02) brightness(0.96);
  --mist-background:
    linear-gradient(90deg, rgba(3, 5, 6, 0.5), rgba(6, 18, 22, 0.06) 54%, rgba(100, 216, 202, 0.16)),
    linear-gradient(180deg, rgba(246, 248, 250, 0.08), rgba(3, 5, 6, 0.12) 62%, rgba(10, 132, 255, 0.38));
}

.stream-shell[data-time="dusk"] {
  --scene-filter: saturate(0.92) contrast(1.08) brightness(0.68);
  --mist-background:
    linear-gradient(90deg, rgba(5, 4, 5, 0.82), rgba(16, 11, 14, 0.22) 50%, rgba(244, 198, 106, 0.12)),
    linear-gradient(180deg, rgba(244, 198, 106, 0.14), rgba(3, 5, 6, 0.38) 68%, rgba(10, 132, 255, 0.58));
}

.stream-shell[data-time="night"] {
  --scene-filter: saturate(0.84) contrast(1.1) brightness(0.64);
  --mist-background:
    linear-gradient(90deg, rgba(3, 5, 6, 0.88), rgba(3, 5, 6, 0.24) 48%, rgba(100, 216, 202, 0.12)),
    linear-gradient(180deg, transparent 42%, rgba(3, 5, 6, 0.5) 70%, rgba(10, 132, 255, 0.68));
}

.stream-shell::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(3, 5, 6, 0.84);
  border-bottom: 1px solid var(--hairline-dark);
}

.stream-shell::after {
  content: none;
}

.visual-stage {
  position: absolute;
  inset: 64px 0 0;
  overflow: hidden;
  background: var(--canvas-dark);
}

.cover-art {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  filter: var(--scene-filter);
  transform: scale(1.01);
  transition: filter 1200ms ease;
}

.mist-layer,
.scanlines,
.lamp-bloom,
.monitor-bloom,
.rain-field,
.wind-field,
.weather-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.mist-layer {
  z-index: 1;
  background: var(--mist-background);
  transition: background 1200ms ease;
}

.scanlines {
  z-index: 3;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 4px;
  opacity: 0.24;
}

.lamp-bloom,
.monitor-bloom {
  display: none;
}

.rain-line {
  position: absolute;
  z-index: 2;
  top: -18vh;
  width: 2px;
  height: var(--rain-height, 72px);
  left: var(--rain-left, 50%);
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  opacity: var(--rain-opacity, 0.42);
}

.rain-field,
.wind-field {
  opacity: 0;
  transition: opacity 900ms ease;
}

.stream-shell[data-weather="rain"] .rain-field {
  opacity: 1;
}

.stream-shell[data-weather="lightning"] .rain-field {
  opacity: 0.74;
}

.stream-shell[data-weather="wind"] .wind-field {
  opacity: 1;
}

.stream-shell[data-weather="sunny"] .scanlines {
  opacity: 0.12;
}

.wind-line {
  position: absolute;
  z-index: 2;
  top: var(--wind-top, 50%);
  left: var(--wind-left, 50%);
  width: var(--wind-width, 96px);
  height: 2px;
  rotate: -6deg;
  background: linear-gradient(90deg, transparent, rgba(246, 248, 250, 0.92), transparent);
  opacity: var(--wind-opacity, 0.18);
}

.weather-flash {
  z-index: 2;
  opacity: 0;
  background:
    linear-gradient(110deg, transparent 0 42%, rgba(246, 248, 250, 0.34) 48%, transparent 55%),
    rgba(167, 213, 255, 0.18);
  mix-blend-mode: screen;
}

.stream-shell[data-weather="lightning"] .weather-flash {
  animation: lightning-flash 7600ms infinite;
}

.stream-copy {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  top: clamp(104px, 17vh, 170px);
  width: min(760px, calc(100vw - 48px));
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--body-dark);
  font-size: 12px;
  font-weight: 560;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--on-dark);
  font-size: clamp(72px, 8.6vw, 132px);
  font-weight: 270;
  line-height: 1.02;
  letter-spacing: 0;
  text-transform: none;
  text-wrap: balance;
}

.brand-logo {
  display: block;
  width: min(180px, calc(100vw - 48px));
  height: auto;
  max-height: min(16vh, 86px);
  margin-inline: auto;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.2));
}

.status-line {
  width: fit-content;
  max-width: 100%;
  margin: 28px auto 0;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  color: var(--on-primary);
  background: var(--ps-blue);
  font-size: 14px;
  font-weight: 680;
  line-height: 1.25;
  letter-spacing: 0;
  box-shadow: 0 0 22px rgba(10, 132, 255, 0.22);
}

.playlist-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 50px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--radius-pill);
  background: rgba(246, 248, 251, 0.5);
}

.playlist-switch button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 38px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  color: rgba(0, 0, 0, 0.6);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.playlist-switch button[aria-pressed="true"] {
  color: var(--on-primary);
  background: var(--ps-blue);
}

.playlist-switch button:hover,
.playlist-switch button:focus-visible {
  transform: none;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.08);
}

.playlist-switch button[aria-pressed="true"]:hover,
.playlist-switch button[aria-pressed="true"]:focus-visible {
  color: var(--on-primary);
  background: var(--ps-blue-pressed);
}

.player-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(24px, 7vh, 76px);
  z-index: 3;
  width: min(560px, calc(100vw - 32px));
  margin-inline: auto;
  padding: 14px;
  border-radius: 36px;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(100, 216, 202, 0.04)),
    rgba(246, 248, 251, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.player-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.live-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #cccccc;
}

[data-state="ready"] .live-dot,
[data-state="playing"] .live-dot {
  background: var(--ps-blue);
}

[data-state="empty"] .live-dot,
[data-state="error"] .live-dot {
  background: var(--warning);
}

.meta-text {
  min-width: 0;
}

.meta-text p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#track-title {
  color: var(--ink);
  font-size: 32px;
  font-weight: 330;
  line-height: 1.25;
  letter-spacing: 0;
}

#track-artist {
  margin-top: 4px;
  color: rgba(0, 0, 0, 0.6);
  font-size: 14px;
  font-weight: 480;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
}

.progress-wrap {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  color: #6b6b6b;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 520;
  line-height: 1.5;
}

.progress-rail {
  height: 4px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: #cccccc;
}

#progress-fill {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--ps-blue);
  box-shadow: 0 0 18px rgba(10, 132, 255, 0.22);
}

.control-row {
  display: grid;
  grid-template-columns: repeat(3, 104px);
  justify-content: center;
  gap: 18px;
  margin-top: 12px;
}

.icon-button {
  display: grid;
  width: 104px;
  height: 104px;
  min-height: 104px;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(246, 248, 251, 0.5);
}

.icon-button svg {
  display: block;
  width: 42px;
  height: 42px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-button path {
  vector-effect: non-scaling-stroke;
}

#btn-prev path:last-child,
#btn-next path:last-child,
.primary-action path {
  stroke: none;
}

.primary-action {
  color: var(--on-primary);
  background: var(--ps-blue);
  box-shadow: 0 10px 26px rgba(10, 132, 255, 0.28);
}

.primary-action .pause-icon,
.primary-action[data-playing="true"] .play-icon {
  display: none;
}

.primary-action[data-playing="true"] .pause-icon {
  display: block;
}

.primary-action:hover:not(:disabled),
.primary-action:focus-visible {
  background: var(--ps-blue-pressed);
}

#btn-prev,
#btn-next {
  color: var(--ink);
}

#btn-prev:hover:not(:disabled),
#btn-prev:focus-visible,
#btn-next:hover:not(:disabled),
#btn-next:focus-visible {
  background: rgba(0, 0, 0, 0.08);
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-card);
  background: rgba(246, 248, 251, 0.48);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#volume-label {
  flex: 0 0 32px;
  color: rgba(0, 0, 0, 0.6);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 560;
  line-height: 1.5;
  text-transform: uppercase;
}

#volume {
  min-width: 0;
  width: 100%;
  height: 4px;
  appearance: none;
  border-radius: var(--radius-pill);
  background: #cccccc;
  outline: none;
}

#volume::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  appearance: none;
  border-radius: 50%;
  background: var(--ps-blue);
  box-shadow: 0 0 0 5px rgba(10, 132, 255, 0.12);
}

.empty-state {
  position: absolute;
  left: clamp(24px, 6vw, 88px);
  bottom: clamp(18px, 7vh, 72px);
  z-index: 3;
  display: none;
  width: min(430px, calc(100vw - 48px));
  padding: 24px;
  border-radius: var(--radius-card);
  color: var(--on-dark);
  background: var(--ink-elevated);
  border: 1px solid var(--hairline-dark);
}

.empty-state p {
  margin: 0;
  color: var(--on-dark);
  font-size: 22px;
  font-weight: 300;
  line-height: 1.25;
}

.empty-state span {
  display: block;
  margin-top: 12px;
  color: var(--body-dark);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

[data-state="empty"] .empty-state,
[data-state="error"] .empty-state {
  display: block;
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .stream-shell {
    min-height: 100svh;
  }

  .stream-shell::before {
    height: 52px;
  }

  .stream-shell::after {
    height: 42vh;
  }

  .visual-stage {
    inset: 52px 0 0;
  }

  .cover-art {
    width: 150%;
    transform: translateX(-20%) scale(1.01);
  }

  .mist-layer {
    background: var(--mist-background);
  }

  .stream-copy {
    left: 0;
    right: 0;
    top: 86px;
    width: min(420px, calc(100vw - 48px));
    margin-inline: auto;
  }

  h1 {
    font-size: 56px;
    line-height: 1.04;
  }

  .brand-logo {
    width: min(85px, calc(100vw - 48px));
    max-height: 50px;
  }

  .status-line {
    margin-top: 20px;
    font-size: 12px;
  }

  .playlist-switch {
    gap: 4px;
    min-height: 44px;
    padding: 5px;
  }

  .playlist-switch button {
    min-height: 34px;
    padding: 8px 5px;
    font-size: 10px;
  }

  .player-panel {
    left: 0;
    right: 0;
    bottom: 16px;
    width: min(420px, calc(100vw - 24px));
    margin-inline: auto;
    padding: 10px;
    border-radius: 28px;
  }

  .control-row {
    grid-template-columns: repeat(3, 78px);
    gap: 12px;
    margin-top: 10px;
  }

  .icon-button {
    width: 78px;
    height: 78px;
    min-height: 78px;
  }

  .icon-button svg {
    width: 32px;
    height: 32px;
  }

  .empty-state {
    left: 16px;
    right: 16px;
    bottom: 232px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}

@keyframes lightning-flash {
  0%,
  72%,
  77%,
  100% {
    opacity: 0;
  }

  73% {
    opacity: 0.8;
  }

  74% {
    opacity: 0.08;
  }

  75% {
    opacity: 0.56;
  }
}
