:root {
  --bg-night: #05020c;
  --bg-deep: #120820;
  --panel: rgba(14, 8, 28, 0.9);
  --panel-strong: rgba(12, 8, 24, 0.97);
  --panel-border: rgba(68, 242, 255, 0.34);
  --panel-shadow: rgba(255, 78, 177, 0.18);
  --text-main: #f8ebff;
  --text-soft: #d8bff2;
  --neon-cyan: #44f2ff;
  --neon-pink: #ff4eb1;
  --neon-gold: #ffca72;
  --neon-violet: #8e53ff;
  --orbit-radius: clamp(220px, 30vw, 360px);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(255, 78, 177, 0.12), transparent 28%),
    linear-gradient(180deg, var(--bg-night), var(--bg-deep));
  color: var(--text-main);
  font-family: 'Chakra Petch', sans-serif;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(circle at 18% 20%, rgba(68, 242, 255, 0.12), transparent 18%),
    radial-gradient(circle at 84% 18%, rgba(255, 78, 177, 0.12), transparent 22%),
    radial-gradient(circle at 50% 80%, rgba(142, 83, 255, 0.12), transparent 20%);
  filter: blur(20px);
}

body::after {
  background: repeating-linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02) 0 2px,
    transparent 2px 5px
  );
  opacity: 0.15;
}

.hub2-page {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 16px;
  overflow: hidden;
}

.hub2-topbar,
.hub2-bottombar {
  position: relative;
  z-index: 4;
}

.hub2-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.hub2-chip-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hub2-chip,
.prompt-box,
.jukebox-panel {
  border: 2px solid var(--panel-border);
  background:
    linear-gradient(180deg, rgba(68, 242, 255, 0.08), rgba(10, 6, 18, 0.96)),
    var(--panel-strong);
  box-shadow:
    0 0 0 2px rgba(7, 4, 15, 0.88),
    0 0 24px var(--panel-shadow);
  backdrop-filter: blur(12px);
}

.hub2-chip {
  min-height: 46px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-cyan);
  font-family: 'Silkscreen', monospace;
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hub2-chip.radio-chip {
  color: #fff4d6;
  border-color: rgba(255, 202, 114, 0.4);
}

.hub2-chip.switch-chip {
  color: #ffe8f5;
  text-decoration: none;
  border-color: rgba(255, 78, 177, 0.42);
  box-shadow:
    0 0 0 2px rgba(7, 4, 15, 0.88),
    0 0 24px rgba(255, 78, 177, 0.24);
}

.hub2-chip.switch-chip:hover,
.hub2-chip.switch-chip:focus-visible {
  outline: none;
  color: #fffafe;
  border-color: rgba(255, 176, 108, 0.8);
  transform: translateY(-1px);
}

.hub2-viewport {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
}

.hub2-orbit-stage {
  position: relative;
  width: min(1040px, 100%);
  height: min(100%, 76vh);
  min-height: 520px;
  display: grid;
  place-items: center;
}

.hub2-stars,
.hub2-nebula {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hub2-stars {
  background:
    radial-gradient(circle at 12% 26%, rgba(255, 255, 255, 0.95) 0 1px, transparent 1.6px),
    radial-gradient(circle at 26% 76%, rgba(68, 242, 255, 0.9) 0 1px, transparent 1.8px),
    radial-gradient(circle at 66% 18%, rgba(255, 255, 255, 0.9) 0 1px, transparent 1.7px),
    radial-gradient(circle at 88% 38%, rgba(255, 202, 114, 0.92) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 82%, rgba(255, 78, 177, 0.85) 0 1px, transparent 2px),
    radial-gradient(circle at 16% 58%, rgba(142, 83, 255, 0.85) 0 1px, transparent 2px);
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.4));
}

.hub2-nebula {
  filter: blur(38px);
  opacity: 0.75;
}

