@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  --ink: #0b1120;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --paper: #ffffff;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --lime: #d9f99d;
  --lime-dark: #3f6212;
  --emerald: #10b981;
  --x-black: #000000;
  --blue-v: #1d9bf0;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  font-family: 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

button, input, textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* 导航条 */
.header-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-badge {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--ink);
  color: var(--lime);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
}

.brand-text small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--ink);
}

.nav-x-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: #fff;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.nav-x-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* 主内容容器 */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 100px;
}

/* Hero 首屏 */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0 64px;
}

.hero-title {
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 20px;
}

.hero-title span {
  color: #059669;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 540px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 36px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
  transition: all 0.15s ease;
}

.btn-primary:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background: var(--surface-alt);
}

.trust-badges {
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--text-muted);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.trust-item svg {
  color: var(--emerald);
}

/* 右侧交互动态循环卡片 */
.hero-stage {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 36px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 16px;
}

.stage-tag {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--lime);
  font-weight: 700;
}

.stage-loop {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.loop-step {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.05);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.step-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--lime);
}

.step-info strong {
  display: block;
  font-size: 15px;
  color: #fff;
}

.step-info small {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

/* 全站实时指标栏 */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-light);
}

/* 工作区与接力中心 */
.workspace-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 64px;
  box-shadow: var(--shadow-sm);
}

.section-head {
  margin-bottom: 32px;
}

.section-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 8px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 15px;
}

/* 登录面板 */
.auth-panel {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 20px;
}

.x-logo-large {
  font-size: 48px;
  margin-bottom: 16px;
}

.auth-panel h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.auth-panel p {
  color: var(--text-muted);
  margin-bottom: 28px;
}

.auth-rules-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  text-align: left;
  margin-bottom: 32px;
}

.auth-rule-card {
  background: var(--surface-alt);
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: var(--radius-md);
}

.auth-rule-card strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 6px;
}

.auth-rule-card small {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
  display: block;
}

.btn-x-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--x-black);
  color: #fff;
  width: 100%;
  max-width: 380px;
  padding: 14px 24px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 16px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-x-login:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.dev-mock-bar {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--text-muted);
}

.dev-mock-btn {
  color: #2563eb;
  font-weight: 600;
  text-decoration: underline;
  margin-left: 6px;
}

/* 已登录个人工作台 */
.relay-stage-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.user-profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-alt);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #fff;
}

.user-names strong {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  color: var(--ink);
}

.badge-blue-v {
  color: var(--blue-v);
  display: inline-flex;
}

.user-names span {
  font-size: 13px;
  color: var(--text-muted);
}

.logout-btn {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.logout-btn:hover {
  color: #ef4444;
}

/* 步骤流卡片 */
.flow-step-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.flow-step-card.active {
  border-color: #059669;
  background: #f0fdf4;
}

.step-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.step-card-num {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--ink);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}

.flow-step-card.active .step-card-num {
  background: #059669;
}

.step-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.action-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

.input-text {
  flex: 1;
  min-width: 280px;
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 14px;
}

.input-text:focus {
  outline: none;
  border-color: var(--ink);
}

/* 专属激活码大卡片 */
.code-display-box {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  margin: 16px 0;
}

.code-title {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--lime);
  font-weight: 600;
  margin-bottom: 12px;
}

.code-value {
  font-family: 'Space Grotesk', monospace;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
  margin-bottom: 16px;
  word-break: break-all;
}

.code-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* 裂变发推卡片 */
.share-x-box {
  background: #f8fafc;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.share-x-text {
  font-size: 14px;
  color: var(--text);
}

/* 邀请码池队列 */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.inventory-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item-left strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
}

.item-left small {
  color: var(--text-light);
  font-size: 12px;
}

.status-pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 600;
}

.status-pill.active {
  background: #dcfce7;
  color: #15803d;
}

.status-pill.waiting {
  background: #fef3c7;
  color: #b45309;
}

/* 教程网格 */
.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.tutorial-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
}

.tutorial-step-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #059669;
  margin-bottom: 12px;
}

.tutorial-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
}

.tutorial-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* FAQ 列表 */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 24px;
}

.faq-item summary {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  color: var(--text-muted);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 页脚 */
footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 48px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

footer a {
  color: var(--ink);
  font-weight: 600;
}

/* Toast 提示浮窗 */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--ink);
  color: #fff;
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 999;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* 模态框 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: #fff;
  width: 90%;
  max-width: 440px;
  padding: 32px;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-box h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}

.modal-box p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

/* 响应式适配 */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 24px 0 40px;
  }
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  .tutorial-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}
