/* music.suheylakdeniz.com — one dark theme; the current track sets --hue. */

:root {
  --hue: 265;
  --bg: #070b14;
  --surface: rgb(255 255 255 / 6%);
  --surface-strong: rgb(255 255 255 / 10%);
  --border: rgb(255 255 255 / 14%);
  --text: #f2f3f7;
  --muted: #9aa3bd;
  --accent: hsl(var(--hue) 85% 72%);
  --accent-deep: hsl(var(--hue) 70% 40%);
  --on-accent: #070b14;
  --radius: 20px;
  --radius-sm: 12px;
  --gutter: 16px;
  --bar-h: 88px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  overflow: hidden;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 30;
  padding: 8px 12px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;
}

.skip:focus {
  left: 8px;
}

/* Stage layers */

.stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  touch-action: pan-y;
  cursor: grab;
}

.stage:active {
  cursor: grabbing;
}

.labels {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.stage-label {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: auto;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  border: 0;
  padding: 6px 10px;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  will-change: transform, opacity;
  text-shadow: 0 2px 12px rgb(0 0 0 / 70%);
}

.stage-label.is-current {
  font-size: 22px;
  letter-spacing: 0.2em;
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 3;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.6s steps(6) infinite;
}

@keyframes grain {
  0% {
    transform: translate(0, 0);
  }

  20% {
    transform: translate(-3%, 2%);
  }

  40% {
    transform: translate(2%, -4%);
  }

  60% {
    transform: translate(-4%, -1%);
  }

  80% {
    transform: translate(3%, 3%);
  }

  100% {
    transform: translate(0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .grain {
    animation: none;
  }
}

/* Top bar: brand, latest release, list */

.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: calc(16px + env(safe-area-inset-top)) var(--gutter) 0;
}

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand {
  color: var(--text);
  font-weight: 900;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.crumbs {
  display: flex;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.crumbs a {
  color: var(--accent);
}

.crumbs [aria-current] {
  color: var(--muted);
}

.latest {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 8px 8px;
  border-radius: 999px;
  background: rgb(5 8 16 / 80%);
  border: 1px solid var(--border);
  color: var(--text);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.latest[hidden] {
  display: none;
}

.latest img {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--surface);
}

.latest-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.latest-kicker {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.latest-title {
  font-size: 17px;
  font-weight: 600;
}

.latest-cta {
  margin-left: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--text);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

#sky-name {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.chip {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgb(5 8 16 / 80%);
  color: var(--text);
  cursor: pointer;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.chip:hover {
  border-color: var(--accent);
}

/* Current track panel, bottom left */

.current {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(120px + env(safe-area-inset-bottom));
  z-index: 10;
  max-width: 520px;
  pointer-events: none;
}

.current > * {
  pointer-events: auto;
}

.current-kicker {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  min-height: 1em;
}

.current-title {
  margin: 0;
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  text-shadow: 0 4px 24px rgb(0 0 0 / 60%);
}

.current-sub {
  margin: 6px 0 12px;
  color: var(--muted);
}

.current-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pill {
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  background: rgb(5 8 16 / 70%);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.pill:hover {
  border-color: var(--accent);
}

.pill.primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: transparent;
}

.pill svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Pager, bottom centre */

.pager {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgb(5 8 16 / 80%);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.pager-btn {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.pager-btn:hover {
  background: var(--surface-strong);
}

.pager-pos {
  padding: 0 10px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Socials, bottom right */

.socials {
  position: fixed;
  right: var(--gutter);
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 10;
  display: flex;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgb(5 8 16 / 80%);
  border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.socials:empty {
  display: none;
}

.socials a {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--text);
}

.socials a:hover {
  background: var(--surface-strong);
}

.socials svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.hint {
  position: fixed;
  left: var(--gutter);
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 10;
  margin: 0;
  max-width: 320px;
  font-size: 12px;
  color: var(--muted);
}

kbd {
  display: inline-block;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  font: inherit;
  font-size: 11px;
  color: var(--text);
  background: var(--surface);
}

@media (max-width: 900px) {
  .hint {
    display: none;
  }

  .latest-text {
    display: none;
  }
}

@media (max-width: 640px) {
  .top {
    align-items: center;
  }

  .crumbs {
    display: none;
  }

  .current {
    bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .socials {
    right: auto;
    left: var(--gutter);
    bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .pager {
    left: auto;
    right: var(--gutter);
    transform: none;
  }

  .pager-pos {
    display: none;
  }
}

/* When the bar is open, lift the bottom UI above it. */

body.has-bar .current {
  bottom: calc(var(--bar-h) + 76px + env(safe-area-inset-bottom));
}

body.has-bar .pager,
body.has-bar .socials,
body.has-bar .hint {
  bottom: calc(var(--bar-h) + 16px + env(safe-area-inset-bottom));
}

/* Sheets (dialogs) */

.sheet {
  width: min(560px, calc(100vw - 32px));
  max-height: 80vh;
  margin: auto;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgb(10 14 24 / 96%);
  color: var(--text);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.sheet::backdrop {
  background: rgb(0 0 0 / 55%);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sheet h2 {
  margin: 0;
  font-size: 20px;
}

.sheet-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.list button {
  font: inherit;
  width: 100%;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.list button:hover {
  background: var(--surface-strong);
}

.list button[aria-current="true"] {
  border-color: var(--accent);
}

.list .n {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.list .t {
  font-weight: 600;
}

.list .s {
  color: var(--muted);
  font-size: 13px;
}

.embed-sheet {
  width: min(720px, calc(100vw - 32px));
}

.embed iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: var(--radius-sm);
}

/* Player bar */

.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  padding: 0 var(--gutter) env(safe-area-inset-bottom);
  background: rgb(5 8 16 / 82%);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
}

.bar[hidden] {
  display: none;
}

.bar-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  grid-template-areas:
    "swatch meta controls"
    "wave wave wave";
  align-items: center;
  gap: 8px 12px;
  min-height: var(--bar-h);
  padding: 10px 0;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 760px) {
  .bar-row {
    grid-template-columns: 44px minmax(160px, 260px) minmax(0, 1fr) auto;
    grid-template-areas: "swatch meta wave controls";
    gap: 14px;
  }
}

.bar-swatch {
  grid-area: swatch;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  overflow: hidden;
}

.bar-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bar-meta {
  grid-area: meta;
  min-width: 0;
}

.bar-title {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-time {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.wave {
  grid-area: wave;
  height: 44px;
  border-radius: 8px;
  cursor: pointer;
  touch-action: none;
}

.wave canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.bar-controls {
  grid-area: controls;
  display: flex;
  gap: 6px;
  align-items: center;
}

.icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.icon:hover {
  background: var(--surface-strong);
}

.icon.play {
  background: var(--accent);
  color: var(--on-accent);
}

.icon.play .i-pause,
.icon.play[aria-pressed="true"] .i-play {
  display: none;
}

.icon.play[aria-pressed="true"] .i-pause {
  display: block;
}

#mute .i-muted,
#mute[aria-pressed="true"] .i-sound {
  display: none;
}

#mute[aria-pressed="true"] .i-muted {
  display: block;
}
