/* ============================================================
   GlobeLink 公共页面设计系统
   深色高级感 · 清晰层级 · PC优先 · 兼容移动端
   ============================================================ */

:root {
  --bg-base: #070b1a;
  --bg-deep: #0a1024;
  --bg-panel: rgba(255, 255, 255, 0.04);
  --bg-panel-strong: rgba(255, 255, 255, 0.07);
  --border-soft: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text-primary: #f1f4ff;
  --text-secondary: #a8b3d0;
  --text-muted: #6f7a9c;
  --accent: #4f7cff;
  --accent-2: #8b5cf6;
  --success: #34d399;
  --danger: #f87171;
  --warning: #fbbf24;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-lg: 0 24px 60px -18px rgba(0, 0, 0, 0.55);
  --shadow-md: 0 14px 40px -14px rgba(0, 0, 0, 0.5);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  /* 全局细微网格背景 */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, rgba(0, 0, 0, 0.65), transparent 70%);
  z-index: 0;
}

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

button,
input {
  font-family: inherit;
}

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

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ---------------- 顶部导航 ---------------- */

.site-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 22px 0;
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.site-brand .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(79, 124, 255, 0.7);
}

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

.nav-link-plain {
  color: var(--text-secondary);
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link-plain:hover {
  color: var(--text-primary);
  background: var(--bg-panel-strong);
}

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 26px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease,
    opacity 0.2s ease;
  user-select: none;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 30px -10px rgba(79, 124, 255, 0.65);
}

.btn-primary:hover {
  box-shadow: 0 16px 38px -10px rgba(79, 124, 255, 0.8);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--text-primary);
  background: var(--bg-panel-strong);
  border: 1px solid var(--border-soft);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: var(--border-strong);
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn .spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn.loading .spinner {
  display: inline-block;
}

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

/* ---------------- 首页 Hero ---------------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 130px 0 80px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 520px;
  background: radial-gradient(ellipse at center, rgba(79, 124, 255, 0.22), transparent 65%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(79, 124, 255, 0.12);
  border: 1px solid rgba(79, 124, 255, 0.35);
  color: #a9c0ff;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 22px;
}

.hero-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18);
}

.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.12;
  letter-spacing: -1px;
  font-weight: 800;
  background: linear-gradient(120deg, #ffffff 30%, #9db8ff 70%, #c4b5fd);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  margin-top: 18px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-secondary);
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.hero-points {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 38px;
  color: var(--text-secondary);
  font-size: 14px;
}

.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-points li::before {
  content: "✓";
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.14);
  color: var(--success);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Hero 右侧产品示意卡片 */

.hero-visual {
  position: relative;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: -12%;
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.16), transparent 68%);
  pointer-events: none;
}

.panel {
  position: relative;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border-soft);
}

.panel-head span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.panel-head span:first-child {
  background: #f87171;
}

.panel-head span:nth-child(2) {
  background: #fbbf24;
}

.panel-head span:nth-child(3) {
  background: #34d399;
}

.panel-body {
  padding: 22px;
  display: grid;
  gap: 14px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.metric {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 14px;
}

.metric .m-label {
  font-size: 12px;
  color: var(--text-muted);
}

.metric .m-value {
  margin-top: 5px;
  font-size: 18px;
  font-weight: 700;
}

.metric .m-value.good {
  color: var(--success);
}

.status-list {
  display: grid;
  gap: 10px;
}

.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
}

.status-item .s-name {
  color: var(--text-secondary);
}

.status-item .s-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-weight: 600;
}

.status-item .s-state::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.16);
}

/* ---------------- 特性区块 ---------------- */

.features {
  padding: 90px 0 40px;
  position: relative;
  z-index: 1;
}

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
}

.section-head h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  letter-spacing: -0.4px;
  font-weight: 800;
}

.section-head p {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 15px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 124, 255, 0.4);
  background: var(--bg-panel-strong);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(79, 124, 255, 0.22), rgba(139, 92, 246, 0.22));
  border: 1px solid rgba(79, 124, 255, 0.3);
  color: #9db8ff;
  margin-bottom: 18px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------------- CTA 区块 ---------------- */

.cta-band {
  padding: 70px 0 100px;
  position: relative;
  z-index: 1;
}

.cta-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 64px 30px;
  border-radius: 24px;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(ellipse at 50% 120%, rgba(79, 124, 255, 0.28), transparent 60%),
    var(--bg-panel);
}

.cta-card h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.4px;
}

.cta-card p {
  color: var(--text-secondary);
  margin: 12px auto 28px;
  max-width: 420px;
}

