/* ============================================
   AIEducate.cn Design System
   ============================================ */

:root {
  --bg: #fafbfd;
  --bg-dark: #0f1729;
  --card: #ffffff;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-glow: rgba(37,99,235,0.08);
  --purple: #7c3aed;
  --green: #10b981;
  --orange: #f59e0b;
  --red: #ef4444;
  --text: #0f172a;
  --text-sec: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans SC', sans-serif;
  background: var(--bg); color: var(--text);
  overflow-x: hidden; line-height: 1.7;
}
::selection { background: rgba(37,99,235,0.15); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }

/* ---- Animation ---- */
.fade-up {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ---- Navbar ---- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 60px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  transition: all 0.35s ease;
}
.navbar.scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo-icon {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; font-weight: 800;
  font-family: 'DM Sans', sans-serif;
}
.nav-logo-text {
  font-family: 'DM Sans', sans-serif; font-weight: 700;
  font-size: 17px; color: var(--text); letter-spacing: -0.3px;
}
.nav-logo-text span { color: var(--accent); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-link {
  color: var(--text-sec); text-decoration: none; font-size: 14px;
  font-weight: 500; transition: color 0.2s;
}
.nav-link:hover { color: var(--accent); }
.nav-cta {
  padding: 8px 20px; border-radius: 9px;
  background: var(--accent); color: #fff !important;
  font-size: 13px; font-weight: 600; text-decoration: none;
  transition: background 0.2s;
}
.nav-cta:hover { background: var(--accent-hover); }

/* ---- Layout ---- */
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ---- Section Head ---- */
.section-head { text-align: center; margin-bottom: 52px; }
.section-tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  font-family: 'DM Sans', sans-serif; color: var(--accent);
  letter-spacing: 2.5px; text-transform: uppercase;
  padding: 5px 14px; border-radius: 6px;
  background: var(--accent-glow); margin-bottom: 14px;
}
.section-head h2 {
  font-size: clamp(26px, 3.5vw, 38px); font-weight: 800;
  margin-bottom: 12px; letter-spacing: -0.3px;
}
.section-head p { font-size: 15px; color: var(--text-sec); max-width: 520px; margin: 0 auto; }

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: var(--radius);
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 700;
  text-decoration: none; box-shadow: 0 4px 20px rgba(37,99,235,0.25);
  transition: background 0.2s; border: none; cursor: pointer;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: var(--radius);
  background: rgba(37,99,235,0.06); color: var(--accent); font-size: 15px;
  font-weight: 600; text-decoration: none;
  border: 1px solid rgba(37,99,235,0.15); transition: background 0.2s;
}
.btn-secondary:hover { background: rgba(37,99,235,0.1); }

/* ---- Cards ---- */
.card {
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 28px 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,0.06); }

/* ---- Article Page ---- */
.article-hero {
  padding: 100px 24px 48px; text-align: center;
  background: linear-gradient(180deg, rgba(37,99,235,0.03), var(--bg));
}
.article-hero .breadcrumb {
  font-size: 13px; color: var(--text-muted); margin-bottom: 20px;
}
.article-hero .breadcrumb a { color: var(--accent); }
.article-hero h1 {
  font-size: clamp(28px, 4vw, 42px); font-weight: 800;
  max-width: 700px; margin: 0 auto 16px; letter-spacing: -0.3px; line-height: 1.3;
}
.article-hero .meta {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  font-size: 13px; color: var(--text-muted); flex-wrap: wrap;
}
.article-hero .tag {
  display: inline-block; padding: 3px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 600;
}

.article-body {
  padding: 40px 24px 80px;
}
.article-body .content {
  max-width: 720px; margin: 0 auto;
  font-size: 16px; line-height: 1.9; color: var(--text);
}
.article-body .content h2 {
  font-size: 24px; font-weight: 800; margin: 48px 0 16px;
  padding-bottom: 12px; border-bottom: 2px solid var(--accent-glow);
  color: var(--text);
}
.article-body .content h3 {
  font-size: 19px; font-weight: 700; margin: 32px 0 12px; color: var(--text);
}
.article-body .content p { margin-bottom: 18px; }
.article-body .content ul, .article-body .content ol {
  margin: 12px 0 18px 24px;
}
.article-body .content li { margin-bottom: 8px; }
.article-body .content code {
  background: #f1f5f9; padding: 2px 8px; border-radius: 5px;
  font-size: 14px; font-family: 'Fira Code', monospace; color: #e11d48;
}
.article-body .content pre {
  background: var(--bg-dark); color: #e2e8f0; padding: 20px 24px;
  border-radius: var(--radius); overflow-x: auto; margin: 20px 0;
  font-size: 14px; line-height: 1.6;
}
.article-body .content pre code {
  background: none; color: inherit; padding: 0; font-size: inherit;
}
.article-body .content blockquote {
  border-left: 3px solid var(--accent); padding: 16px 20px;
  background: var(--accent-glow); border-radius: 0 var(--radius) var(--radius) 0;
  margin: 20px 0; font-style: italic; color: var(--text-sec);
}
.article-body .content .info-box {
  background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.15);
  border-radius: var(--radius); padding: 20px 24px; margin: 24px 0;
}
.article-body .content .info-box h4 {
  color: var(--green); font-size: 15px; margin-bottom: 8px;
}
.article-body .content .warning-box {
  background: rgba(245,158,11,0.06); border: 1px solid rgba(245,158,11,0.15);
  border-radius: var(--radius); padding: 20px 24px; margin: 24px 0;
}
.article-body .content .warning-box h4 {
  color: var(--orange); font-size: 15px; margin-bottom: 8px;
}

/* Article nav */
.article-nav {
  max-width: 720px; margin: 0 auto; padding: 32px 0;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.article-nav a {
  font-size: 14px; font-weight: 600; color: var(--accent);
  padding: 12px 20px; border-radius: 10px; background: var(--accent-glow);
  transition: background 0.2s;
}
.article-nav a:hover { background: rgba(37,99,235,0.12); }

/* ---- Article List ---- */
.article-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.article-card { text-decoration: none; color: inherit; }
.article-card .card-tag-sm {
  display: inline-block; font-size: 11px; font-weight: 700;
  font-family: 'DM Sans', sans-serif; letter-spacing: 1px;
  padding: 3px 10px; border-radius: 6px; margin-bottom: 12px;
}
.article-card h3 {
  font-size: 17px; font-weight: 700; margin-bottom: 8px;
  transition: color 0.2s; line-height: 1.4;
}
.article-card:hover h3 { color: var(--accent); }
.article-card p { font-size: 14px; color: var(--text-sec); line-height: 1.6; }
.article-card .card-meta {
  margin-top: 14px; font-size: 12px; color: var(--text-muted);
  display: flex; gap: 12px;
}

/* ---- Footer ---- */
.footer {
  padding: 36px 24px; text-align: center;
  border-top: 1px solid var(--border);
}
.footer-logo {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-bottom: 10px;
}
.footer-logo-icon {
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 10px; font-weight: 800;
  font-family: 'DM Sans', sans-serif;
}
.footer p { font-size: 13px; color: var(--text-muted); }
.footer .sub { font-size: 12px; color: #cbd5e1; margin-top: 4px; }

/* ---- Forms ---- */
.form-input, .form-select {
  padding: 13px 16px; border-radius: 10px; width: 100%;
  border: 1px solid var(--border); background: #fff;
  color: var(--text); font-size: 14px;
  font-family: 'Noto Sans SC', sans-serif; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-select { appearance: none; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-links .nav-link { display: none; }
  .article-grid { grid-template-columns: 1fr; }
  .article-nav { flex-direction: column; }
}
