:root {
  color-scheme: dark;
  --bg: #030303;
  --ink: #f8f8f8;
  --muted: #a7a7a7;
  --soft: #6f6f6f;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.28);
  --glass: rgba(255, 255, 255, 0.055);
  --glass-strong: rgba(255, 255, 255, 0.11);
  --shadow: rgba(255, 255, 255, 0.16);
}

@property --border-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@property --logo-border-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: transparent;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.11), transparent 27rem),
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.08), transparent 31rem),
    radial-gradient(circle at 82% 44%, rgba(255, 255, 255, 0.06), transparent 30rem),
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.46) 68%, rgba(0, 0, 0, 0.62));
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.1) 62%, rgba(0, 0, 0, 0.46) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.22));
}

.video-backdrop {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background: #030303;
  pointer-events: none;
}

.video-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent 30%, transparent 70%, rgba(0, 0, 0, 0.24)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), transparent 36%, rgba(0, 0, 0, 0.22));
}

.background-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
  filter: grayscale(1) contrast(0.98) brightness(0.82);
  transform: scale(1.03);
}

.scene-dim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.15);
}

.page-shell {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 13px 0 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 7px 7px 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 7, 7, 0.58);
  box-shadow: 0 18px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.brand,
.header-actions,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.header-actions {
  flex: 0 1 auto;
  justify-content: flex-end;
  gap: 8px;
}

.brand {
  flex: 0 1 auto;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-mark {
  position: relative;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.12);
  transform: rotate(45deg);
}

.brand-mark::after {
  position: absolute;
  inset: 8px;
  content: "";
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 0 18px var(--shadow);
}

.stats-pill {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 126px;
  min-height: 34px;
  padding: 5px 14px 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent 45%),
    rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.stats-pill::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  transform: translateX(-130%);
  animation: statsSheen 5.5s ease-in-out infinite;
}

.stats-values,
.stats-labels {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  width: 100%;
  line-height: 1;
}

.stats-values {
  align-items: baseline;
  gap: 6px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
}

.active-count {
  display: inline-block;
  min-width: 3ch;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.active-count.is-changing {
  animation: countPulse 420ms ease;
}

.active-count.is-up {
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.58);
}

.active-count.is-down {
  color: rgba(255, 255, 255, 0.78);
}

.stats-separator {
  color: rgba(255, 255, 255, 0.44);
  font-weight: 800;
}

.stats-labels {
  gap: 12px;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.52rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-pill {
  min-height: 34px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.95);
  animation: pulseDot 1.8s ease-in-out infinite;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: auto;
  padding: clamp(52px, calc(2.4vw + 40px), 68px) 0 20px;
  text-align: center;
}

.orbital-logo {
  position: relative;
  width: 96px;
  height: 96px;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 0 28px rgba(255, 255, 255, 0.24));
}

.core-cube {
  position: relative;
  z-index: 2;
  width: 47px;
  height: 47px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.72), transparent 1.2rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.045));
  box-shadow:
    inset 0 0 22px rgba(255, 255, 255, 0.13),
    0 0 34px rgba(255, 255, 255, 0.16);
  transform: rotate(45deg);
}

.core-cube::after {
  display: block;
  width: 13px;
  height: 13px;
  margin: 16px auto 0;
  content: "";
  border-radius: 3px;
  background: #030303;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.orbit {
  position: absolute;
  inset: 10px;
  padding: 1px;
  border-radius: 21px;
  background: conic-gradient(
    from var(--logo-border-angle),
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.74),
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.08)
  );
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.08);
  pointer-events: none;
  transform: rotate(45deg);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: logoBorderSweep 4.8s linear infinite;
}

.orbit-one {
  opacity: 0.95;
}

.orbit-two {
  display: none;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1 {
  max-width: 980px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(3.08rem, 8.46vw, 7.31rem);
  line-height: 0.82;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow:
    0 0 24px rgba(255, 255, 255, 0.16),
    0 22px 80px rgba(255, 255, 255, 0.12);
}

.subtitle {
  max-width: 520px;
  margin: 20px auto 0;
  color: #d3d3d3;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.7;
}

.copy-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  width: min(600px, 100%);
  min-height: 58px;
  margin-top: 26px;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.035),
    0 28px 100px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px);
}

