:root {
  --bg: #020504;
  --bg-soft: #07100c;
  --panel: rgba(7, 16, 12, .92);
  --panel-soft: rgba(12, 25, 18, .82);
  --green: #37ff83;
  --green-bright: #78ffa7;
  --green-soft: rgba(55, 255, 131, .15);
  --green-line: rgba(55, 255, 131, .28);
  --text: #f4fff7;
  --muted: #93a89a;
  --line: rgba(255, 255, 255, .10);
  --danger: #ff6c78;
  --shadow: 0 24px 80px rgba(0, 0, 0, .48);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(
      circle at 50% -10%,
      rgba(55, 255, 131, .08),
      transparent 28rem
    ),
    #020504;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.matrix-radio-shell {
  min-height: 100vh;
}

.matrix-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 74px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 12px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(2, 5, 4, .92);
  backdrop-filter: blur(18px);
}

.matrix-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.matrix-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  position: relative;
}

.matrix-mark span {
  position: absolute;
  width: 30px;
  height: 8px;
  border: 2px solid var(--green);
  transform: rotate(45deg) skew(-20deg);
  box-shadow:
    0 0 10px rgba(55, 255, 131, .4),
    inset 0 0 8px rgba(55, 255, 131, .2);
}

.matrix-mark span:nth-child(1) {
  transform:
    translateY(-8px)
    rotate(45deg)
    skew(-20deg);
}

.matrix-mark span:nth-child(3) {
  transform:
    translateY(8px)
    rotate(45deg)
    skew(-20deg);
}

.matrix-brand-copy {
  display: grid;
  line-height: 1;
}

.matrix-brand-copy strong {
  font-size: 1rem;
  letter-spacing: .02em;
}

.matrix-brand-copy small {
  margin-top: 5px;
  color: var(--green);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.matrix-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 28px;
}

.matrix-nav a {
  position: relative;
  padding: 26px 0 24px;
  color: #a9b6ad;
  font-size: .86rem;
  font-weight: 800;
}

.matrix-nav a:hover,
.matrix-nav a.active {
  color: var(--text);
}

.matrix-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  height: 2px;
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}

.header-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid var(--green-line);
  border-radius: 10px;
  color: var(--green-bright);
  background: rgba(55, 255, 131, .07);
  font-size: .8rem;
  font-weight: 900;
}

.matrix-hero {
  position: relative;
  min-height: min(690px, 72vh);
  overflow: hidden;
  display: grid;
  grid-template-columns:
    minmax(0, 1.05fr)
    minmax(320px, .95fr);
  align-items: center;
  gap: 50px;
  padding:
    clamp(70px, 10vw, 128px)
    clamp(22px, 7vw, 110px);
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -3;
  opacity: .28;
  background-image:
    linear-gradient(
      rgba(55, 255, 131, .08) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(55, 255, 131, .08) 1px,
      transparent 1px
    );
  background-size: 52px 52px;
  mask-image:
    linear-gradient(
      to bottom,
      rgba(0,0,0,.6),
      transparent 88%
    );
}

.hero-glow {
  position: absolute;
  width: 640px;
  height: 640px;
  right: -100px;
  top: 50%;
  z-index: -2;
  border-radius: 50%;
  transform: translateY(-50%);
  background:
    radial-gradient(
      circle,
      rgba(55, 255, 131, .14),
      rgba(55, 255, 131, .03) 43%,
      transparent 70%
    );
  filter: blur(10px);
}

.hero-copy {
  max-width: 720px;
}

.eyebrow,
.section-kicker {
  color: var(--green);
  font-size: .73rem;
  font-weight: 950;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow:
    0 0 0 5px rgba(55, 255, 131, .08),
    0 0 18px var(--green);
}

.matrix-hero h1 {
  margin: 0;
  max-width: 800px;
  font-size:
    clamp(3rem, 7.2vw, 7.4rem);
  line-height: .88;
  letter-spacing: -.065em;
  text-transform: uppercase;
}

.matrix-hero h1 span {
  color: var(--green);
  text-shadow:
    0 0 28px rgba(55, 255, 131, .25);
}

