:root {
  --bg-1: #07090f;
  --bg-2: #121722;
  --ink: #f6fbff;
  --muted: #9db2bf;
  --danger: #ff364f;
  --danger-glow: #ff6b7f;
  --neon: #29f0d0;
  --panel: rgba(9, 14, 24, 0.72);
  --line: rgba(255, 255, 255, 0.13);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  font-family: "Chakra Petch", "Segoe UI", sans-serif;
  background:
    radial-gradient(1100px 620px at 9% -18%, rgba(255, 54, 79, 0.3), transparent 62%),
    radial-gradient(900px 580px at 100% 4%, rgba(41, 240, 208, 0.21), transparent 62%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2));
  overflow-x: hidden;
}

.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.02) 0,
    rgba(255, 255, 255, 0.02) 1px,
    transparent 1px,
    transparent 4px
  );
  opacity: 0.35;
  z-index: 0;
}

.halo {
  position: fixed;
  border-radius: 999px;
  filter: blur(55px);
  pointer-events: none;
  z-index: 0;
}

.halo-a {
  width: 340px;
  height: 340px;
  background: rgba(255, 54, 79, 0.26);
  top: -120px;
  left: -80px;
  animation: floatA 9s ease-in-out infinite;
}

.halo-b {
  width: 320px;
  height: 320px;
  background: rgba(41, 240, 208, 0.2);
  right: -110px;
  bottom: -120px;
  animation: floatB 11s ease-in-out infinite;
}

.container {
  position: relative;
  z-index: 1;
  width: min(1080px, 92vw);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) 0 2.5rem;
}

.hero {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(21, 27, 39, 0.9), rgba(7, 11, 18, 0.8));
  padding: clamp(1.2rem, 3vw, 2.2rem);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 24px 70px rgba(0, 0, 0, 0.35);
}

.kicker {
  margin: 0;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--danger-glow);
  font-weight: 600;
  font-size: 0.82rem;
}

.hero h1 {
  margin: 0.2rem 0 0;
  font-family: "Bebas Neue", "Chakra Petch", sans-serif;
  line-height: 0.9;
}

.hero h1 .thin,
.hero h1 .heavy {
  display: block;
  font-size: clamp(3rem, 13vw, 8rem);
  letter-spacing: 0.04em;
}

.hero h1 .thin {
  color: rgba(246, 251, 255, 0.78);
}

.hero h1 .heavy {
  color: var(--danger);
  text-shadow: 0 0 28px rgba(255, 54, 79, 0.38);
}

.subtitle {
  margin: 0.9rem 0 0;
  width: min(62ch, 100%);
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
}

.actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.3rem;
  flex-wrap: wrap;
}

.btn {
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 12px;
  padding: 0.72rem 1.12rem;
  transition: transform 180ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #121212;
  background: linear-gradient(110deg, var(--danger), #ff6f5d);
  box-shadow: 0 10px 32px rgba(255, 54, 79, 0.35);
}

.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(7, 12, 20, 0.6);
}

.btn-ghost:hover {
  border-color: var(--neon);
  box-shadow: 0 0 0 1px rgba(41, 240, 208, 0.45) inset;
}

.grid {
  display: grid;
  margin-top: 1rem;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.8rem;
}

.panel {
  grid-column: span 4;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  background: var(--panel);
  backdrop-filter: blur(5px);
}

.panel-alert {
  box-shadow: 0 0 0 1px rgba(255, 54, 79, 0.26) inset;
}

.label {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--muted);
}

.value {
  margin: 0.45rem 0 0;
  font-size: clamp(1.2rem, 2.8vw, 1.9rem);
  font-weight: 700;
}

.meta {
  margin: 0.35rem 0 0;
  color: #b6c7d7;
}

.status-live {
  color: var(--neon);
  text-shadow: 0 0 16px rgba(41, 240, 208, 0.55);
}

.status-fail {
  color: var(--danger-glow);
}