.input-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 44px;
  padding: 0 0 0 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.26);
}

.prefix {
  flex: 0 0 auto;
  margin-right: 10px;
  color: #fff;
  font-size: 0.77rem;
  font-weight: 900;
}

input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.copy-button,
.play-button {
  border: 0;
  color: #050505;
  background: #fff;
  cursor: pointer;
}

.copy-button {
  min-width: 144px;
  height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 0 28px rgba(255, 255, 255, 0.2);
  transition:
    transform 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
}

.copy-button:disabled {
  opacity: 0.32;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.copy-button:not(:disabled):hover {
  transform: translateY(-1px);
  background: #e6e6e6;
  box-shadow: 0 0 34px rgba(255, 255, 255, 0.32);
}

.copy-button:not(:disabled):active {
  transform: translateY(0);
}

.result-line {
  min-height: 24px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.preview {
  position: relative;
  width: min(620px, 100%);
  aspect-ratio: 2.35 / 1;
  min-height: 210px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.095), transparent 34%),
    rgba(0, 0, 0, 0.48);
  box-shadow:
    0 35px 120px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.preview::before {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 1px;
  content: "";
  border-radius: inherit;
  background: conic-gradient(
    from var(--border-angle, 0deg),
    transparent 0deg,
    transparent 68deg,
    rgba(255, 255, 255, 0.76) 86deg,
    transparent 116deg,
    transparent 210deg,
    rgba(255, 255, 255, 0.42) 236deg,
    transparent 266deg,
    transparent 360deg
  );
  pointer-events: none;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderSweep 7s linear infinite;
}

.preview-glow {
  position: absolute;
  inset: auto 8% -28% 8%;
  height: 55%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.18), transparent 68%);
  filter: blur(22px);
}

.preview-grid {
  position: absolute;
  inset: 34px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 12px;
  opacity: 0.32;
}

.preview-grid span {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.preview-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
}

.play-button {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.play-button:hover {
  transform: scale(1.04);
  background: rgba(255, 255, 255, 0.18);
}

.play-button span {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 13px solid #fff;
}

.preview-center p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

@keyframes pulseDot {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes statsSheen {
  0%,
  52% {
    transform: translateX(-130%);
  }

  76%,
  100% {
    transform: translateX(130%);
  }
}

@keyframes countPulse {
  0% {
    opacity: 0.45;
    transform: translateY(5px) scale(0.96);
  }

  55% {
    opacity: 1;
    transform: translateY(-2px) scale(1.04);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes logoBorderSweep {
  to {
    --logo-border-angle: 360deg;
  }
}

@keyframes borderSweep {
  to {
    --border-angle: 360deg;
  }
}

@media (max-width: 700px) {
  .page-shell {
    width: min(100% - 24px, 1120px);
    padding-top: 13px;
  }

  .topbar {
    border-radius: 18px;
    gap: 8px;
    padding: 6px;
  }

  .header-actions {
    gap: 6px;
  }

  .stats-pill {
    min-width: 112px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .stats-labels {
    gap: 10px;
  }

  .status-pill {
    padding: 0 11px;
  }

  .hero {
    min-height: auto;
    padding-top: 54px;
  }

  h1 {
    font-size: clamp(2.77rem, 14.62vw, 4.77rem);
    line-height: 0.86;
  }

  .subtitle {
    margin-top: 18px;
  }

  .copy-panel {
    grid-template-columns: 1fr;
    margin-top: 24px;
  }

  .copy-button {
    width: 100%;
  }

  .preview {
    aspect-ratio: 1.45 / 1;
    min-height: 210px;
    border-radius: 18px;
  }

  .preview-grid {
    inset: 22px;
    gap: 9px;
  }
}

@media (max-width: 480px) {
  .brand {
    gap: 8px;
    font-size: 0.75rem;
  }

  .brand-mark {
    width: 24px;
    height: 24px;
  }

  .stats-pill {
    min-width: 94px;
    min-height: 32px;
    padding: 4px 8px;
  }

  .stats-values {
    gap: 4px;
    font-size: 0.7rem;
  }

  .stats-labels {
    display: none;
  }

  .status-pill {
    min-height: 32px;
    padding: 0 10px;
  }

  .status-text {
    display: none;
  }
}

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