.hub2-nebula-left {
  background: radial-gradient(circle at 22% 50%, rgba(68, 242, 255, 0.22), transparent 40%);
}

.hub2-nebula-right {
  background: radial-gradient(circle at 76% 38%, rgba(255, 78, 177, 0.24), transparent 42%);
}

.hub2-orbit-system {
  position: relative;
  width: min(820px, 92vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.hub2-orbit-rings,
.hub2-orbit-layer {
  position: absolute;
  inset: 0;
}

.hub2-ring {
  position: absolute;
  inset: 50%;
  border: 1px solid rgba(68, 242, 255, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.hub2-ring-outer {
  width: calc(var(--orbit-radius) * 2.22);
  height: calc(var(--orbit-radius) * 2.22);
  box-shadow: 0 0 24px rgba(68, 242, 255, 0.06);
}

.hub2-ring-mid {
  width: calc(var(--orbit-radius) * 1.78);
  height: calc(var(--orbit-radius) * 1.78);
  border-color: rgba(255, 78, 177, 0.14);
}

.hub2-ring-inner {
  width: calc(var(--orbit-radius) * 1.22);
  height: calc(var(--orbit-radius) * 1.22);
  border-color: rgba(255, 202, 114, 0.12);
}

.hub2-planet-core {
  position: relative;
  z-index: 2;
  width: clamp(220px, 28vw, 340px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.hub2-planet-glow {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 78, 177, 0.42), rgba(68, 242, 255, 0.24) 42%, transparent 68%);
  filter: blur(28px);
  animation: pulseCore 7s ease-in-out infinite alternate;
}

.hub2-logo-planet {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 0 12px rgba(255, 255, 255, 0.12))
    drop-shadow(0 0 28px rgba(255, 78, 177, 0.32))
    drop-shadow(0 0 42px rgba(68, 242, 255, 0.24));
  animation: driftPlanet 9s ease-in-out infinite;
}

.hub2-orbit-layer {
  z-index: 4;
  pointer-events: none;
  animation: orbitSpin var(--orbit-duration) linear infinite;
}

.hub2-orbit-slot {
  position: absolute;
  inset: 0;
  transform: rotate(var(--orbit-angle));
  pointer-events: none;
}

.hub2-orbit-shell {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(var(--orbit-radius) * -1));
  animation: orbitCounterSpin var(--orbit-duration) linear infinite;
  pointer-events: none;
}

.hub2-orbiter-frame {
  transform: rotate(calc(var(--orbit-angle) * -1));
  pointer-events: none;
}

.hub2-orbiter {
  width: clamp(160px, 16vw, 196px);
  min-height: 132px;
  padding: 16px 18px;
  display: grid;
  gap: 8px;
  align-content: start;
  justify-items: start;
  border: 1px solid rgba(68, 242, 255, 0.24);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(20, 12, 36, 0.96), rgba(8, 4, 18, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 26px rgba(255, 78, 177, 0.12),
    0 0 32px rgba(68, 242, 255, 0.08);
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(10px);
  pointer-events: auto;
  filter: saturate(1) brightness(1);
  transition: border-color 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.hub2-orbiter:hover,
.hub2-orbiter:focus-visible {
  outline: none;
  border-color: rgba(68, 242, 255, 0.54);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 36px rgba(68, 242, 255, 0.16),
    0 0 42px rgba(255, 78, 177, 0.18);
  filter: saturate(1.08) brightness(1.08);
}

.hub2-orbiter strong {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.08rem;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hub2-orbiter-code {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--neon-cyan);
  font-family: 'Silkscreen', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hub2-orbiter-copy {
  color: var(--text-soft);
  line-height: 1.4;
  font-size: 0.96rem;
}

.hub2-orbiter-memory {
  border-color: rgba(255, 78, 177, 0.24);
}

.hub2-orbiter-memory .hub2-orbiter-code {
  color: #ffd7ef;
}

.hub2-orbiter-radio {
  border-color: rgba(255, 202, 114, 0.24);
}

.hub2-orbiter-radio .hub2-orbiter-code {
  color: #fff1c5;
}

.hub2-bottombar {
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.prompt-box {
  width: min(760px, 100%);
  min-height: 126px;
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255, 78, 177, 0.08), rgba(9, 6, 19, 0.98)),
    var(--panel-strong);
}

.prompt-title,
.jukebox-source {
  font-family: 'Silkscreen', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--neon-cyan);
}

.prompt-box p,
.jukebox-track {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.5;
}

.prompt-box p {
  min-height: 3em;
}

.jukebox-panel {
  position: absolute;
  left: 16px;
  bottom: 108px;
  z-index: 10;
  width: min(360px, calc(100% - 32px));
  padding: 14px 16px 16px;
  background:
    linear-gradient(180deg, rgba(255, 190, 110, 0.08), rgba(9, 6, 19, 0.98)),
    var(--panel-strong);
}

.jukebox-panel.hidden {
  display: none;
}

.jukebox-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.jukebox-source {
  margin-top: 6px;
  color: var(--neon-gold);
}

.jukebox-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.icon-button,
.pixel-button {
  min-height: 44px;
  border: 2px solid rgba(68, 242, 255, 0.28);
  background: linear-gradient(180deg, rgba(18, 11, 33, 1), rgba(7, 4, 14, 1));
  color: var(--text-main);
  font-family: 'Silkscreen', monospace;
  font-size: 12px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.03);
}

.icon-button {
  min-width: 44px;
  padding: 0 10px;
}

.pixel-button {
  flex: 1;
}

.pixel-button.primary {
  border-color: rgba(255, 78, 177, 0.38);
}

.icon-button:hover,
.icon-button:focus-visible,
.pixel-button:hover,
.pixel-button:focus-visible {
  outline: none;
  color: #fff5fb;
  border-color: rgba(255, 176, 108, 0.72);
  transform: translateY(-1px);
}

.soundcloud-widget-frame {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  left: -9999px;
  top: -9999px;
  border: 0;
}

@keyframes orbitSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes orbitCounterSpin {
  from {
    transform: translate(-50%, calc(var(--orbit-radius) * -1)) rotate(0deg);
  }
  to {
    transform: translate(-50%, calc(var(--orbit-radius) * -1)) rotate(-360deg);
  }
}

@keyframes driftPlanet {
  0% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.01);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes pulseCore {
  0% {
    opacity: 0.78;
    transform: scale(0.98);
  }
  100% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@media (max-width: 900px) {
  .hub2-page {
    gap: 14px;
    padding: 12px;
  }

  .hub2-topbar {
    justify-content: flex-start;
  }

  .hub2-orbit-stage {
    min-height: 460px;
  }
}

@media (max-width: 720px) {
  :root {
    --orbit-radius: clamp(155px, 36vw, 230px);
  }

  .hub2-page {
    grid-template-rows: auto 1fr auto;
  }

  .hub2-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .hub2-chip,
  .prompt-box,
  .jukebox-panel {
    width: 100%;
  }

  .prompt-box {
    min-height: 148px;
  }

  .hub2-chip.switch-chip {
    justify-content: center;
  }

  .hub2-orbit-stage {
    min-height: 400px;
    height: min(100%, 60vh);
  }

  .hub2-orbit-system {
    width: min(100%, 94vw);
  }

  .hub2-orbiter {
    width: 136px;
    min-height: 116px;
    padding: 14px;
    border-radius: 18px;
  }

  .hub2-orbiter strong {
    font-size: 0.9rem;
  }

  .hub2-orbiter-copy {
    font-size: 0.82rem;
  }

  .jukebox-panel {
    left: 12px;
    right: 12px;
    bottom: 108px;
    width: auto;
  }

  .jukebox-actions {
    flex-direction: column;
  }
}