.matrix-hero p {
  max-width: 620px;
  margin: 28px 0 0;
  color: #aebdb3;
  font-size:
    clamp(1rem, 1.7vw, 1.24rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.primary-action,
.secondary-action {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 950;
  letter-spacing: .04em;
}

.primary-action {
  color: #011508;
  background: var(--green);
  box-shadow:
    0 0 32px rgba(55, 255, 131, .18);
}

.secondary-action {
  border: 1px solid var(--green-line);
  color: var(--green-bright);
  background: rgba(55, 255, 131, .05);
}

.hero-broadcast {
  position: relative;
  width: min(100%, 540px);
  aspect-ratio: 1;
  justify-self: center;
  display: grid;
  place-items: center;
}

.broadcast-orbit {
  position: absolute;
  border: 1px solid var(--green-line);
  border-radius: 50%;
  box-shadow:
    0 0 30px rgba(55, 255, 131, .035);
}

.orbit-one {
  inset: 5%;
}

.orbit-two {
  inset: 18%;
}

.orbit-three {
  inset: 31%;
}

.broadcast-core {
  width: 52%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid rgba(55, 255, 131, .45);
  background:
    radial-gradient(
      circle,
      rgba(55, 255, 131, .13),
      rgba(0, 0, 0, .5) 65%
    );
  box-shadow:
    0 0 65px rgba(55, 255, 131, .14),
    inset 0 0 40px rgba(55, 255, 131, .07);
}

.headphone-icon {
  width: 105px;
  height: 105px;
  border: 7px solid var(--green);
  border-bottom-color: transparent;
  border-radius: 54px 54px 34px 34px;
  display: grid;
  place-items: center;
  color: var(--green);
  font-size: 1.5rem;
  box-shadow:
    0 0 24px rgba(55, 255, 131, .22);
}

.radio-wave {
  position: absolute;
  bottom: 25%;
  display: flex;
  align-items: center;
  gap: 4px;
}

.radio-wave span {
  width: 4px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.radio-wave span:nth-child(1),
.radio-wave span:nth-child(9) {
  height: 15px;
}

.radio-wave span:nth-child(2),
.radio-wave span:nth-child(8) {
  height: 30px;
}

.radio-wave span:nth-child(3),
.radio-wave span:nth-child(7) {
  height: 46px;
}

.radio-wave span:nth-child(4),
.radio-wave span:nth-child(6) {
  height: 65px;
}

.radio-wave span:nth-child(5) {
  height: 84px;
}

.player-section,
.playlist-section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 7px 0 0;
  font-size:
    clamp(1.8rem, 3vw, 2.8rem);
  letter-spacing: -.04em;
}

.runtime-status,
.playlist-state {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--green-line);
  border-radius: 999px;
  color: #9eb0a3;
  background: rgba(55, 255, 131, .04);
  font-size: .72rem;
  font-weight: 800;
}

.player-card {
  display: grid;
  grid-template-columns:
    minmax(240px, .72fr)
    minmax(0, 1.28fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(
      135deg,
      rgba(55, 255, 131, .055),
      transparent 34%
    ),
    var(--panel);
  box-shadow: var(--shadow);
}

.artwork-stage {
  min-height: 460px;
  padding: 34px;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(
      circle,
      rgba(55, 255, 131, .10),
      transparent 62%
    );
}

.matrix-artwork {
  width: min(100%, 355px);
  aspect-ratio: 1;
  border: 1px solid rgba(55, 255, 131, .45);
  border-radius: 16px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(
      145deg,
      rgba(55, 255, 131, .12),
      rgba(0, 0, 0, .84) 45%,
      rgba(55, 255, 131, .07)
    );
  box-shadow:
    0 20px 60px rgba(0, 0, 0, .5),
    inset 0 0 40px rgba(55, 255, 131, .04);
}

.matrix-artwork::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .32;
  background-image:
    linear-gradient(
      rgba(55, 255, 131, .12) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(55, 255, 131, .12) 1px,
      transparent 1px
    );
  background-size: 32px 32px;
}

.artwork-mark,
.artwork-copy {
  position: relative;
  z-index: 1;
}

.artwork-mark {
  color: var(--green);
  font-size: clamp(4.8rem, 9vw, 8rem);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.14em;
  text-shadow:
    0 0 34px rgba(55, 255, 131, .38);
}

.artwork-copy {
  display: grid;
  color: #dce7df;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .21em;
  text-align: center;
}

.artwork-copy strong {
  margin-top: 6px;
  color: var(--green);
  font-size: 1rem;
}

.player-runtime {
  padding:
    clamp(30px, 5vw, 54px);
  align-self: center;
}

.now-playing {
  display: grid;
  gap: 7px;
  margin-bottom: 30px;
}

.now-playing-label {
  color: var(--green);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .18em;
}

#now-playing-title {
  font-size:
    clamp(1.6rem, 3.8vw, 3rem);
  letter-spacing: -.04em;
}

