:root {
  --lime: #caff45;
  --purple: #c35dff;
  --ink: #09060e;
  --panel: #160d20;
  --muted: #9789a0;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
  background: var(--ink);
}
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 20%, #38154d 0, transparent 28%),
    radial-gradient(circle at 80% 10%, #183c28 0, transparent 30%),
    linear-gradient(145deg, #09060e, #110719 60%, #07110c);
  color: #faf5ee;
  font-family: Arial, sans-serif;
}
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.15;
  background: repeating-linear-gradient(0deg, transparent 0 3px, #fff 4px);
  mix-blend-mode: overlay;
}
header {
  height: 76px;
  padding: 0 clamp(18px, 4vw, 64px);
  display: flex;
  align-items: center;
  gap: 26px;
  border-bottom: 1px solid #ffffff18;
  background: #09060ecc;
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.brand > i {
  width: 42px;
  height: 42px;
  border: 4px solid var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 20px #caff4566;
  position: relative;
}
.brand > i:after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--purple);
}
.brand span {
  display: grid;
}
.brand small,
.eyebrow,
.library small {
  font-size: 8px;
  letter-spacing: 2.6px;
  color: var(--purple);
}
.brand b {
  font-size: 21px;
  letter-spacing: 1px;
}
.brand em {
  color: var(--lime);
  font-style: normal;
}
.live {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--lime);
}
.live i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: #ff405e;
  box-shadow: 0 0 12px #ff405e;
  animation: pulse 1.2s infinite;
}
.header-visits {
  color: #8e8297;
  font-size: 8px;
  letter-spacing: 1.2px;
}
.visit-meter b {
  color: var(--lime);
  font: inherit;
}
.visit-meter:not(.ready) {
  opacity: 0.65;
}
.arcade {
  padding: 10px 13px;
  border: 1px solid #6d557a;
  border-radius: 5px;
  color: #ddd;
  text-decoration: none;
  font-size: 9px;
  letter-spacing: 1.4px;
}
main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 70px;
}
.player {
  min-height: 630px;
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(400px, 1fr);
  align-items: center;
  gap: clamp(40px, 8vw, 110px);
}
.record-wrap {
  width: min(430px, 80vw);
  aspect-ratio: 1;
  position: relative;
  justify-self: center;
}
.record {
  position: absolute;
  inset: 7%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: repeating-radial-gradient(
    circle,
    #111 0 3px,
    #252128 4px 5px,
    #0a080b 6px 8px
  );
  box-shadow:
    0 26px 60px #000c,
    0 0 0 2px #44364a;
}
.record img {
  width: 40%;
  height: 40%;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--purple);
}
.record i {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #050407;
  border: 3px solid var(--lime);
}
body.playing .record {
  animation: spin 8s linear infinite;
}
.needle {
  position: absolute;
  width: 11px;
  height: 62%;
  right: 1%;
  top: 1%;
  border-radius: 9px;
  background: linear-gradient(90deg, #777, #ddd, #555);
  transform-origin: 50% 8%;
  transform: rotate(21deg);
  box-shadow: 0 5px 12px #000;
}
.console {
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid #5c436a;
  border-radius: 18px;
  background: linear-gradient(145deg, #1c1028dd, #0d0913ee);
  box-shadow: 0 24px 70px #0008;
}
.eyebrow {
  color: #9a8da3;
}
.eyebrow span {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
}
h1 {
  min-height: 2.3em;
  margin: 14px 0 7px;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1.03;
  text-transform: uppercase;
}
#trackMeta {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 1.2px;
}
.time {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 10px;
  margin: 30px 0 20px;
  font: 10px monospace;
  color: #aaa;
}
.time input,
.volume input {
  width: 100%;
  accent-color: var(--lime);
}
.controls {
  display: grid;
  grid-template-columns: 42px 54px 76px 54px 42px;
  justify-content: center;
  align-items: center;
  gap: 10px;
}
.controls button {
  height: 44px;
  border: 1px solid #624c70;
  border-radius: 50%;
  background: #1c1225;
  color: #eee;
  cursor: pointer;
  font-weight: bold;
}
.controls .play {
  height: 70px;
  border: 0;
  background: var(--lime);
  color: #080b08;
  font-size: 22px;
  box-shadow: 0 0 26px #caff4540;
}
.controls button.active {
  color: var(--lime);
  border-color: var(--lime);
}
.volume {
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  gap: 12px;
  margin: 24px auto 0;
  max-width: 370px;
  color: #8e8297;
  font-size: 8px;
  letter-spacing: 1.4px;
}
.library-toggle {
  display: none;
}
.install {
  display: block;
  width: 100%;
  margin-top: 26px;
  padding: 14px;
  border: 1px solid var(--lime);
  border-radius: 6px;
  background: #caff4512;
  color: var(--lime);
  font-weight: bold;
  letter-spacing: 1.5px;
  cursor: pointer;
}
.playback-info {
  margin: 18px 0 0;
  color: #736a78;
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}
.playback-info summary {
  cursor: pointer;
  list-style: none;
  letter-spacing: 1.2px;
}
.playback-info summary::-webkit-details-marker {
  display: none;
}
.playback-info summary i {
  color: var(--lime);
  font-style: normal;
}
.playback-info[open] summary i {
  display: inline-block;
  transform: rotate(45deg);
}
.playback-info p {
  margin: 10px 0 0;
}
.playback-info a,
footer a {
  color: var(--lime);
  text-decoration: none;
}
.library {
  padding: 35px;
  border: 1px solid #3b2b45;
  border-radius: 16px;
  background: #0c0812bd;
}
.library-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 25px;
  margin-bottom: 24px;
}
.library h2 {
  margin: 5px 0 0;
  font-size: 28px;
}
.library-head label {
  display: grid;
  gap: 6px;
  width: min(310px, 100%);
  font-size: 7px;
  letter-spacing: 1.5px;
  color: #85778d;
}
.library-head input {
  width: 100%;
  padding: 12px;
  border: 1px solid #4f3a5c;
  border-radius: 6px;
  background: #100b16;
  color: white;
}
.library-close,
.sheet-grip {
  display: none;
}
.tracks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.track {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: #ffffff06;
  color: #d9d2dc;
  text-align: left;
  cursor: pointer;
}
.track:hover,
.track.current {
  border-color: #594368;
  background: #21132e;
}
.track.current {
  color: var(--lime);
}
.track span {
  color: #766c7b;
  font: 10px monospace;
}
.track b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.track em {
  font-size: 8px;
  font-style: normal;
  color: #7c7181;
}
.track.current em {
  color: var(--purple);
}
footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 22px;
  color: #716778;
  font-size: 8px;
  letter-spacing: 2px;
}
footer i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--lime);
}
.sheet-backdrop {
  display: none;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}
