/* ========================================
   Token Genesis - Dark Gold Theme
   精确还原 tokengenesisai.com
   ======================================== */

/* --- CSS Variables --- */
:root {
  --bg: #080a0f;
  --bg-panel: #0c0f18;
  --bg-card: #0f1220;
  --border: rgba(214, 180, 106, 0.1);
  --border-hover: rgba(214, 180, 106, 0.25);
  --ink: #f5f5f2;
  --ink-dim: #a09b8c;
  --ink-muted: #6b6658;
  --gold: rgba(214, 180, 106, 0.9);
  --gold-dim: rgba(214, 180, 106, 0.5);
  --gold-glow: rgba(214, 180, 106, 0.15);
  --gold-border: rgba(214, 180, 106, 0.2);
  --font-en: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: var(--font-en);
  --radius: 8px;
  --header-h: 64px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

img {
  max-width: 100%;
  display: block;
}

button, select, input {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

/* --- Animated Background (Mesh + Scan) --- */
.stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.mesh {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(214, 180, 106, 0.08) 1px, transparent 0);
  background-size: 48px 48px;
  animation: meshDrift 30s linear infinite;
}

@keyframes meshDrift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(48px, 48px); }
}

.scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(214, 180, 106, 0.03) 50%,
    transparent 100%
  );
  background-size: 100% 8px;
  animation: scanMove 8s linear infinite;
  opacity: 0.5;
}

@keyframes scanMove {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

/* --- Content Layer --- */
.content {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 100;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}

.header.scrolled {
  background: rgba(8, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --- Logo --- */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.logo-icon {
  width: 28px;
  height: 28px;
}

.logo-text {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
}

/* --- Desktop Nav --- */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 14px;
  color: var(--ink-dim);
  transition: color 0.2s;
  letter-spacing: 0.01em;
}

.nav-link:hover {
  color: var(--gold);
}

/* --- Mobile Menu Button --- */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--ink-dim);
  transition: all 0.3s;
  border-radius: 1px;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}
.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Mobile Menu --- */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(8, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: 32px 24px;
  gap: 8px;
}

.mobile-nav-link {
  font-size: 18px;
  color: var(--ink-dim);
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.mobile-nav-link:hover {
  color: var(--gold);
}

/* --- Hero Section --- */
.hero {
  padding: calc(var(--header-h) + 80px) 24px 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 10, 15, 0.3) 0%,
    rgba(8, 10, 15, 0.6) 50%,
    var(--bg) 100%
  );
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.5;
  z-index: 1;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-badge {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink-dim);
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--ink);
}

.hero-desc {
  font-size: 16px;
  color: var(--ink-dim);
  margin-bottom: 44px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--gold);
  color: var(--bg);
  border: 1px solid var(--gold);
}

.btn-primary:hover {
  background: rgba(214, 180, 106, 1);
  box-shadow: 0 0 24px var(--gold-glow), 0 0 48px rgba(214, 180, 106, 0.08);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border-hover);
}

.btn-ghost:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
  background: rgba(214, 180, 106, 0.05);
}

/* --- Sections --- */
.section {
  padding: 80px 24px;
  position: relative;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.section-number {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 400;
  color: var(--gold-dim);
  letter-spacing: 0.1em;
  opacity: 0.7;
}

.section-title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.section-link {
  font-size: 14px;
  color: var(--gold-dim);
  margin-left: auto;
  transition: color 0.2s;
}

.section-link:hover {
  color: var(--gold);
}

.section-desc {
  font-size: 15px;
  color: var(--ink-dim);
  line-height: 1.7;
  max-width: 640px;
  margin-bottom: 40px;
}

/* --- Network Grid --- */
.network-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.network-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s;
}

.network-card:hover {
  border-color: var(--gold-border);
  background: rgba(214, 180, 106, 0.04);
  transform: translateY(-2px);
}

.network-icon {
  width: 32px;
  height: 32px;
  color: var(--gold-dim);
  flex-shrink: 0;
}

.network-icon svg {
  width: 100%;
  height: 100%;
}

.network-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.network-status {
  font-size: 12px;
  color: var(--ink-muted);
  margin-left: auto;
}

/* --- Investigate Form --- */
.investigate-form {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}

.select-wrapper {
  position: relative;
}

.form-select {
  width: 100%;
  padding: 12px 40px 12px 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s;
}

.form-select:hover,
.form-select:focus {
  border-color: var(--gold-border);
}

.form-select option {
  background: var(--bg-panel);
  color: var(--ink);
}

.select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--ink-muted);
  pointer-events: none;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-input::placeholder {
  color: var(--ink-muted);
}

.form-input:focus {
  border-color: var(--gold-border);
}

.btn-submit {
  align-self: flex-start;
  min-width: 140px;
}

.form-note {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* --- Footer --- */
.footer {
  margin-top: auto;
  padding: 40px 24px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-dim);
}

.footer-logo {
  width: 22px;
  height: 22px;
}

.footer-copy {
  font-size: 13px;
  color: var(--ink-muted);
}

/* --- Fade-in Animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .mobile-menu {
    display: block;
  }

  .hero {
    padding: calc(var(--header-h) + 48px) 20px 60px;
  }

  .hero::before {
    width: 300px;
    height: 300px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-desc {
    font-size: 15px;
  }

  .section {
    padding: 48px 20px;
  }

  .network-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .section-header {
    flex-direction: column;
    gap: 8px;
  }

  .section-link {
    margin-left: 0;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .btn-submit {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .network-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .network-card {
    padding: 16px 20px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
  }
}