#album-title {
  color: var(--muted);
}

.transport-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.control-button,
.play-all-button,
.share-album-button,
.icon-button,
.share-option,
.dialog-close {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, .035);
  cursor: pointer;
}

.control-button,
.icon-button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.control-button.primary {
  color: #021708;
  background: var(--green);
  border-color: var(--green);
}

.play-all-button,
.share-album-button {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 9px;
  font-weight: 850;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: .38;
}

.timeline {
  margin-bottom: 22px;
}

.time-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}

.range-control {
  width: 100%;
  accent-color: var(--green);
}

.volume-row {
  display: grid;
  grid-template-columns:
    48px minmax(100px, 1fr) 50px;
  align-items: center;
  gap: 12px;
}

#volume-value {
  color: var(--muted);
  font-size: .76rem;
  text-align: right;
}

.player-message {
  min-height: 1.4em;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: .84rem;
}

.playlist-section {
  padding-bottom: 72px;
}

.playlist-frame {
  min-height: 330px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  overflow: hidden;
}

.track-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.empty-playlist-state {
  min-height: 330px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  color: var(--muted);
  text-align: center;
}

.empty-playlist-state strong {
  color: var(--text);
  font-size: 1.15rem;
}

.empty-icon {
  margin-bottom: 8px;
  color: var(--green);
  font-size: 2.5rem;
}

.mission-strip {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 72px;
  padding: 27px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--green-line);
  border-radius: 17px;
  background:
    linear-gradient(
      90deg,
      rgba(55, 255, 131, .08),
      rgba(55, 255, 131, .015)
    );
}

.mission-strip div {
  display: grid;
  gap: 7px;
}

.mission-label {
  color: var(--green);
  font-size: .66rem;
  font-weight: 950;
  letter-spacing: .18em;
}

.mission-strip p {
  margin: 0;
  color: var(--green-bright);
  font-weight: 900;
}

