/* ===== CSS Reset & Variables ===== */
:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --primary-light: #bae6fd;
  --secondary: #6366f1;
  --accent: #f43f5e;
  --teal: #14b8a6;
  --bg: #f0f9ff;
  --bg-card: #ffffff;
  --bg-card2: #f8faff;
  --bg-section: #f1f5f9;
  --text: #1e293b;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --border: rgba(14,165,233,0.15);
  --border-light: rgba(0,0,0,0.06);
  --shadow: 0 4px 24px rgba(14,165,233,0.10);
  --shadow-lg: 0 12px 48px rgba(14,165,233,0.16);
  --radius: 16px;
  --radius-sm: 8px;
  --gradient: linear-gradient(135deg, #0ea5e9, #6366f1);
  --gradient2: linear-gradient(135deg, #14b8a6, #0ea5e9);
  --gradient3: linear-gradient(135deg, #f43f5e, #6366f1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}

.navbar.scrolled {
  background: rgba(255,255,255,0.98);
  box-shadow: 0 4px 20px rgba(14,165,233,0.10);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}

.brand-icon { font-size: 22px; }
.brand-text { color: var(--text); }
.brand-accent { color: var(--primary); }

.nav-links {
  display: flex;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav-links li a {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-muted);
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-links li a:hover,
.nav-links li a.active {
  color: var(--primary);
  background: rgba(14,165,233,0.08);
}

.nav-actions {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.btn-login {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  transition: all 0.2s;
}
.btn-login:hover { color: var(--primary); border-color: var(--primary); }

.btn-register {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 14px;
  background: var(--primary);
  color: white;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-register:hover { background: var(--primary-dark); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
}
.nav-hamburger span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

.nav-user-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.nav-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient2);
  color: white;
  font-weight: 700;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  font: inherit;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  background: var(--gradient);
  color: white;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(14,165,233,0.30);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(14,165,233,0.40);
}
.btn-primary.large { padding: 14px 36px; font-size: 16px; }

.btn-secondary {
  padding: 10px 16px;
  border: 1px solid rgba(14,165,233,0.24);
  border-radius: 10px;
  color: var(--primary-dark);
  background: rgba(255,255,255,0.9);
  font-size: 13px;
  font-weight: 600;
}
.btn-secondary:hover {
  border-color: var(--primary);
  color: white;
  background: var(--primary);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  border-radius: 12px;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.3s;
  background: rgba(14,165,233,0.06);
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-white {
  display: inline-flex;
  align-items: center;
  padding: 14px 36px;
  background: white;
  border: 1.5px solid rgba(14,165,233,0.3);
  color: var(--primary);
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s;
}
.btn-white:hover { background: var(--primary); color: white; }

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Section Header ===== */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-header h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.section-header p {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}
.section-header.light h2 { color: var(--text); }
.section-header.light p { color: var(--text-muted); }

.section-tag {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(14,165,233,0.10);
  color: var(--primary);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f0f9ff; }
::-webkit-scrollbar-thumb { background: #bae6fd; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ===== Page Header ===== */
.page-header {
  padding: 120px 0 60px;
  background: linear-gradient(180deg, rgba(14,165,233,0.06) 0%, transparent 100%);
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.page-header h1 {
  font-size: 40px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.page-header p {
  font-size: 17px;
  color: var(--text-muted);
}

/* ===== Gradient Text ===== */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Card Base ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.3s;
  box-shadow: var(--shadow);
}
.card:hover {
  border-color: rgba(14,165,233,0.25);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* ===== Footer ===== */
.footer {
  background: #0f172a;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 60px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .brand-logo {
  font-size: 22px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}
.footer-brand p {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  margin-bottom: 20px;
}
.footer-social {
  display: flex;
  gap: 12px;
}
.footer-social a {
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  transition: all 0.2s;
}
.footer-social a:hover { color: var(--primary); border-color: var(--primary); }

.footer-links h4 {
  font-size: 15px;
  font-weight: 600;
  color: white;
  margin-bottom: 16px;
}
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links ul li a {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}
.footer-links ul li a:hover { color: var(--primary); }

.footer-contact h4 {
  font-size: 15px;
  font-weight: 600;
  color: white;
  margin-bottom: 16px;
}
.footer-contact p {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  text-align: center;
}
.footer-bottom p {
  font-size: 13px;
  color: rgba(255,255,255,0.3);
  margin-bottom: 4px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    padding: 12px;
    background: rgba(255,255,255,0.98);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }
  .nav-links.mobile-open li a { display: block; padding: 10px 12px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .section-header h2 { font-size: 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .nav-container { gap: 10px; padding: 0 16px; }
  .nav-actions { margin-left: auto; }
  .nav-user-identity { display: none; }
  .btn-login { padding: 7px 12px; }
}
