/* ========== Reset & Base ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #111128;
  --bg-card: #161636;
  --bg-card-hover: #1c1c48;
  --text-primary: #e8e8f0;
  --text-secondary: #9898b8;
  --text-muted: #6a6a8a;
  --accent-green: #06bda0;
  --accent-blue: #2563eb;
  --accent-purple: #7c3aed;
  --accent-pink: #f72585;
  --accent-orange: #ff6b35;
  --border-color: #2a2a5a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 8px 32px rgba(0,0,0,0.35);
  --shadow-glow-green: 0 0 40px rgba(6,189,160,0.15);
  --shadow-glow-purple: 0 0 40px rgba(124,58,237,0.15);
  --shadow-glow-pink: 0 0 40px rgba(247,37,133,0.15);
  --shadow-glow-blue: 0 0 40px rgba(37,99,235,0.15);
}
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  /* footer 为 fixed 浮在底部,需给 body 留出高度避免内容被遮挡 */
  padding-bottom: 110px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ========== Animated Background ========== */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(ellipse 800px 600px at 20% 20%, rgba(6,189,160,0.06), transparent),
    radial-gradient(ellipse 600px 500px at 80% 80%, rgba(124,58,237,0.06), transparent),
    radial-gradient(ellipse 500px 400px at 50% 50%, rgba(37,99,235,0.04), transparent);
}
.bg-grid::after {
  content: '';
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
                     linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ========== Layout ========== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ========== Header / Nav ========== */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,26,0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}
nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; max-width: 1200px; margin: 0 auto; padding: 0 24px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 700; letter-spacing: -0.5px;
}
.nav-brand .logo-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #fff;
}
.nav-links { display: flex; gap: 8px; }
.nav-links a {
  padding: 6px 16px; border-radius: 8px;
  font-size: 14px; color: var(--text-secondary);
  transition: all 0.2s;
}
.nav-links a:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }

/* ========== Section ========== */
.section-title {
  text-align: center; margin-bottom: 56px; padding-top: 80px;
}
.section-title h2 {
  font-size: 32px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 12px;
}
.section-title p { font-size: 16px; color: var(--text-secondary); }

/* ========== Footer ========== */
footer.container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center; padding: 20px 0 16px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted); font-size: 13px;
  background: var(--bg-primary);
  z-index: 50;
}
footer.container a { color: var(--text-secondary); transition: color 0.2s; }
footer.container a:hover { color: var(--accent-green); }

/* ========== Animations ========== */
.fade-up {
  opacity: 0; transform: translateY(30px);
  animation: fadeUp 0.7s ease forwards;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.fade-up:nth-child(1) { animation-delay: 0.1s; }
.fade-up:nth-child(2) { animation-delay: 0.2s; }
.fade-up:nth-child(3) { animation-delay: 0.3s; }
.fade-up:nth-child(4) { animation-delay: 0.4s; }

/* ========== Mobile Menu ========== */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
}
.mobile-menu {
  display: none;
  position: absolute;
  top: 64px;
  right: 0;
  left: 0;
  background: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu.show {
  display: flex;
}
.mobile-menu a {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.mobile-menu a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}
.mobile-menu .divider {
  height: 1px;
  background: var(--border-color);
  margin: 8px 0;
}
.mobile-menu .user-info {
  padding: 12px 16px;
  color: var(--accent-green);
  font-size: 14px;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .hero { padding: 64px 0 40px; }
  .hero h1 { font-size: 36px; }
  .hero p { font-size: 16px; }
  .ext-card { padding: 28px; }
  .ext-grid { gap: 20px; }
}

/* ========== Modals ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 90%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  z-index: 201;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
}
.modal-box.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
}
.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover {
  color: var(--text-primary);
}
.modal-body {
  padding: 24px;
}
.modal-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.2s;
}
.modal-input:focus {
  border-color: var(--accent-green);
}
.modal-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.modal-btn:hover {
  opacity: 0.9;
}
.modal-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.modal-links {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 13px;
}
.modal-links a {
  color: var(--text-secondary);
}
.modal-links a:hover {
  color: var(--accent-green);
}
.modal-msg {
  margin-top: 12px;
  font-size: 13px;
  text-align: center;
  min-height: 18px;
}
.modal-msg.error {
  color: var(--accent-pink);
}
.modal-msg.success {
  color: var(--accent-green);
}

/* ========== Notify Alert (替代原生 alert) ========== */
.notify-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.notify-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.notify-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  min-width: 280px;
  max-width: 420px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transform: scale(0.95);
  transition: transform 0.2s;
}
.notify-overlay.show .notify-box {
  transform: scale(1);
}
.notify-msg {
  color: var(--text-primary);
  font-size: 15px;
  margin-bottom: 18px;
  line-height: 1.5;
  word-break: break-word;
}
.notify-btn {
  background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 32px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.notify-btn:hover {
  opacity: 0.9;
}
.notify-box.success .notify-msg {
  color: var(--accent-green);
}
.notify-box.error .notify-msg {
  color: var(--accent-pink);
}