.matrix-footer {
  min-height: 110px;
  padding:
    28px clamp(20px, 6vw, 80px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 30px;
  border-top: 1px solid var(--line);
  color: #718078;
  background: #010302;
  font-size: .72rem;
}

.footer-brand {
  color: var(--text);
  font-size: .95rem;
  font-weight: 950;
}

.matrix-footer p {
  margin: 0;
  justify-self: center;
  letter-spacing: .08em;
}

.share-dialog {
  width: min(560px, calc(100% - 30px));
  padding: 0;
  border: 1px solid var(--green-line);
  border-radius: 18px;
  color: var(--text);
  background: #07100c;
  box-shadow: var(--shadow);
}

.share-dialog::backdrop {
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(8px);
}

.share-card {
  padding: 26px;
}

.share-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.share-header h2 {
  margin: 6px 0 0;
}

.dialog-close {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.3rem;
}

.share-description,
.share-feedback {
  color: var(--muted);
}

.share-options {
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.share-option {
  min-height: 46px;
  border-radius: 9px;
}

@media (max-width: 920px) {
  .matrix-header {
    grid-template-columns: 1fr auto;
  }

  .matrix-nav {
    display: none;
  }

  .matrix-hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .hero-broadcast {
    width: min(100%, 440px);
  }

  .player-card {
    grid-template-columns: 1fr;
  }

  .artwork-stage {
    min-height: 390px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .matrix-footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .matrix-footer p {
    justify-self: center;
  }
}

@media (max-width: 620px) {
  .matrix-header {
    min-height: 64px;
    padding: 10px 16px;
  }

  .matrix-brand-copy strong {
    font-size: .9rem;
  }

  .header-button {
    min-height: 38px;
    padding: 0 12px;
    font-size: .72rem;
  }

  .matrix-hero {
    padding:
      70px 20px 56px;
  }

  .matrix-hero h1 {
    font-size: clamp(2.8rem, 17vw, 4.8rem);
  }

  .hero-broadcast {
    width: 100%;
    max-width: 330px;
  }

  .player-section,
  .playlist-section,
  .mission-strip {
    width: min(100% - 24px, 1180px);
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .artwork-stage {
    min-height: auto;
    padding: 22px;
  }

  .player-runtime {
    padding: 26px 20px;
  }

  .transport-controls {
    display: grid;
    grid-template-columns:
      repeat(3, 48px);
  }

  .play-all-button,
  .share-album-button {
    width: auto;
    grid-column: span 3;
  }

  .mission-strip {
    align-items: start;
    flex-direction: column;
  }

  .share-options {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}


/* ============================================================
   MATRIXALIGNER RADIO — MEMBER IDENTITY POLISH
   ============================================================ */

.matrix-radio-identity {
  width: 100%;
  border-bottom: 1px solid rgba(99,255,153,.16);
  background:
    linear-gradient(
      90deg,
      rgba(5,10,8,.96),
      rgba(8,20,14,.96),
      rgba(5,10,8,.96)
    );
}

.matrix-radio-identity-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.matrix-radio-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(99,255,153,.6);
  background:
    radial-gradient(
      circle at 35% 30%,
      rgba(99,255,153,.28),
      rgba(9,30,18,.92)
    );
  box-shadow:
    0 0 22px rgba(99,255,153,.12);
  font-weight: 900;
  color: #9dffbd;
}

.matrix-radio-member-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.matrix-radio-member-label {
  font-size: .68rem;
  letter-spacing: .16em;
  color: rgba(255,255,255,.48);
}

.matrix-radio-display-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
}

.matrix-radio-identity-state {
  font-size: .76rem;
  color: rgba(255,255,255,.58);
}

.matrix-radio-member-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.matrix-radio-passport {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(99,255,153,.22);
  color: rgba(195,255,214,.82);
  background: rgba(99,255,153,.06);
  font-size: .72rem;
}

.matrix-radio-profile-link,
.matrix-radio-signin-link {
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
}

.matrix-radio-profile-link {
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
}

.matrix-radio-signin-link {
  border: 1px solid #63ff99;
  background: #63ff99;
  color: #041008;
}

.matrix-radio-runtime {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.empty-playlist-state {
  border: 1px dashed rgba(99,255,153,.22);
  border-radius: 16px;
  padding: 24px;
  background: rgba(99,255,153,.025);
}

@media (max-width: 760px) {
  .matrix-radio-identity-inner {
    width: min(100% - 22px, 1180px);
    padding: 12px 0;
    flex-wrap: wrap;
  }

  .matrix-radio-member-copy {
    flex: 1;
  }

  .matrix-radio-member-actions {
    width: 100%;
    margin-left: 58px;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .matrix-radio-passport {
    max-width: 100%;
  }
}



/* ============================================================
   MATRIXALIGNER RADIO — OFFICIAL BANNER
   ============================================================ */

.matrix-radio-banner {
  width: 100%;
  padding: 24px 0 8px;
  background:
    linear-gradient(
      180deg,
      rgba(4,10,7,.98),
      rgba(4,10,7,0)
    );
}

.matrix-radio-banner-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.matrix-radio-banner-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  border: 1px solid rgba(99,255,153,.18);
  box-shadow:
    0 22px 70px rgba(0,0,0,.34),
    0 0 38px rgba(99,255,153,.08);
}

@media (max-width: 760px) {
  .matrix-radio-banner {
    padding-top: 16px;
  }

  .matrix-radio-banner-inner {
    width: min(100% - 22px, 1180px);
  }

  .matrix-radio-banner-image {
    border-radius: 16px;
  }
}


/* ==========================================================
   MATRIXALIGNER RADIO — USER PLAYLIST SYSTEM V1
   Listener playlist management only.
   Does not alter or delete catalog media.
   ========================================================== */

.matrix-user-playlists-section {
  width: min(1180px, calc(100% - 32px));
  margin: 42px auto;
  padding: 28px;
  border: 1px solid rgba(86, 255, 127, 0.32);
  border-radius: 22px;
  background:
    linear-gradient(
      145deg,
      rgba(9, 18, 14, 0.98),
      rgba(3, 8, 6, 0.98)
    );
  box-shadow:
    0 0 32px rgba(61, 255, 111, 0.08);
}

.matrix-playlist-heading,
.matrix-playlist-toolbar,
.matrix-playlist-summary,
.matrix-user-playlist-track {
  display: flex;
  align-items: center;
}

.matrix-playlist-heading,
.matrix-playlist-toolbar,
.matrix-playlist-summary {
  justify-content: space-between;
  gap: 18px;
}

.matrix-playlist-heading h2 {
  margin: 6px 0;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
}

.matrix-playlist-heading p {
  margin: 0;
  opacity: 0.75;
}

.matrix-playlist-eyebrow,
.matrix-playlist-summary span,
.matrix-playlist-selector > span {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7dff9c;
}

.matrix-playlist-primary,
.matrix-playlist-secondary,
.matrix-playlist-danger,
.matrix-user-playlist-track button,
.matrix-add-to-playlist {
  appearance: none;
  border-radius: 999px;
  padding: 10px 15px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.matrix-playlist-primary {
  border: 1px solid #59ff7c;
  background: #59ff7c;
  color: #041008;
}

.matrix-playlist-secondary,
.matrix-user-playlist-track button,
.matrix-add-to-playlist {
  border: 1px solid rgba(107, 255, 143, 0.34);
  background: rgba(16, 35, 24, 0.9);
  color: #effff3;
}

.matrix-playlist-danger {
  border: 1px solid rgba(255, 117, 117, 0.48);
  background: rgba(74, 20, 20, 0.62);
  color: #ffd6d6;
}

.matrix-playlist-primary:disabled,
.matrix-playlist-secondary:disabled,
.matrix-playlist-danger:disabled,
.matrix-user-playlist-track button:disabled,
.matrix-add-to-playlist:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.matrix-playlist-editor {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid rgba(104, 255, 142, 0.24);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.35);
}

.matrix-playlist-editor label {
  display: block;
  margin-bottom: 9px;
  font-weight: 800;
}

.matrix-playlist-editor-row {
  display: flex;
  gap: 10px;
}

.matrix-playlist-editor input,
.matrix-playlist-selector select {
  border: 1px solid rgba(105, 255, 142, 0.32);
  background: #07100b;
  color: #f4fff7;
  border-radius: 12px;
  font: inherit;
}

.matrix-playlist-editor input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
}

.matrix-playlist-toolbar {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.matrix-playlist-selector {
  display: grid;
  gap: 7px;
  min-width: min(360px, 100%);
}

.matrix-playlist-selector select {
  width: 100%;
  padding: 11px 38px 11px 12px;
}

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

.matrix-playlist-current {
  margin-top: 24px;
}

.matrix-playlist-summary {
  padding: 14px 0;
}

.matrix-playlist-summary > div {
  display: grid;
  gap: 4px;
}

.matrix-playlist-empty {
  padding: 28px 20px;
  border: 1px dashed rgba(106, 255, 143, 0.26);
  border-radius: 16px;
  text-align: center;
}

.matrix-playlist-empty p {
  margin-bottom: 0;
  opacity: 0.7;
}

.matrix-user-playlist-track-list {
  display: grid;
  gap: 10px;
}

.matrix-user-playlist-track {
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 15px;
  background: rgba(255,255,255,0.025);
}

.matrix-playlist-position {
  width: 28px;
  text-align: center;
  font-weight: 900;
  opacity: 0.6;
}

.matrix-user-playlist-track img {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  background: #050505;
}

.matrix-playlist-track-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 3px;
}

.matrix-playlist-track-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matrix-playlist-track-copy span {
  font-size: 0.82rem;
  opacity: 0.58;
}

.matrix-playlist-track-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.matrix-playlist-track-actions button {
  padding: 8px 11px;
}

.matrix-radio-playlist-status {
  margin: 18px 0 0;
  font-size: 0.88rem;
  opacity: 0.74;
}

.matrix-radio-playlist-status[data-state="error"] {
  color: #ffadad;
  opacity: 1;
}

.matrix-add-to-playlist {
  margin-left: 8px;
  padding: 8px 12px;
  font-size: 0.78rem;
}

@media (max-width: 780px) {
  .matrix-user-playlists-section {
    width: min(100% - 20px, 1180px);
    padding: 20px 16px;
  }

  .matrix-playlist-heading,
  .matrix-playlist-toolbar,
  .matrix-playlist-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .matrix-playlist-heading .matrix-playlist-primary {
    width: 100%;
  }

  .matrix-playlist-editor-row {
    flex-direction: column;
  }

  .matrix-playlist-actions {
    justify-content: stretch;
  }

  .matrix-playlist-actions button {
    flex: 1 1 140px;
  }

  .matrix-user-playlist-track {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .matrix-playlist-track-copy {
    width: calc(100% - 100px);
  }

  .matrix-playlist-track-actions {
    width: 100%;
    padding-left: 42px;
  }

  .matrix-add-to-playlist {
    display: block;
    width: 100%;
    margin: 10px 0 0;
  }
}

/* ============================================================
   MATRIXALIGNER RADIO — COMPACT REAL TRACK ROWS V1
   ============================================================ */

#track-list .track-row {
  display: grid;
  grid-template-columns: 38px 72px minmax(0, 1fr) 44px 44px;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

#track-list .track-row:last-child {
  border-bottom: 0;
}

#track-list .track-row.is-active {
  box-shadow: inset 3px 0 0 var(--accent);
}

#track-list .track-row > img {
  display: block;
  width: 72px;
  height: 72px;
  max-width: 72px;
  max-height: 72px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
}

#track-list .track-number {
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--muted);
}

