/* ================================================================
   金石量化 - AI 算力赞助页面样式
   独立 CSS，不依赖 admin.css
   ================================================================ */

/* ---- CSS Variables ---- */
:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #e0e7ff;
  --gold: #f0a500;
  --gold-dark: #c48800;
  --gold-light: #fff8e7;
  --danger: #dc2626;
  --success: #16a34a;
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.1), 0 4px 10px rgba(0,0,0,.06);
  --shadow-xl: 0 20px 50px rgba(0,0,0,.15);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Nav ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
}

.nav-brand .logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}

.nav-link {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 6px;
  transition: all .2s;
}

.nav-link:hover {
  background: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
}

/* ---- Container ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Section ---- */
.section {
  padding: 80px 0;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  color: var(--text);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 16px;
  text-align: center;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 48px;
}

/* ---- Hero ---- */
.hero {
  padding: 140px 0 80px;
  background: linear-gradient(160deg, #0f1d35 0%, #1a3555 30%, #1e3a5f 60%, #234b78 100%);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139,92,246,.1) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  color: #a5b4fc;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 24px;
  letter-spacing: .5px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 16px;
  letter-spacing: -1px;
  position: relative;
  z-index: 1;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 18px;
  color: rgba(255,255,255,.75);
  max-width: 640px;
  margin: 0 auto 20px;
  position: relative;
  z-index: 1;
  line-height: 2;
  text-align: center;
}

.hero-cta {
  font-size: 20px;
  color: #fbbf24;
  font-weight: 700;
  max-width: 640px;
  margin: 0 auto 32px;
  position: relative;
  z-index: 1;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  position: relative;
  z-index: 1;
  margin-top: 8px;
}

.hero-stat {
  text-align: center;
}

.hero-stat .num {
  font-size: 36px;
  font-weight: 800;
  color: #fbbf24;
}

.hero-stat .label {
  font-size: 13px;
  color: rgba(255,255,255,.55);
  margin-top: 2px;
}

/* ---- AI Features Grid ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.feature-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform .25s, box-shadow .25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
}

.feature-icon.blue   { background: #dbeafe; }
.feature-icon.green  { background: #dcfce7; }
.feature-icon.purple { background: #ede9fe; }
.feature-icon.amber  { background: #fef3c7; }

.feature-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

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

/* ---- Data Notice ---- */
.data-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 48px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.data-notice .notice-icon {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.data-notice .notice-content h4 {
  font-size: 15px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 4px;
}

.data-notice .notice-content p {
  font-size: 13px;
  color: #a16207;
  line-height: 1.7;
}

/* ---- Pricing ---- */
#pricing {
  background: var(--card-bg);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  cursor: pointer;
  transition: all .3s;
  position: relative;
  box-shadow: var(--shadow);
}

/* 季度卡 — 清爽蓝 */
.pricing-card:nth-child(1) {
  background: linear-gradient(160deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #bfdbfe;
}

/* 半年卡 — 尊贵紫（推荐） */
.pricing-card:nth-child(2) {
  background: linear-gradient(160deg, #f5f3ff 0%, #ede9fe 100%);
  border-color: #c4b5fd;
}

/* 包年卡 — 暖金 */
.pricing-card:nth-child(3) {
  background: linear-gradient(160deg, #fff7ed 0%, #fef3c7 100%);
  border-color: #fde68a;
}

.pricing-card:hover {
  border-color: #c4b5fd;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pricing-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(240,165,0,.15), var(--shadow-lg);
  transform: translateY(-4px);
}

.pricing-card.featured {
  border-color: #c4b5fd;
  box-shadow: var(--shadow-md);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 12px;
  white-space: nowrap;
}

.pricing-card .plan-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.pricing-card .plan-duration {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.pricing-card .plan-price {
  font-size: 42px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 4px;
}

.pricing-card .plan-price .currency {
  font-size: 22px;
  font-weight: 600;
  vertical-align: super;
}

.pricing-card .plan-price .unit {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-card .plan-per-month {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.pricing-card .plan-features {
  list-style: none;
  text-align: center;
  margin-bottom: 24px;
}

.pricing-card .plan-features li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.pricing-card .plan-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.pricing-card .btn-select {
  display: block;
  width: 100%;
  padding: 12px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--primary);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
}

.pricing-card .btn-select:hover {
  background: var(--primary);
  color: #fff;
}

.pricing-card.selected .btn-select {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

.pricing-card.selected .btn-select:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
}

/* ---- Form ---- */
#register {
  background: var(--bg);
}

.form-wrap {
  max-width: 520px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: #f8fafc;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
  background: #fff;
}

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

.form-group .input-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Agreement */
.agreement-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 24px 0;
}

.agreement-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.agreement-row label {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.agreement-row label a {
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
}

/* Submit Button */
.btn-submit {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .25s;
  letter-spacing: .5px;
}

.btn-submit:hover {
  background: linear-gradient(135deg, #4f46e5, #3730a3);
  box-shadow: 0 4px 12px rgba(79,70,229,.35);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-submit.loading {
  pointer-events: none;
  opacity: .7;
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.65);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .25s;
}

.modal-box {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 40px 36px;
  text-align: center;
  max-width: 420px;
  width: 90%;
  box-shadow: var(--shadow-xl);
  animation: slideUp .3s;
}

.modal-box .success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #dcfce7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin: 0 auto 16px;
}

.modal-box h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.modal-box .amount {
  font-size: 36px;
  font-weight: 900;
  color: var(--gold);
  margin-bottom: 20px;
}

.modal-box .qr-wrap {
  display: inline-block;
  padding: 20px;
  background: #fff;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.modal-box .qr-wrap .qr-img {
  width: 200px;
  height: 200px;
  object-fit: contain;
}

.modal-box .qr-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.7;
}

.modal-box .btn-close {
  padding: 10px 32px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}

.modal-box .btn-close:hover {
  background: var(--primary-dark);
}

/* ---- Agreement Modal ---- */
.agreement-modal {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.65);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .25s;
}

.agreement-modal .modal-box {
  max-width: 640px;
  max-height: 80vh;
  text-align: left;
  padding: 0;
  overflow: hidden;
}

.agreement-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
}

.agreement-modal .modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.agreement-modal .modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg);
  border-radius: 6px;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}

