:root {
  --sa-bg: #050612;
  --sa-surface: #0c0f20;
  --sa-surface-soft: #11152a;
  --sa-accent: #e0ffb6;
  --sa-accent-soft: rgba(224, 255, 182, 0.14);
  --sa-text: #f7f7ff;
  --sa-text-soft: #b1b5d6;
  --sa-border-subtle: rgba(255, 255, 255, 0.06);
  --sa-radius-lg: 20px;
  --sa-radius-md: 12px;
  --sa-radius-pill: 999px;
  --sa-shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.75);
  --sa-font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: var(--sa-font-sans);
  background: radial-gradient(circle at top, #1e2240 0, #050612 55%, #02030a 100%);
  color: var(--sa-text);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.sa-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: linear-gradient(
      to bottom,
      rgba(2, 3, 10, 0.9),
      rgba(2, 3, 10, 0.7),
      transparent
    );
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sa-header-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px 20px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sa-logo {
  height: 96px;
  width: auto;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.7));
}

.sa-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: var(--sa-radius-pill);
  background: rgba(10, 13, 30, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sa-nav-link {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sa-text-soft);
  transition: background 140ms ease, color 140ms ease;
}

.sa-nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--sa-text);
}

.sa-nav-link-active {
  background: var(--sa-accent-soft);
  color: var(--sa-accent);
}

.sa-main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.sa-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 0.85fr);
  gap: 28px;
  align-items: stretch;
}

.sa-hero {
  margin-bottom: 18px;
}

.sa-hero-content {
  max-width: 520px;
}

.sa-title {
  margin: 0 0 10px;
  font-size: clamp(32px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: 0.03em;
}

.sa-subtitle {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--sa-text-soft);
}

.sa-sky-section {
  display: flex;
  flex-direction: column;
}