#track-list .track-title-wrap {
  min-width: 0;
  display: grid;
  gap: 5px;
}

#track-list .track-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

#track-list .track-state {
  font-size: 0.78rem;
  color: var(--muted);
}

#track-list .track-play-button,
#track-list .track-share-button {
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

@media (max-width: 640px) {
  #track-list .track-row {
    grid-template-columns: 28px 58px minmax(0, 1fr) 40px;
    gap: 10px;
    min-height: 78px;
    padding: 10px;
  }

  #track-list .track-row > img {
    width: 58px;
    height: 58px;
    max-width: 58px;
    max-height: 58px;
  }

  #track-list .track-share-button {
    display: none;
  }

  #track-list .track-play-button {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }
}


/* MATRIXALIGNER RADIO LAYOUT V2 START */

.matrix-radio-workspace-v2 {
  width: min(1180px, calc(100% - 32px));
  margin: 26px auto 44px;
}

.matrix-radio-search-shell {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(214, 178, 75, .34);
  border-radius: 18px;
  background:
    linear-gradient(
      145deg,
      rgba(10, 14, 21, .97),
      rgba(2, 5, 9, .97)
    );
  box-shadow:
    0 18px 44px rgba(0, 0, 0, .28);
}

.matrix-radio-search-label {
  display: block;
  margin: 0 0 8px;
  color: #d9ba62;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.matrix-radio-search-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.matrix-radio-search-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #efd06d;
  font-size: 1.7rem;
}

