:root {
  --bg-top: #120723;
  --bg-bottom: #06121f;
  --card: rgba(18, 23, 48, 0.78);
  --card-strong: rgba(20, 28, 58, 0.92);
  --border: rgba(130, 232, 255, 0.32);
  --text: #f9f6ff;
  --muted: #d8d5f5;
  --pink: #ff87d1;
  --pink-strong: #ff4fb5;
  --blue: #72e6ff;
  --blue-strong: #29cfff;
  --shadow: 0 26px 70px rgba(3, 6, 20, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  isolation: isolate;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 135, 209, 0.2), transparent 30%),
    radial-gradient(circle at top right, rgba(114, 230, 255, 0.24), transparent 28%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  inset: auto;
  width: 34rem;
  height: 34rem;
  border-radius: 999px;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.28;
}

body::before {
  top: -8rem;
  left: -6rem;
  background: var(--pink);
}

body::after {
  right: -8rem;
  bottom: -10rem;
  background: var(--blue);
}

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 1rem 0 1.4rem;
}

.eyebrow,
.section-label {
  margin: 0 0 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  font-size: 0.78rem;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  line-height: 0.95;
  margin-bottom: 0.9rem;
  text-shadow: 0 0 18px rgba(255, 135, 209, 0.16);
}

h2 {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  margin-bottom: 0.75rem;
}

.lede,
.helper-text,
.status-pill {
  color: var(--muted);
}

.lede {
  max-width: 42rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-badge {
  position: relative;
  width: 9rem;
  height: 9rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}

.badge-ring,
.badge-core {
  position: absolute;
  border-radius: 999px;
}

.badge-ring-a,
.badge-ring-b {
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.badge-ring-a {
  background: linear-gradient(135deg, rgba(255, 135, 209, 0.32), rgba(114, 230, 255, 0.18));
  animation: pulse 4s ease-in-out infinite;
}

.badge-ring-b {
  inset: 0.8rem;
  border-color: rgba(114, 230, 255, 0.34);
  animation: pulse 4s ease-in-out infinite reverse;
}

.badge-core {
  inset: 2rem;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: 0.18em;
  background: radial-gradient(circle at top, #ffb2e3, #7be7ff 130%);
  color: #12162f;
  box-shadow: 0 0 35px rgba(114, 230, 255, 0.35);
}

.badge-core.is-offline {
  background: radial-gradient(circle at top, #f2e8f0, #b4c3d9 130%);
  color: #233041;
  box-shadow: 0 0 24px rgba(180, 195, 217, 0.2);
}

.grid {
  display: block;
}

.player-card {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #11152b, #080c1e);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.player-card {
  position: relative;
  isolation: isolate;
  padding: 1.3rem;
}

.player-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.status-pill {
  padding: 0.72rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(114, 230, 255, 0.22);
  color: var(--blue);
  font-size: 0.92rem;
  white-space: nowrap;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #04070e;
}

video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-frame.is-offline video {
  display: none;
}

.offline-panel {
  min-height: min(60vw, 42rem);
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
  background:
    radial-gradient(circle at top, rgba(255, 135, 209, 0.16), transparent 28%),
    radial-gradient(circle at bottom, rgba(114, 230, 255, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(8, 12, 30, 0.96), rgba(4, 7, 14, 0.98));
}

.offline-panel[hidden] {
  display: none;
}

.offline-kicker {
  margin: 0 0 0.8rem;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.82rem;
}

.offline-panel h3 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
}

.offline-panel p:last-child {
  margin: 0;
  color: var(--muted);
  max-width: 34rem;
  line-height: 1.6;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.stream-button {
  border: 1px solid rgba(114, 230, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.stream-button:hover,
.stream-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 135, 209, 0.5);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.stream-button.active {
  background: linear-gradient(90deg, rgba(255, 135, 209, 0.28), rgba(114, 230, 255, 0.24));
  border-color: rgba(255, 255, 255, 0.4);
}

.helper-text {
  margin: 1rem 0 0;
  line-height: 1.6;
}

.links-panel {
  margin-top: 1.4rem;
  padding: 1rem 1.05rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.7rem;
}

.link-list li {
  display: grid;
  gap: 0.35rem;
}

.link-list span {
  color: var(--text);
  font-weight: 700;
}

.link-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.94rem;
}

.link-list code {
  display: block;
  word-break: break-all;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92rem;
}

.copy-link {
  display: block;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(114, 230, 255, 0.18);
  background: linear-gradient(90deg, rgba(114, 230, 255, 0.08), rgba(114, 230, 255, 0.02));
  color: #baf4ff;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.copy-link code {
  color: #baf4ff;
}

.copy-link:hover,
.copy-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(114, 230, 255, 0.48);
  box-shadow: 0 0 0 1px rgba(114, 230, 255, 0.18), 0 12px 28px rgba(41, 207, 255, 0.14);
  background: linear-gradient(90deg, rgba(114, 230, 255, 0.18), rgba(114, 230, 255, 0.05));
  outline: none;
}

.copy-link.copied {
  border-color: rgba(255, 135, 209, 0.58);
  background: linear-gradient(90deg, rgba(255, 135, 209, 0.18), rgba(114, 230, 255, 0.12));
  box-shadow: 0 0 0 1px rgba(255, 135, 209, 0.12), 0 12px 30px rgba(255, 135, 209, 0.16);
}

.copy-link.copied code {
  color: #fff3fb;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@media (max-width: 920px) {
  .hero {
    flex-direction: column;
    align-items: start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 1rem, 1180px);
    padding-top: 1rem;
  }

  .player-card,
  .player-card {
    border-radius: 22px;
  }

  .player-card {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .status-pill {
    font-size: 0.84rem;
  }
}