.sa-sky-frame {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  background: radial-gradient(ellipse at top, #1e2a52 0%, #0a0f1f 40%, #02030a 70%, #010106 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.88);
  min-height: 500px;
  height: 70vh;
  max-height: 800px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sa-sky-frame:fullscreen {
  border-radius: 0;
  height: 100vh;
  max-height: 100vh;
  min-height: 100vh;
}

.sa-fullscreen-button {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  background: rgba(5, 6, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.sa-fullscreen-button:hover {
  background: rgba(5, 6, 18, 0.9);
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 1);
  transform: scale(1.05);
}

.sa-comets-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sa-sky {
  position: absolute;
  inset: 0;
  background-size: 200% 200%;
  opacity: 0.95;
  transition: opacity 0.6s ease;
}

.sa-sky-layer-back {
  background-image: 
    radial-gradient(ellipse 80% 60% at 15% 5%, rgba(39, 51, 106, 0.8) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 85% 15%, rgba(27, 48, 90, 0.6) 0%, transparent 50%),
    radial-gradient(ellipse 100% 80% at 50% 30%, rgba(10, 15, 31, 0.4) 0%, transparent 60%),
    linear-gradient(to bottom, #0a0f1f 0%, #02030a 40%, #010106 100%);
  animation: saSkyDriftBack 180s linear infinite;
}

.sa-sky-layer-front {
  background-image: 
    radial-gradient(ellipse 60% 40% at 25% 8%, rgba(151, 196, 255, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 35% at 75% 5%, rgba(255, 200, 168, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 50% 12%, rgba(224, 255, 182, 0.08) 0%, transparent 50%);
  mix-blend-mode: screen;
  animation: saSkyDriftFront 150s linear infinite;
  animation-direction: reverse;
}

.sa-sky-stars {
  position: absolute;
  inset: 0;
  background-repeat: repeat;
  background-size: 400px 400px;
  mix-blend-mode: screen;
  opacity: 0.85;
  transition: opacity 0.8s ease;
}

.sa-sky-stars-dense {
  background-image: 
    radial-gradient(2px 2px at 8% 15%, rgba(255, 255, 255, 0.95), transparent),
    radial-gradient(1.5px 1.5px at 12% 25%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(2px 2px at 18% 35%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1px 1px at 25% 45%, rgba(224, 255, 182, 0.8), transparent),
    radial-gradient(2px 2px at 35% 55%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1.5px 1.5px at 42% 65%, rgba(202, 221, 255, 0.75), transparent),
    radial-gradient(2px 2px at 50% 20%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1px 1px at 58% 30%, rgba(224, 255, 182, 0.7), transparent),
    radial-gradient(2px 2px at 65% 40%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1.5px 1.5px at 72% 50%, rgba(207, 222, 255, 0.8), transparent),
    radial-gradient(2px 2px at 80% 60%, rgba(255, 255, 255, 0.85), transparent),
    radial-gradient(1px 1px at 88% 70%, rgba(224, 255, 182, 0.75), transparent),
    radial-gradient(2px 2px at 95% 25%, rgba(255, 255, 255, 0.9), transparent);
  animation: saStarsTwinkle 12s ease-in-out infinite alternate;
}

.sa-sky-stars-sparse {
  background-image: 
    radial-gradient(1px 1px at 5% 8%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(0.8px 0.8px at 15% 18%, rgba(224, 255, 182, 0.65), transparent),
    radial-gradient(1px 1px at 28% 28%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(0.8px 0.8px at 38% 38%, rgba(207, 222, 255, 0.7), transparent),
    radial-gradient(1px 1px at 48% 48%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(0.8px 0.8px at 58% 58%, rgba(224, 255, 182, 0.65), transparent),
    radial-gradient(1px 1px at 68% 68%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(0.8px 0.8px at 78% 28%, rgba(207, 222, 255, 0.7), transparent),
    radial-gradient(1px 1px at 88% 38%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(0.8px 0.8px at 95% 48%, rgba(224, 255, 182, 0.6), transparent);
  animation: saStarsTwinkleSoft 20s ease-in-out infinite alternate;
}

.sa-sky-mountains {
  position: absolute;
  inset-inline: 0;
  bottom: -5%;
  height: 50%;
  background:
    radial-gradient(ellipse 40% 30% at 15% 0%, rgba(151, 196, 255, 0.25), transparent 70%),
    radial-gradient(ellipse 35% 25% at 85% 0%, rgba(224, 255, 182, 0.18), transparent 75%),
    linear-gradient(to top, 
      rgba(1, 3, 10, 0.98) 0%,
      rgba(3, 6, 18, 0.95) 30%,
      rgba(6, 10, 28, 0.92) 60%,
      rgba(8, 12, 32, 0.88) 100%
    ),
    linear-gradient(to top, 
      #010208 0%,
      #02030b 20%,
      #030510 40%,
      #040612 60%,
      transparent 85%
    );
  clip-path: polygon(
    0% 65%,
    5% 58%,
    12% 52%,
    18% 48%,
    25% 45%,
    32% 42%,
    40% 40%,
    48% 38%,
    55% 40%,
    62% 42%,
    68% 45%,
    75% 48%,
    82% 52%,
    88% 55%,
    95% 58%,
    100% 62%,
    100% 100%,
    0% 100%
  );
  animation: saMountainsShift 200s cubic-bezier(0.4, 0, 0.6, 1) infinite alternate;
  filter: blur(0.5px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.sa-sky-comet {
  position: absolute;
  border-radius: 999px;
  opacity: 0;
  transform-origin: right center;
  will-change: transform, opacity;
}

.sa-sidebar {
  display: flex;
  justify-content: stretch;
}

.sa-player-card {
  background: radial-gradient(circle at top left, #1a2044, #050612 55%);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--sa-shadow-soft);
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 320px;
}

.sa-player-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 14px;
  margin-bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sa-section-title {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sa-text-soft);
}

.sa-section-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--sa-text-soft);
}

.sa-player-active {
  padding: 14px 14px 12px;
  border-radius: 20px;
  background: linear-gradient(
    145deg,
    rgba(13, 18, 46, 0.98),
    rgba(7, 11, 30, 0.98)
  );
  border: 1px solid rgba(224, 255, 182, 0.18);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sa-track-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sa-track-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--sa-text-soft);
}

.sa-track-title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.sa-controls-row {
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sa-controls-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.sa-control-button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 11, 29, 0.96);
  color: var(--sa-text);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  transition: background 120ms ease, border-color 120ms ease,
    transform 80ms ease, box-shadow 120ms ease;
}

.sa-control-button:hover {
  background: rgba(14, 19, 48, 0.96);
  border-color: rgba(255, 255, 255, 0.3);
}

.sa-control-button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) inset;
}

.sa-control-primary {
  padding-inline: 20px;
  background: linear-gradient(135deg, #e0ffb6, #8ef2c1);
  color: #050612;
  border-color: transparent;
  font-weight: 600;
}

.sa-control-primary:hover {
  box-shadow: 0 0 0 1px rgba(193, 255, 158, 0.5),
    0 10px 24px rgba(158, 255, 193, 0.36);
  background: linear-gradient(135deg, #f0ffd3, #9ef7cf);
}

.sa-control-secondary {
  width: 100%;
  justify-content: center;
  background: rgba(8, 11, 29, 0.96);
}

.sa-volume-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sa-volume-group-vertical {
  margin-top: 8px;
  justify-content: flex-end;
}

.sa-timeline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sa-time {
  font-size: 11px;
  color: var(--sa-text-soft);
  min-width: 32px;
}

.sa-slider {
  appearance: none;
  -webkit-appearance: none;
  width: 100px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  outline: none;
  cursor: pointer;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

/* Mobile-friendly slider */
@media (max-width: 640px) {
  .sa-slider {
    height: 8px;
    min-width: 120px;
  }
  
  .sa-slider::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
  }
  
  .sa-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
  }
}

.sa-slider.sa-slider-wide {
  flex: 1;
}

.sa-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--sa-accent);
  box-shadow: 0 0 0 3px rgba(224, 255, 182, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sa-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 4px rgba(224, 255, 182, 0.5), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.sa-slider::-webkit-slider-thumb:active {
  transform: scale(1.1);
}

.sa-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--sa-accent);
  border: none;
  box-shadow: 0 0 0 3px rgba(224, 255, 182, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sa-slider::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 4px rgba(224, 255, 182, 0.5), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.sa-slider::-moz-range-thumb:active {
  transform: scale(1.1);
}

.sa-chip {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.sa-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px 20px 18px;
  margin-top: 10px;
}

.sa-footer-text {
  max-width: 1040px;
  margin: 0 auto;
  font-size: 12px;
  color: var(--sa-text-soft);
  text-align: center;
}

.sa-footer-text a {
  color: var(--sa-accent);
}

.sa-about-hero {
  padding-top: 10px;
}

.sa-about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
  gap: 32px;
  align-items: flex-start;
}

.sa-about-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sa-body {
  margin: 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--sa-text-soft);
}

.sa-body-small {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--sa-text-soft);
}

.sa-creator-card {
  background: radial-gradient(circle at top, #1d2346, #080b1d);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px;
  box-shadow: var(--sa-shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sa-creator-image {
  width: 100%;
  border-radius: 16px;
  object-fit: cover;
  max-height: 260px;
}

.sa-creator-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sa-creator-note {
  margin: 0;
  font-size: 14px;
}

.sa-creator-label {
  font-weight: 500;
  color: var(--sa-text-soft);
}

.sa-creator-name {
  font-weight: 600;
}

.sa-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes saSkyDriftBack {
  0% {
    background-position: 0% 0%;
    opacity: 0.95;
  }
  33% {
    background-position: 40% 25%;
    opacity: 1;
  }
  66% {
    background-position: 80% 50%;
    opacity: 0.98;
  }
  100% {
    background-position: 120% 75%;
    opacity: 0.95;
  }
}

@keyframes saSkyDriftFront {
  0% {
    background-position: 20% 0%;
    opacity: 0.9;
  }
  33% {
    background-position: 60% 20%;
    opacity: 1;
  }
  66% {
    background-position: 100% 40%;
    opacity: 0.95;
  }
  100% {
    background-position: 140% 60%;
    opacity: 0.9;
  }
}

@keyframes saStarsTwinkle {
  0% {
    opacity: 0.55;
  }
  50% {
    opacity: 0.9;
  }
  100% {
    opacity: 0.6;
  }
}

@keyframes saStarsTwinkleSoft {
  0% {
    opacity: 0.25;
  }
  50% {
    opacity: 0.65;
  }
  100% {
    opacity: 0.3;
  }
}

/* Comet animations are now handled dynamically in sky-animations.js */

@keyframes saMountainsShift {
  0% {
    clip-path: polygon(
      0% 65%,
      5% 58%,
      12% 52%,
      18% 48%,
      25% 45%,
      32% 42%,
      40% 40%,
      48% 38%,
      55% 40%,
      62% 42%,
      68% 45%,
      75% 48%,
      82% 52%,
      88% 55%,
      95% 58%,
      100% 62%,
      100% 100%,
      0% 100%
    );
    opacity: 0.98;
  }
  50% {
    clip-path: polygon(
      0% 63%,
      6% 56%,
      13% 50%,
      19% 46%,
      26% 43%,
      33% 40%,
      41% 38%,
      49% 36%,
      56% 38%,
      63% 40%,
      69% 43%,
      76% 46%,
      83% 50%,
      89% 53%,
      96% 56%,
      100% 60%,
      100% 100%,
      0% 100%
    );
    opacity: 1;
  }
  100% {
    clip-path: polygon(
      0% 67%,
      7% 60%,
      14% 54%,
      20% 50%,
      27% 47%,
      34% 44%,
      42% 42%,
      50% 40%,
      57% 42%,
      64% 44%,
      70% 47%,
      77% 50%,
      84% 54%,
      90% 57%,
      97% 60%,
      100% 64%,
      100% 100%,
      0% 100%
    );
    opacity: 0.98;
  }
}

@media (max-width: 880px) {
  .sa-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sa-sky-frame {
    min-height: 400px;
    height: 60vh;
  }

  .sa-sidebar {
    justify-content: flex-start;
  }

  .sa-about-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .sa-header-inner {
    padding-inline: 14px;
  }

  .sa-main {
    padding-inline: 14px;
  }

  .sa-player-card {
    padding: 18px 16px 14px;
    border-radius: 22px;
  }

  .sa-footer {
    padding-inline: 14px;
  }
}