.matrix-radio-track-search {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(117, 173, 221, .34);
  border-radius: 12px;
  outline: none;
  background: #070c12;
  color: #fff;
  font: inherit;
}

.matrix-radio-track-search:focus {
  border-color: #e6bf54;
  box-shadow:
    0 0 0 3px rgba(230, 191, 84, .12);
}

.matrix-radio-clear-search {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid #d5b34f;
  border-radius: 12px;
  background:
    linear-gradient(
      180deg,
      #f2d36d,
      #c79c2e
    );
  color: #080808;
  font-weight: 900;
  cursor: pointer;
}

.matrix-radio-main-grid {
  display: grid;
  grid-template-columns:
    minmax(0, .95fr)
    minmax(0, 1.05fr);
  gap: 18px;
  align-items: stretch;
}

.matrix-radio-playlist-panel,
.matrix-radio-player-panel {
  min-width: 0;
  border: 1px solid rgba(93, 143, 181, .42);
  border-radius: 22px;
  background:
    radial-gradient(
      circle at top right,
      rgba(38, 77, 105, .18),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      rgba(5, 10, 15, .98),
      rgba(1, 4, 7, .98)
    );
  box-shadow:
    0 22px 56px rgba(0, 0, 0, .34);
  overflow: hidden;
}

.matrix-radio-playlist-panel {
  padding: 18px 14px 14px;
}

.matrix-radio-player-panel {
  position: relative;
  padding: 18px;
}

.matrix-radio-panel-heading {
  display: flex;
  gap: 20px;
  align-items: end;
  justify-content: space-between;
  margin: 0 4px 14px;
}

.matrix-radio-eyebrow {
  color: #d4b454;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .18em;
}

.matrix-radio-panel-heading h2,
.matrix-radio-preview-info h2 {
  margin: 5px 0 0;
  color: #fff;
}

.matrix-radio-track-count {
  color: #cab66d;
  white-space: nowrap;
}

.matrix-radio-list-mount {
  min-width: 0;
}

