:root {
  color-scheme: dark;
  --bg: #070814;
  --panel: rgba(18, 22, 44, .82);
  --panel-strong: rgba(25, 30, 60, .94);
  --card: rgba(37, 43, 82, .78);
  --line: rgba(160, 146, 255, .22);
  --text: #f8f7ff;
  --muted: #b7b4d6;
  --soft: #7f7aa8;
  --primary: #8b5cf6;
  --primary-2: #c084fc;
  --blue: #38bdf8;
  --green: #22c55e;
  --red: #ef4444;
  --warn: #f59e0b;
  --shadow: 0 24px 90px rgba(0, 0, 0, .42);
  --radius: 24px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(139, 92, 246, .26), transparent 34rem),
    radial-gradient(circle at 82% 12%, rgba(56, 189, 248, .16), transparent 30rem),
    linear-gradient(135deg, #080915, #160922 48%, #091820);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

button, input, select {
  font: inherit;
}

button {
  cursor: pointer;
}

code {
  padding: .18rem .42rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: .55rem;
  background: rgba(255,255,255,.07);
  color: #e9d5ff;
}

.aurora {
  position: fixed;
  inset: auto;
  width: 34rem;
  height: 34rem;
  border-radius: 999px;
  filter: blur(80px);
  opacity: .36;
  pointer-events: none;
  z-index: -1;
}

.aurora-one {
  top: 5rem;
  left: -10rem;
  background: #8b5cf6;
}

.aurora-two {
  right: -12rem;
  bottom: 8rem;
  background: #0ea5e9;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(255,255,255,.09);
  background: rgba(7, 8, 20, .72);
  backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 1rem;
  background: linear-gradient(135deg, #7c3aed, #38bdf8);
  box-shadow: 0 12px 40px rgba(124, 58, 237, .36);
  color: white;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong { letter-spacing: -.03em; }
.brand small { color: var(--muted); font-size: .78rem; }

.nav {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
}

.nav a {
  padding: .6rem .78rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: .92rem;
}

.nav a:hover {
  color: white;
  background: rgba(255,255,255,.08);
}

main {
  width: min(1220px, calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  padding: clamp(3.4rem, 7vw, 6.6rem) 0 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.07fr) minmax(320px, .72fr);
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  min-height: calc(100vh - 5rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
  color: #d8b4fe;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .78rem;
}

.eyebrow::before {
  content: "";
  width: .55rem;
  height: .55rem;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 20px var(--green);
}

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

h1 {
  max-width: 12ch;
  font-size: clamp(3.2rem, 8vw, 7.2rem);
  line-height: .88;
  letter-spacing: -.08em;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -.055em;
  line-height: 1;
}

h3 {
  font-size: 1.25rem;
  letter-spacing: -.03em;
}

.hero-copy p {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.24rem);
  line-height: 1.75;
}

.hero-actions,
.button-row,
.inline-form,
.trust-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .8rem;
}

.trust-row {
  margin-top: 1.3rem;
  color: var(--muted);
  font-size: .92rem;
}

.trust-row span {
  padding: .58rem .78rem;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: .78rem 1.08rem;
  border: 0;
  border-radius: .95rem;
  color: white;
  font-weight: 900;
  transition: transform .18s ease, filter .18s ease, background .18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn.primary {
  background: linear-gradient(135deg, #7c3aed, #c084fc);
  box-shadow: 0 16px 48px rgba(124, 58, 237, .34);
}

.btn.secondary {
  background: linear-gradient(135deg, #0ea5e9, #22d3ee);
  color: #04131d;
}

.btn.ghost {
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.07);
}

.glass,
.panel,
.metric-card,
.deploy-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(35, 39, 75, .86), rgba(14, 17, 35, .82));
  box-shadow: var(--shadow);
}

.hero-card {
  padding: clamp(1.2rem, 3vw, 2rem);
  transform: rotate(1.5deg);
}

.player-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.player-preview small {
  color: var(--muted);
}

.player-preview strong {
  display: block;
  margin: .25rem 0;
  font-size: 1.35rem;
}

.player-preview p {
  margin: 0;
  color: var(--soft);
}

.disc {
  display: grid;
  place-items: center;
  width: 5.8rem;
  height: 5.8rem;
  border-radius: 999px;
  background:
    radial-gradient(circle, #0b0d18 0 18%, transparent 19%),
    conic-gradient(from 60deg, #7c3aed, #38bdf8, #22c55e, #f59e0b, #7c3aed);
  animation: spin 9s linear infinite;
}

.disc span {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: #f8f7ff;
}

@keyframes spin { to { transform: rotate(360deg); } }

.wave {
  display: flex;
  align-items: end;
  gap: .4rem;
  height: 8rem;
  margin: 2rem 0;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 1.2rem;
  background: rgba(255,255,255,.045);
}

.wave i {
  flex: 1;
  min-width: .7rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #c084fc, #38bdf8);
  animation: pulse 1.3s ease-in-out infinite;
}

.wave i:nth-child(1) { height: 25%; animation-delay: .05s; }
.wave i:nth-child(2) { height: 58%; animation-delay: .11s; }
.wave i:nth-child(3) { height: 35%; animation-delay: .2s; }
.wave i:nth-child(4) { height: 77%; animation-delay: .28s; }
.wave i:nth-child(5) { height: 48%; animation-delay: .36s; }
.wave i:nth-child(6) { height: 92%; animation-delay: .44s; }
.wave i:nth-child(7) { height: 63%; animation-delay: .52s; }
.wave i:nth-child(8) { height: 31%; animation-delay: .6s; }
.wave i:nth-child(9) { height: 72%; animation-delay: .68s; }
.wave i:nth-child(10) { height: 44%; animation-delay: .76s; }

@keyframes pulse {
  0%, 100% { transform: scaleY(.72); opacity: .74; }
  50% { transform: scaleY(1); opacity: 1; }
}

.quick-controls,
.control-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
}

.quick-controls button,
.control-grid button {
  min-height: 3.2rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 1rem;
  background: rgba(255,255,255,.075);
  color: white;
  font-weight: 900;
}

.quick-controls button:hover,
.control-grid button:hover {
  background: rgba(139, 92, 246, .25);
}

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

.status-pill {
  padding: .7rem .9rem;
  border: 1px solid rgba(245, 158, 11, .35);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, .12);
  font-weight: 900;
}

.status-pill.ok {
  border-color: rgba(34, 197, 94, .4);
  color: #bbf7d0;
  background: rgba(34, 197, 94, .12);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.metric-card {
  padding: 1.15rem;
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin: .45rem 0 .28rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(1.6rem, 3vw, 2.45rem);
  letter-spacing: -.05em;
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.panel {
  padding: 1.2rem;
}

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

.panel-head h3 {
  margin-bottom: 0;
}

.panel-head span {
  color: var(--muted);
  font-size: .88rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

label {
  display: block;
  margin: .8rem 0;
  color: var(--muted);
  font-weight: 800;
  font-size: .88rem;
}

input, select {
  width: 100%;
  margin-top: .42rem;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: .95rem;
  outline: 0;
  background: rgba(5, 8, 18, .74);
  color: white;
  padding: .88rem .95rem;
}

input:focus,
select:focus {
  border-color: rgba(192, 132, 252, .62);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .16);
}

.inline-form {
  margin-top: 1rem;
}

.inline-form input {
  width: 150px;
  margin: 0;
}

.cards-list {
  display: grid;
  gap: .85rem;
}

.player-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 1.25rem;
  background: rgba(255,255,255,.055);
}

.player-card h3 {
  margin-bottom: .35rem;
}

.player-card p {
  margin-bottom: .45rem;
  color: var(--muted);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: .42rem;
}

.pill {
  padding: .35rem .55rem;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.05);
  font-size: .78rem;
  font-weight: 800;
}

.profile-box {
  margin-top: .9rem;
  padding: .95rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 1rem;
  background: rgba(255,255,255,.045);
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  margin-top: .75rem;
}

.toggle-grid button {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: .85rem;
  background: rgba(255,255,255,.07);
  color: white;
  padding: .72rem;
  font-weight: 900;
}

.toggle-grid button.on {
  border-color: rgba(34, 197, 94, .38);
  background: rgba(34, 197, 94, .16);
}

.deploy-card {
  padding: 1.2rem;
}

.deploy-card span {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .8rem;
  background: linear-gradient(135deg, #7c3aed, #38bdf8);
  font-weight: 1000;
}

.deploy-card h3 {
  margin: 1rem 0 .5rem;
}

.deploy-card p,
.muted,
.hint {
  color: var(--muted);
  line-height: 1.65;
}

.console {
  width: 100%;
  min-height: 170px;
  max-height: 460px;
  overflow: auto;
  margin: 0;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 1.2rem;
  background: rgba(3, 6, 16, .82);
  color: #dbeafe;
  white-space: pre-wrap;
}

.mini-console {
  min-height: 120px;
  margin-top: 1rem;
  font-size: .82rem;
}

.modal {
  width: min(560px, calc(100% - 2rem));
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: transparent;
  color: var(--text);
  padding: 0;
}

.modal::backdrop {
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(8px);
}

.modal-card {
  padding: 1.25rem;
  border-radius: 1.4rem;
  background: linear-gradient(180deg, #1b1f3d, #0e1123);
  box-shadow: var(--shadow);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: .75rem;
  background: rgba(255,255,255,.06);
  color: white;
}

.check-line {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.check-line input {
  width: auto;
  margin: 0;
}

.footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 5rem auto 0;
  padding: 2rem 1rem;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,.08);
}

.legal {
  width: min(900px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 6rem 0 3rem;
}

.legal-card {
  padding: clamp(1.2rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.legal-card h1 {
  max-width: none;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: .95;
}

.legal-card h2 {
  margin-top: 2rem;
  font-size: 1.45rem;
}

.legal-card p,
.legal-card li {
  color: var(--muted);
  line-height: 1.75;
}

@media (max-width: 980px) {
  .nav { display: none; }
  .hero,
  .grid.two,
  .grid.three,
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    min-height: auto;
    padding-top: 3rem;
  }
  .hero-card {
    transform: none;
  }
}

@media (max-width: 620px) {
  main { width: min(100% - 1rem, 1220px); }
  .topbar { padding-inline: .75rem; }
  .brand small { display: none; }
  .form-grid,
  .toggle-grid,
  .quick-controls,
  .control-grid {
    grid-template-columns: 1fr;
  }
  h1 { font-size: clamp(2.8rem, 16vw, 4.4rem); }
}
