/* ═══════════════════════════════════════════
   广邑教育 · 公共样式 v2.0
   所有页面共享的基础样式 · 支持夜间模式
   ═══════════════════════════════════════════ */

/* ═══ CSS 变量 ═══ */
:root {
  --c-primary: #1e3a5f;
  --c-primary-light: #2563eb;
  --c-accent: #e94560;
  --c-gold: #feca57;
  --c-green: #07c160;
  --c-text: #1a1a2e;
  --c-text2: #475569;
  --c-text3: #788596;
  --c-text4: #a0aec0;
  --c-bg: #f1f4f8;
  --c-white: #fff;
  --c-border: #e2e8f0;
  --c-border-light: #f3f4f6;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 50px;
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 20px rgba(0,0,0,0.05);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.03), 0 12px 36px rgba(30,58,95,0.08);
  --ease: 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ═══ 夜间模式 ═══ */
body.dark {
  --c-primary: #60a5fa;
  --c-primary-light: #3b82f6;
  --c-accent: #f87171;
  --c-gold: #fbbf24;
  --c-text: #e2e8f0;
  --c-text2: #cbd5e1;
  --c-text3: #94a3b8;
  --c-text4: #64748b;
  --c-bg: #0f172a;
  --c-white: #1e293b;
  --c-border: #334155;
  --c-border-light: #1e293b;
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 20px rgba(0,0,0,0.25);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.2), 0 12px 36px rgba(0,0,0,0.3);
  color-scheme: dark;
}

/* ═══ 全局重置 ═══ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { -webkit-tap-highlight-color: transparent; }

/* ═══ 导航栏（深蓝背景版） ═══ */
.nav-dark {
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}
.nav-dark .nav-brand { color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 1px; }
.nav-dark .nav-link {
  color: rgba(255,255,255,0.9); text-decoration: none; font-size: 13px;
  padding: 6px 16px; border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px; transition: all var(--ease);
}
.nav-dark .nav-link:active { background: rgba(255,255,255,0.2); transform: scale(0.95); }

/* ═══ 导航栏（白色毛玻璃版） ═══ */
.nav-light {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
  padding: 0 24px;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-light .nav-brand { font-size: 15px; font-weight: 700; color: var(--c-text); }
.nav-light .nav-link {
  margin-left: auto; font-size: 13px; color: var(--c-text3); text-decoration: none;
  padding: 6px 16px; border: 1px solid var(--c-border); border-radius: 20px;
  transition: all var(--ease);
}
.nav-light .nav-link:hover { color: var(--c-primary); border-color: var(--c-primary); }

/* ═══ 顶部栏（grjj用） ═══ */
.top-bar {
  background: #1e3a5f; color: #fff;
  padding: 8px 20px; font-size: 13px;
  display: flex; align-items: center; justify-content: space-between;
}
.top-bar .brand { font-weight: 700; letter-spacing: 1px; }
.top-bar a { color: rgba(255,255,255,0.8); text-decoration: none; font-size: 12px; }
.top-bar a:hover { color: #fff; }

/* ═══ 页脚 ═══ */
.footer {
  text-align: center;
  padding: 24px 20px 36px;
  border-top: 1px solid var(--c-border);
  background: rgba(255,255,255,0.85);
  font-size: 12px;
  color: var(--c-text4);
  line-height: 1.8;
  flex-shrink: 0;
}
.footer strong { color: var(--c-text3); }

.footer-dark {
  text-align: center;
  padding: 40px 20px;
  background: #1a1a2e;
  color: rgba(255,255,255,0.45);
  font-size: 13px;
}
.footer-dark .motto { font-size: 1.1rem; color: rgba(255,255,255,0.7); font-weight: 600; margin-bottom: 6px; }

/* ═══ 区块标题 ═══ */
.section-title {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: 28px;
}
.section-title::after {
  content: '';
  display: block;
  width: 44px;
  height: 3px;
  background: linear-gradient(90deg, var(--c-accent), #f593a6);
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ═══ 回到顶部 ═══ */
.back-top {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 30px;
  z-index: 200;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(30,58,95,0.3);
  align-items: center;
  justify-content: center;
  transition: all var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.back-top.show { display: flex; }
.back-top:hover { transform: translateY(-3px); box-shadow: 0 6px 24px rgba(30,58,95,0.4); }
.back-top svg { width: 18px; height: 18px; }

/* ═══ 几何浮动背景装饰 ═══ */
.geo-decor{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.geo-decor span{position:absolute;display:block;animation:geoFloat linear infinite}
.geo-tri{width:0;height:0;border-left:14px solid transparent;border-right:14px solid transparent;border-bottom:24px solid rgba(37,99,235,0.07)}
.geo-sq{width:18px;height:18px;border:2px solid rgba(233,69,96,0.08);border-radius:3px;background:transparent}
.geo-dia{width:16px;height:16px;border:2px solid rgba(124,58,237,0.07);background:transparent;transform:rotate(45deg)}
.geo-dot{width:8px;height:8px;border-radius:50%;background:rgba(37,99,235,0.06)}
.geo-ring{width:24px;height:24px;border-radius:50%;border:2px solid rgba(233,69,96,0.06);background:transparent}
.geo-hex{width:20px;height:12px;background:rgba(30,58,95,0.05);clip-path:polygon(25% 0%,75% 0%,100% 50%,75% 100%,25% 100%,0% 50%)}

@keyframes geoFloat{
  0%{transform:translateY(0) rotate(0deg);opacity:0}
  10%{opacity:1}
  90%{opacity:1}
  100%{transform:translateY(-180px) rotate(45deg);opacity:0}
}

/* ═══ 卡片入场动画 ═══ */
@keyframes cardFadeIn{
  from{opacity:0;transform:translateY(16px)}
  to{opacity:1;transform:translateY(0)}
}
.card-animate{animation:cardFadeIn .45s var(--ease) both}
.card-animate:nth-child(1){animation-delay:.05s}
.card-animate:nth-child(2){animation-delay:.10s}
.card-animate:nth-child(3){animation-delay:.15s}
.card-animate:nth-child(4){animation-delay:.20s}
.card-animate:nth-child(5){animation-delay:.25s}
.card-animate:nth-child(6){animation-delay:.30s}
.card-animate:nth-child(7){animation-delay:.35s}
.card-animate:nth-child(8){animation-delay:.40s}
.card-animate:nth-child(9){animation-delay:.45s}
.card-animate:nth-child(10){animation-delay:.50s}

/* ═══ 全局滚动进度条 ═══ */
#scrollBar{position:fixed;top:0;left:0;height:3px;background:linear-gradient(90deg,#2563eb,#e94560);z-index:9999;width:0;transition:width 0.1s linear}
body.dark #scrollBar{background:linear-gradient(90deg,#60a5fa,#f87171)}

/* ═══ 通用动画 ═══ */
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }
@keyframes breathe{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}

/* ═══ 响应式断点 ═══ */
@media (max-width: 768px) {
  .nav-dark { padding: 8px 14px; }
  .nav-dark .nav-brand { font-size: 14px; }
  .nav-dark .nav-link { font-size: 12px; padding: 5px 12px; }
  .nav-light { padding: 0 14px; height: 48px; }
  .nav-light .nav-brand { font-size: 14px; }
  .back-top { right: 14px; bottom: 24px; width: 38px; height: 38px; }
}
@media (max-width: 480px) {
  .back-top { right: 12px; bottom: 18px; width: 36px; height: 36px; }
}