#matrix-radio-workspace-v2 #track-list {
  /*
   * Five-song viewport.
   * Remaining real tracks scroll inside
   * the playlist instead of extending page.
   */
  max-height: 440px;
  margin: 0;
  padding: 0 8px 0 0;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color:
    #d6b54f
    rgba(255, 255, 255, .06);
}

#matrix-radio-workspace-v2
#track-list::-webkit-scrollbar {
  width: 8px;
}

#matrix-radio-workspace-v2
#track-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .04);
  border-radius: 20px;
}

#matrix-radio-workspace-v2
#track-list::-webkit-scrollbar-thumb {
  background: #caa745;
  border-radius: 20px;
}

#matrix-radio-workspace-v2
.track-row {
  min-height: 82px;
  margin: 0 0 7px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 13px;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, .035),
      rgba(255, 255, 255, .012)
    );
  transition:
    border-color .18s ease,
    background .18s ease,
    transform .18s ease;
}

#matrix-radio-workspace-v2
.track-row:hover {
  border-color: rgba(226, 188, 79, .58);
  background:
    linear-gradient(
      90deg,
      rgba(226, 188, 79, .12),
      rgba(255, 255, 255, .02)
    );
  transform: translateX(2px);
}

#matrix-radio-workspace-v2
.track-row[hidden] {
  display: none !important;
}

.matrix-radio-list-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 5px 2px;
  color: rgba(255, 255, 255, .58);
  font-size: .78rem;
}

.matrix-radio-now-playing-label {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  padding: 7px 11px;
  border-radius: 7px;
  background: #e1b842;
  color: #090909;
  font-size: .72rem;
  font-weight: 1000;
  letter-spacing: .08em;
}

.matrix-radio-preview {
  display: grid;
  grid-template-columns:
    minmax(170px, 42%)
    minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  min-height: 310px;
  margin-bottom: 18px;
}

.matrix-radio-cover-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(222, 187, 79, .52);
  border-radius: 17px;
  background: #050505;
  box-shadow:
    0 18px 38px rgba(0, 0, 0, .42),
    0 0 28px rgba(215, 179, 70, .08);
}

.matrix-radio-track-cover {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.matrix-radio-preview-info {
  min-width: 0;
}

.matrix-radio-preview-info h2 {
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.04;
}

.matrix-radio-preview-info p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, .66);
}

.matrix-radio-audio-mount audio {
  width: 100% !important;
  margin: 0 0 16px !important;
}

.matrix-radio-controls-mount {
  display: grid;
  gap: 14px;
}

.matrix-radio-timeline {
  display: grid;
  grid-template-columns:
    auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
}

.matrix-radio-timeline
#seek-control {
  width: 100%;
}

.matrix-radio-transport {
  display: flex;
  gap: 13px;
  align-items: center;
  justify-content: center;
}

.matrix-radio-transport button {
  min-width: 54px;
  min-height: 48px;
}

.matrix-radio-transport
#play-pause {
  min-width: 66px;
  min-height: 58px;
  border-color: #e3bc4c;
  border-radius: 999px;
}

.matrix-radio-volume {
  display: grid;
  grid-template-columns:
    auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.matrix-radio-volume
#volume-control {
  width: 100%;
}

.matrix-radio-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.matrix-radio-controls-mount
#player-message {
  min-height: 24px;
  text-align: center;
}

@media (max-width: 860px) {
  .matrix-radio-main-grid {
    grid-template-columns: 1fr;
  }

  .matrix-radio-preview {
    grid-template-columns:
      minmax(130px, 200px)
      minmax(0, 1fr);
    min-height: 0;
  }
}

@media (max-width: 580px) {
  .matrix-radio-workspace-v2 {
    width: min(
      100% - 18px,
      1180px
    );
    margin-top: 18px;
  }

  .matrix-radio-search-row {
    grid-template-columns:
      auto 1fr;
  }

  .matrix-radio-clear-search {
    grid-column: 1 / -1;
  }

  .matrix-radio-preview {
    grid-template-columns: 1fr;
    padding-top: 34px;
  }

  .matrix-radio-cover-shell {
    width: min(100%, 330px);
    margin-inline: auto;
  }

  #matrix-radio-workspace-v2
  #track-list {
    max-height: 420px;
  }

  .matrix-radio-list-footer {
    flex-direction: column;
  }
}

/* MATRIXALIGNER RADIO LAYOUT V2 END */