/* ---------------- 页脚 ---------------- */

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-soft);
  padding: 28px 0;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 13px;
}

.site-footer a {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--text-primary);
}

/* ---------------- 登录 / 注册 ---------------- */

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 64px;
  position: relative;
  z-index: 1;
}

.auth-shell {
  width: 100%;
  max-width: 980px;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  background: rgba(13, 18, 38, 0.72);
  backdrop-filter: blur(16px);
}

.auth-brand {
  position: relative;
  padding: 48px 42px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(79, 124, 255, 0.3), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(139, 92, 246, 0.26), transparent 55%),
    linear-gradient(165deg, #101736, #0b1128);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
}

.auth-brand .brand-name {
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-brand .brand-name .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  box-shadow: 0 6px 18px -6px rgba(79, 124, 255, 0.7);
}

.auth-brand h2 {
  margin-top: 56px;
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -0.5px;
  font-weight: 800;
}

.auth-brand > p {
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.75;
}

.auth-points {
  list-style: none;
  margin-top: 34px;
  display: grid;
  gap: 14px;
}

.auth-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.6;
}

.auth-points li svg {
  flex-shrink: 0;
  color: var(--accent);
}

.auth-card {
  padding: 48px 46px;
}

.auth-card-head h2 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.auth-card-head p {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-notice {
  margin-top: 20px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  color: #fcd34d;
  font-size: 13px;
  line-height: 1.6;
}

.auth-form {
  margin-top: 28px;
  display: grid;
  gap: 18px;
}

.form-group {
  display: grid;
  gap: 7px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus {
  border-color: rgba(79, 124, 255, 0.65);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.14);
}

.captcha-row {
  display: grid;
  grid-template-columns: 1fr 128px;
  gap: 10px;
  align-items: center;
}

.captcha-img {
  width: 128px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  cursor: pointer;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
}

.form-error {
  display: none;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fca5a5;
  font-size: 13px;
  line-height: 1.6;
}

.form-error.show {
  display: block;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  cursor: pointer;
  user-select: none;
}

.checkbox-row input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-row a {
  color: #9db8ff;
}

.checkbox-row a:hover {
  text-decoration: underline;
}

.auth-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 22px;
  font-size: 13.5px;
}

.auth-links a {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.auth-links a:hover {
  color: var(--text-primary);
}

.auth-links .link-accent {
  color: #9db8ff;
  font-weight: 600;
}

/* Turnstile 容器适配 */
.cf-turnstile {
  margin-top: 2px;
}

/* ---------------- Toast ---------------- */

.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: grid;
  gap: 10px;
  width: min(92vw, 420px);
  pointer-events: none;
}

.toast {
  padding: 13px 18px;
  border-radius: 12px;
  font-size: 14px;
  color: #fff;
  box-shadow: var(--shadow-md);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease;
  animation: toast-in 0.25s ease;
}

.toast-success {
  background: rgba(16, 185, 129, 0.95);
}

.toast-danger {
  background: rgba(239, 68, 68, 0.95);
}

.toast-hide {
  opacity: 0;
  transform: translateY(-8px);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero-visual {
    max-width: 560px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .auth-shell {
    grid-template-columns: 1fr;
    max-width: 520px;
  }

  .auth-brand {
    display: none;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 0 18px;
  }

  .hero {
    padding-top: 112px;
  }

  .hero-actions .btn {
    flex: 1;
  }

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

  .auth-wrap {
    padding: 104px 14px 40px;
  }

  .auth-card {
    padding: 34px 24px;
  }

  .metric-row {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer .container {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* ---------------- 协议页 ---------------- */

.agreement-page {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.agreement-wrap {
  max-width: 840px;
  margin: 0 auto;
  padding: 130px 24px 70px;
}

.agreement-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 46px 50px;
  box-shadow: var(--shadow-md);
}

.agreement-card h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.3px;
  text-align: center;
}

.agreement-card .agreement-updated {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 8px;
  margin-bottom: 34px;
}

.agreement-card h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 28px 0 10px;
}

.agreement-card p,
.agreement-card li {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.85;
}

.agreement-card ul {
  padding-left: 20px;
  margin: 8px 0;
  display: grid;
  gap: 6px;
}

.agreement-card a {
  color: #9db8ff;
}

.agreement-card a:hover {
  text-decoration: underline;
}

@media (max-width: 560px) {
  .agreement-wrap {
    padding: 110px 16px 40px;
  }

  .agreement-card {
    padding: 30px 22px;
  }
}
