:root {
  --bg-0: #050913;
  --bg-1: #0a1326;
  --bg-2: #0f1f3f;
  --surface: rgba(9, 20, 44, 0.72);
  --surface-2: rgba(12, 28, 62, 0.82);
  --text: #f2f7ff;
  --muted: #9fb5d8;
  --line: rgba(85, 128, 198, 0.35);
  --primary: #21d6ff;
  --primary-2: #1b9cff;
  --accent: #ff8b2a;
  --ok: #39d98a;
  --warn: #ff4d6d;
  --radius: 18px;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: Rajdhani, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(33, 214, 255, 0.2), transparent 55%),
    radial-gradient(800px 600px at 90% 10%, rgba(255, 139, 42, 0.18), transparent 50%),
    linear-gradient(165deg, var(--bg-0), var(--bg-1) 45%, var(--bg-2));
  overflow-x: hidden;
}

.site-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 50% 50%, #000 40%, transparent 100%);
  opacity: 0.14;
  z-index: -1;
}

.container {
  width: min(1160px, calc(100% - 2.4rem));
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
  font-family: Orbitron, sans-serif;
  letter-spacing: 0.02em;
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 0 24px rgba(33, 214, 255, 0.35);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
}

.nav a:hover {
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.4rem;
  align-items: center;
  margin-top: 1rem;
}

.hero-copy,
.hero-art,
.panel,
.card,
.support-box,
.stat-card {
  background: var(--surface);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 2rem;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: Orbitron, sans-serif;
  font-size: 0.78rem;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: Orbitron, sans-serif;
  line-height: 1.1;
}

h1 {
  margin: 0.6rem 0 1rem;
  font-size: clamp(2rem, 4vw, 3.1rem);
}

h2 {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
}

h3 {
  font-size: 1.08rem;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1.15rem;
}

.hero-actions {
  margin-top: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-art {
  padding: 1rem;
  position: relative;
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(45deg, rgba(33, 214, 255, 0.12), rgba(255, 139, 42, 0.1));
  pointer-events: none;
}

.hero-art img {
  width: 100%;
  border-radius: calc(var(--radius) - 6px);
  display: block;
}

.section {
  margin-top: 2.2rem;
}

.card-grid {
  display: grid;
  gap: 1rem;
}

.card-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.panel {
  padding: 1.2rem;
}

.card p,
.panel p {
  color: var(--muted);
  margin-bottom: 0;
}

.support-box {
  padding: 1.4rem;
}

.footer {
  margin: 2.6rem auto 1rem;
  padding: 1rem 0 2rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer p {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  padding: 0.66rem 1.1rem;
  font-size: 0.98rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn-small {
  padding: 0.45rem 0.8rem;
  font-size: 0.9rem;
}

.btn-primary {
  color: #041017;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 12px 28px rgba(33, 214, 255, 0.3);
}

.btn-secondary {
  color: #211106;
  background: linear-gradient(135deg, #ffd089, var(--accent));
  box-shadow: 0 12px 28px rgba(255, 139, 42, 0.35);
}

.btn-ghost {
  color: var(--text);
  border-color: var(--line);
  background: rgba(11, 23, 46, 0.75);
}

.verify-layout,
.verify-shell {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
}

.verify-main {
  padding: 1.5rem;
}

.verify-side {
  padding: 1.2rem;
}

.flow-list {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.45rem;
}

.flow-list li {
  color: var(--muted);
}

.verify-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.captcha-box {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  margin: 1rem 0;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
}

.checkline input {
  width: 18px;
  height: 18px;
}

.fine {
  margin-top: 0.8rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.state-panel .state-item {
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem;
  margin-top: 0.8rem;
}

.state-panel .state-item.active {
  display: block;
}

.state-title {
  color: var(--text);
  font-weight: 700;
}

.state-success {
  border-color: rgba(57, 217, 138, 0.55);
  background: rgba(57, 217, 138, 0.08);
}

.state-idle {
  border-color: rgba(33, 214, 255, 0.4);
  background: rgba(33, 214, 255, 0.06);
}

.state-error {
  border-color: rgba(255, 77, 109, 0.55);
  background: rgba(255, 77, 109, 0.08);
}

.state-already {
  border-color: rgba(33, 214, 255, 0.55);
  background: rgba(33, 214, 255, 0.08);
}

.trust-grid {
  margin-top: 1rem;
  display: grid;
  gap: 0.65rem;
}

.trust-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem;
  background: rgba(8, 19, 42, 0.78);
}

.trust-item h3 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.trust-item p {
  margin: 0;
  color: var(--muted);
}

.dot-spinner {
  width: 16px;
  height: 16px;
  border: 3px solid rgba(33, 214, 255, 0.3);
  border-top-color: var(--primary);
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
  margin-right: 0.6rem;
  vertical-align: middle;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.panel.wide {
  grid-column: 1 / -1;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.stat-card {
  padding: 0.9rem;
  background: var(--surface-2);
}

.stat-card span {
  color: var(--muted);
  display: block;
  font-size: 0.92rem;
}

.stat-card strong {
  font-family: Orbitron, sans-serif;
  font-size: 1.25rem;
}

.form-grid {
  display: grid;
  gap: 0.8rem;
}

.form-grid label {
  display: grid;
  gap: 0.3rem;
  color: var(--text);
  font-weight: 600;
}

.form-grid input,
.form-grid select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  background: rgba(4, 12, 29, 0.8);
  color: var(--text);
  font: inherit;
}

.actions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 0.6rem;
}

th {
  color: var(--primary);
}

.log-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.log-list li {
  border-left: 3px solid var(--primary);
  background: rgba(15, 29, 58, 0.75);
  padding: 0.65rem 0.7rem;
  border-radius: 8px;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: revealUp 0.72s ease forwards;
}

.stagger-1 {
  animation-delay: 0.1s;
}

.stagger-2 {
  animation-delay: 0.2s;
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .hero,
  .verify-layout,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .container {
    width: min(1160px, calc(100% - 1.2rem));
  }

  .topbar {
    padding-top: 0.9rem;
  }

  .brand span {
    font-size: 0.95rem;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}