@media (max-width: 780px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }
  body {
    min-height: 100dvh;
  }
  header {
    height: 58px;
    padding: 0 12px;
    position: relative;
    gap: 10px;
  }
  .brand small {
    display: none;
  }
  .brand b {
    font-size: 15px;
  }
  .brand > i {
    width: 32px;
    height: 32px;
    border-width: 3px;
  }
  .arcade {
    font-size: 6px;
    padding: 7px;
  }
  .live {
    font-size: 7px;
  }
  .header-visits {
    font-size: 7px;
  }
  .header-visits span {
    display: inline;
  }
  .player {
    width: 100%;
    min-width: 0;
    height: calc(100dvh - 58px);
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(150px, 31vh) 1fr;
    gap: 0;
    padding: 8px 0 max(10px, env(safe-area-inset-bottom));
    overflow: hidden;
  }
  .record-wrap {
    width: min(240px, 58vw, 28vh);
  }
  .console {
    width: 100%;
    min-width: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 18px 20px;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -10px 45px #0008;
  }
  .eyebrow {
    margin: 0;
    font-size: 7px;
  }
  h1 {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 8px 0 5px;
    font-size: clamp(23px, 7.2vw, 31px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #trackMeta {
    margin: 0;
    font-size: 8px;
  }
  .time {
    min-width: 0;
    margin: 16px 0 12px;
  }
  .controls {
    grid-template-columns: 38px 44px 62px 44px 38px;
    gap: 7px;
  }
  .controls button {
    height: 40px;
  }
  .controls .play {
    height: 60px;
  }
  .volume {
    width: 100%;
    margin: 14px auto 0;
  }
  .library-toggle {
    display: grid;
    grid-template-columns: 24px 1fr auto 16px;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #5a4266;
    border-radius: 9px;
    background: #20132b;
    color: #eee;
    text-align: left;
  }
  .library-toggle > span,
  .library-toggle > i {
    color: var(--lime);
  }
  .library-toggle > b {
    font-size: 10px;
    letter-spacing: 1px;
  }
  .library-toggle > em {
    color: #86798d;
    font-size: 7px;
    font-style: normal;
  }
  .install {
    margin-top: 9px;
    padding: 10px;
    font-size: 9px;
  }
  .playback-info {
    margin: 10px 0 0;
    font-size: 7px;
  }
  .playback-info p {
    padding: 8px;
    border-radius: 6px;
    background: #ffffff06;
  }
  .sheet-backdrop {
    display: block;
    position: fixed;
    z-index: 30;
    inset: 0;
    background: #0009;
    backdrop-filter: blur(3px);
  }
  .sheet-backdrop[hidden] {
    display: none;
  }
  .library {
    position: fixed;
    z-index: 31;
    left: 0;
    right: 0;
    bottom: 0;
    height: min(78dvh, 690px);
    padding: 8px 16px max(16px, env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
    background: #100a17f5;
    box-shadow: 0 -24px 60px #000;
    transform: translateY(105%);
    visibility: hidden;
    transition:
      transform 0.28s ease,
      visibility 0s 0.28s;
  }
  .library.open {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.28s ease;
  }
  .sheet-grip {
    display: block;
    width: 42px;
    height: 4px;
    margin: 2px auto 14px;
    border-radius: 4px;
    background: #62576a;
  }
  .library-head {
    display: grid;
    grid-template-columns: 1fr 40px;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
  }
  .library-head label {
    grid-column: 1/-1;
    width: 100%;
  }
  .library h2 {
    font-size: 22px;
  }
  .library-close {
    display: block;
    width: 40px;
    height: 40px;
    border: 1px solid #54405f;
    border-radius: 50%;
    background: #20132b;
    color: #ddd;
    font-size: 25px;
  }
  .tracks {
    height: calc(100% - 116px);
    overflow-y: auto;
    overscroll-behavior: contain;
    grid-template-columns: 1fr;
    padding-bottom: 20px;
  }
  .track {
    min-height: 48px;
  }
  main {
    width: 100%;
    margin: 0;
  }
  footer {
    display: none;
  }
  body.sheet-open {
    touch-action: none;
  }
}
@media (max-width: 780px) and (max-height: 700px) {
  .player {
    grid-template-rows: minmax(105px, 24vh) 1fr;
  }
  .record-wrap {
    width: min(170px, 43vw, 22vh);
  }
  .console {
    padding: 12px 18px;
  }
  .time {
    margin: 9px 0 7px;
  }
  .controls .play {
    height: 52px;
  }
  .controls button {
    height: 36px;
  }
  .volume {
    margin-top: 9px;
  }
  .library-toggle {
    margin-top: 8px;
    padding: 9px;
  }
  .playback-info {
    display: none;
  }
}