.hidden {
  display: none !important;
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.8rem;
  margin-top: 0.95rem;
}

.control-panel {
  grid-column: span 6;
}

.form-label {
  display: block;
  margin-top: 0.7rem;
  margin-bottom: 0.32rem;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
}

.input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(10, 16, 27, 0.82);
  color: var(--ink);
  padding: 0.62rem 0.74rem;
  font: inherit;
}

.input:focus {
  outline: none;
  border-color: var(--neon);
  box-shadow: 0 0 0 1px rgba(41, 240, 208, 0.35);
}

.inline-actions {
  margin-top: 0.75rem;
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}

.toggle-row {
  margin-top: 0.72rem;
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.64rem;
  border-radius: 999px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid transparent;
}

.badge-neutral {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.badge-live {
  color: #092017;
  background: rgba(41, 240, 208, 0.9);
  border-color: rgba(41, 240, 208, 1);
}

.badge-off {
  color: #300b11;
  background: rgba(255, 107, 127, 0.92);
  border-color: rgba(255, 107, 127, 1);
}

.token-list {
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.42rem;
}

.token-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(9, 15, 25, 0.88);
  padding: 0.52rem 0.62rem;
}

.token-row.muted {
  justify-content: flex-start;
  color: var(--muted);
}

.token-remove {
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  font-size: 0.75rem;
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: revealUp 600ms ease forwards;
}

.grid.reveal {
  animation-delay: 120ms;
}

.section {
  margin-top: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  background: rgba(7, 12, 21, 0.58);
}

.section-head h2 {
  margin: 0.25rem 0 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.8rem;
  margin-top: 0.95rem;
}

.feature-grid.two .feature-card {
  grid-column: span 6;
}

.feature-card {
  grid-column: span 3;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.9rem;
  background: linear-gradient(160deg, rgba(18, 24, 36, 0.9), rgba(8, 12, 20, 0.75));
}

.feature-card h3 {
  margin: 0;
  font-size: 1.08rem;
  color: var(--ink);
}

.feature-card p {
  margin: 0.55rem 0 0;
  color: #c1cfde;
}

.feature-card.compact {
  min-height: 100%;
}

.endpoint-grid {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.8rem;
}

.rule-list {
  margin: 0.55rem 0 0;
  padding-left: 1.15rem;
  color: #c1cfde;
}

.rule-list li + li {
  margin-top: 0.3rem;
}

.flow-strip {
  border-color: rgba(41, 240, 208, 0.45);
  background:
    linear-gradient(145deg, rgba(14, 25, 36, 0.88), rgba(8, 12, 20, 0.74));
  box-shadow:
    0 0 0 1px rgba(41, 240, 208, 0.2) inset,
    0 14px 34px rgba(0, 0, 0, 0.28);
}

.flow-steps {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.flow-step {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 0.9rem;
  background: rgba(7, 14, 22, 0.82);
}

.flow-index {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--neon);
  font-weight: 700;
}

.flow-step h3 {
  margin: 0.45rem 0 0;
  font-size: 1.05rem;
}

.flow-step p {
  margin: 0.5rem 0 0;
  color: #c1cfde;
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatA {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(20px, 12px);
  }
}

@keyframes floatB {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-18px, -16px);
  }
}

@media (max-width: 900px) {
  .panel {
    grid-column: span 6;
  }

  .feature-card {
    grid-column: span 6;
  }

  .control-panel {
    grid-column: span 12;
  }

  .endpoint-grid {
    grid-template-columns: 1fr;
  }

  .flow-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(94vw, 560px);
  }

  .hero {
    padding: 1.1rem;
  }

  .panel {
    grid-column: span 12;
  }

  .feature-card,
  .feature-grid.two .feature-card {
    grid-column: span 12;
  }

  .control-panel {
    grid-column: span 12;
  }

  .actions {
    gap: 0.6rem;
  }

  .btn {
    width: 100%;
    text-align: center;
  }
}
