:root {
  color-scheme: dark;
  --page-bg: #08090d;
  --card-bg: rgba(20, 21, 28, 0.92);
  --card-border: rgba(255, 255, 255, 0.11);
  --text: #f8f8fb;
  --muted: #aaaeba;
  --accent: #e8552f;
  --accent-strong: #ff6a42;
  --control: rgba(255, 255, 255, 0.08);
  --control-hover: rgba(255, 255, 255, 0.14);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-bg);
}

body.smart-link-page {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(232, 85, 47, 0.22), transparent 34rem),
    radial-gradient(circle at 90% 22%, rgba(106, 75, 175, 0.2), transparent 28rem),
    var(--page-bg);
}

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

button,
input {
  font: inherit;
}

.smart-link-shell {
  width: min(100% - 28px, 620px);
  margin: 0 auto;
  padding: 34px 0 48px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-link img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.brand-link:hover {
  color: var(--text);
}

.release-card {
  overflow: hidden;
  border: 1px solid var(--card-border);
  border-radius: 24px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.release-hero {
  padding: 26px 26px 22px;
  text-align: center;
}

.artwork-wrap {
  position: relative;
  width: min(100%, 380px);
  margin: 0 auto;
}

.release-artwork {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 17px;
  background: #17181e;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  object-fit: cover;
}

.catalog-code {
  margin: 24px 0 7px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.release-title {
  margin: 0;
  font-size: clamp(1.75rem, 7vw, 2.6rem);
  line-height: 1.06;
}

.release-artist {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 600;
}

.utility-bar {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
}

.utility-button,
.dialog-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 15px;
  color: var(--text);
  background: var(--control);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 700;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.utility-button:hover,
.dialog-button:hover {
  border-color: var(--card-border);
  background: var(--control-hover);
  transform: translateY(-1px);
}

.utility-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.player-wrap {
  padding: 0 26px 25px;
}

.video-frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 14px;
  background: #000;
}

.platforms {
  padding: 0 26px 28px;
}

.section-label {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.platform-list {
  display: grid;
  gap: 10px;
}

.platform-link {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  min-height: 64px;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--card-border);
  border-radius: 15px;
  padding: 10px 13px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.platform-link:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: var(--control-hover);
  transform: translateY(-1px);
}

.platform-icon-wrap {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
}

.platform-icon-wrap img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.letter-logo {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 900;
}

.letter-logo.boomplay {
  background: linear-gradient(145deg, #7b33ff, #3d0ba8);
}

.platform-name {
  overflow: hidden;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-action {
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--text);
  background: var(--control);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.smart-link-footer {
  padding: 22px 18px 0;
  color: #7f838e;
  font-size: 0.78rem;
  text-align: center;
}

.smart-link-footer a {
  color: inherit;
}

.embed-dialog {
  width: min(100% - 28px, 520px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 0;
  color: var(--text);
  background: #181920;
  box-shadow: var(--shadow);
}

.embed-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.dialog-content {
  padding: 24px;
}

.dialog-content h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.dialog-content p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.5;
}

.embed-code {
  width: 100%;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 12px;
  color: var(--text);
  background: #0c0d11;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 16px;
}

.dialog-button.primary {
  background: var(--accent);
}

.toast {
  position: fixed;
  z-index: 100;
  right: 50%;
  bottom: 24px;
  max-width: calc(100% - 32px);
  border-radius: 999px;
  padding: 11px 17px;
  color: #111;
  background: #fff;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.32);
  font-size: 0.86rem;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(50%, 0);
}

:focus-visible {
  outline: 3px solid #ffb39f;
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .smart-link-shell {
    width: min(100% - 18px, 620px);
    padding-top: 14px;
  }

  .release-card {
    border-radius: 20px;
  }

  .release-hero,
  .platforms {
    padding-right: 16px;
    padding-left: 16px;
  }

  .player-wrap {
    padding-right: 16px;
    padding-left: 16px;
  }

  .utility-button {
    min-width: 0;
    padding: 0 12px;
  }

  .utility-button span {
    font-size: 0.78rem;
  }
}

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