.agreement-modal .modal-close:hover {
  background: #fee2e2;
  color: var(--danger);
}

.agreement-modal .modal-body {
  padding: 24px 28px;
  max-height: 55vh;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-secondary);
  text-align: left;
}

.agreement-modal .modal-body h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 10px;
  text-align: left;
}

.agreement-modal .modal-body h4:first-child {
  margin-top: 0;
}

.agreement-modal .modal-body p {
  text-align: left;
  margin: 8px 0;
}

.agreement-modal .modal-body ul {
  margin: 8px 0 12px 20px;
  text-align: left;
}

.agreement-modal .modal-body ul li {
  margin-bottom: 6px;
}

.agreement-modal .modal-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  text-align: right;
}

.agreement-modal .btn-agree {
  padding: 10px 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.agreement-modal .btn-agree:hover {
  background: var(--primary-dark);
}

/* ---- Alert ---- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  display: none;
}

.alert.error {
  display: block;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.alert.success {
  display: block;
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  z-index: 2000;
  box-shadow: var(--shadow-lg);
  animation: toastIn .35s;
  display: none;
}

.toast.show { display: block; }

.toast.error {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.toast.success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

/* ---- Footer ---- */
.footer {
  text-align: center;
  padding: 40px 24px;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

/* ---- Animations ---- */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero h1 { font-size: 32px; }
  .hero-desc { font-size: 15px; line-height: 1.8; }
  .hero-cta  { font-size: 17px; }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
  }

  .hero-stats { gap: 24px; }
  .hero-stat .num { font-size: 28px; }

  .form-wrap {
    padding: 24px 20px;
  }

  .section-title { font-size: 26px; }
}

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