/* ============ 基础 ============ */
:root {
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-light: #e6f4f1;
  --accent: #f59e0b;
  --ink: #10231f;
  --ink-2: #3d514c;
  --muted: #6b807a;
  --line: #e3ebe8;
  --bg: #ffffff;
  --bg-soft: #f5f9f7;
  --shadow: 0 10px 30px rgba(15, 118, 110, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 60, 54, 0.16);
  --radius: 16px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.accent { color: var(--primary); }
[hidden] { display: none !important; }

/* ============ 顶部导航 ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -0.3px; }
.brand-icon {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--primary); color: #fff; border-radius: 10px;
}
.brand-icon svg { width: 22px; height: 22px; }
.brand-icon.small { width: 32px; height: 32px; }
.brand-icon.small svg { width: 19px; height: 19px; }
.brand-highlight { color: var(--primary); }
.nav { display: flex; gap: 30px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.nav a:hover { color: var(--primary); }
.nav-cta {
  font-size: 13px; font-weight: 700; color: var(--primary);
  border: 1.5px solid var(--primary); padding: 8px 16px; border-radius: 999px;
  transition: all .2s;
}
.nav-cta:hover { background: var(--primary); color: #fff; }

/* ============ 英雄区 ============ */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0d5f57 0%, #0f766e 55%, #147d6f 100%);
  color: #fff;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(1000px 500px at 80% -10%, rgba(245,158,11,.18), transparent 60%);
  pointer-events: none;
}
.hero-shapes .shape { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .12; }
.shape-1 { width: 420px; height: 420px; background: #fff; top: -180px; right: -80px; }
.shape-2 { width: 260px; height: 260px; border: 40px solid #fff; bottom: -120px; left: 8%; }
.shape-3 { width: 140px; height: 140px; background: var(--accent); top: 40%; right: 22%; opacity: .18; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding-top: 76px; padding-bottom: 76px; position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .5px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #fbbf24; box-shadow: 0 0 0 4px rgba(251,191,36,.2); }
.hero h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.2; margin: 0 0 20px; letter-spacing: -1px; font-weight: 850; }
.hero h1 .accent { color: #fcd34d; }
.hero-desc { font-size: 16px; line-height: 1.9; color: rgba(255,255,255,.86); max-width: 620px; margin: 0 0 30px; }
.hero-desc b { color: #fff; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 10px; font-weight: 700; font-size: 14px; cursor: pointer; border: none; transition: all .2s; }
.btn-primary { background: var(--accent); color: #3a2600; box-shadow: 0 8px 20px rgba(245,158,11,.28); }
.btn-primary:hover { transform: translateY(-2px); background: #fbbf24; }
.btn-ghost { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.btn-ghost:hover { background: rgba(255,255,255,.18); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.hero-meta { display: flex; align-items: center; gap: 16px; margin-top: 34px; font-size: 13px; color: rgba(255,255,255,.75); }
.hero-meta strong { font-size: 22px; color: #fff; margin-right: 3px; }
.hero-meta .separator { width: 1px; height: 22px; background: rgba(255,255,255,.25); }

/* 英雄区视觉卡片 */
.hero-visual { position: relative; height: 320px; }
.visual-card { position: absolute; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); }
.card-back { width: 240px; height: 170px; top: 8px; right: 10px; padding: 22px; transform: rotate(7deg); opacity: .92; }
.visual-line { height: 10px; width: 80%; background: #d7e6e2; border-radius: 5px; margin-bottom: 12px; }
.visual-line.short { width: 55%; }
.visual-chip { display: inline-block; margin-top: 10px; font-size: 11px; font-weight: 800; color: #b45309; background: #fef3c7; padding: 5px 10px; border-radius: 999px; }
.card-front { width: 300px; top: 92px; left: 6px; padding: 24px; transform: rotate(-3deg); color: var(--ink); }
.visual-badge { font-size: 11px; font-weight: 800; color: var(--primary); background: var(--primary-light); display: inline-block; padding: 4px 10px; border-radius: 6px; margin-bottom: 14px; }
.visual-title { height: 14px; width: 88%; background: #243b36; border-radius: 7px; margin-bottom: 10px; }
.visual-title.small { width: 60%; background: #9fb3ad; height: 10px; }
.visual-tags { display: flex; gap: 8px; margin-top: 18px; }
.visual-tags span { font-size: 11px; background: var(--bg-soft); color: var(--ink-2); padding: 5px 10px; border-radius: 6px; }
.visual-footer { display: flex; justify-content: space-between; margin-top: 22px; font-size: 11px; color: var(--muted); }
.visual-footer span:last-child { color: var(--primary); font-weight: 700; }
.visual-float { position: absolute; right: 40px; bottom: 32px; font-size: 46px; filter: drop-shadow(0 8px 12px rgba(0,0,0,.18)); transform: rotate(12deg); }

/* ============ 区块通用 ============ */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-soft); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.section-head.center { justify-content: center; text-align: center; }
.section-kicker { font-size: 12px; font-weight: 800; letter-spacing: 2px; color: var(--primary); margin-bottom: 10px; }
.section-head h2, .about-text h2 { font-size: clamp(28px, 3.6vw, 40px); margin: 0 0 10px; letter-spacing: -.6px; }
.section-head p, .about-text > p { color: var(--muted); margin: 0; font-size: 15px; }
.result-count { font-size: 13px; color: var(--muted); background: var(--bg-soft); padding: 8px 14px; border-radius: 8px; white-space: nowrap; }
.result-count strong { color: var(--primary); font-size: 16px; }

/* ============ 工具栏 ============ */
.toolbar { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 28px; }
.search-box { display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 14px; height: 46px; transition: border-color .2s; }
.search-box:focus-within { border-color: var(--primary); }
.search-box svg { width: 19px; height: 19px; color: var(--muted); flex-shrink: 0; }
.search-box input { flex: 1; border: none; outline: none; font-size: 14px; background: transparent; color: var(--ink); min-width: 0; }
.clear-search { border: none; background: #eef3f1; color: var(--muted); width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1; }
.filter-group { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.filter-label { font-size: 13px; font-weight: 700; color: var(--ink-2); flex-shrink: 0; min-width: 34px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-2);
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip .chip-count { opacity: .55; font-size: 11px; margin-left: 3px; }

/* ============ 竞赛卡片 ============ */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; min-height: 268px;
  transition: transform .22s, box-shadow .22s, border-color .22s;
  overflow: hidden;
}
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--cat-color, var(--primary)); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge { font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 6px; white-space: nowrap; }
.badge-level { background: var(--level-bg, var(--primary-light)); color: var(--level-color, var(--primary)); }
.badge-cat { background: var(--cat-bg, var(--bg-soft)); color: var(--cat-color, var(--ink-2)); }
.card-index { font-size: 12px; color: #c2d0cc; font-weight: 800; }
.card h3 { font-size: 17px; line-height: 1.45; margin: 0 0 8px; letter-spacing: -.2px; }
.card-desc { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 0 0 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--ink-2); }
.card-meta div { display: flex; align-items: flex-start; gap: 8px; }
.card-meta svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--primary); margin-top: 2px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 11px; color: var(--muted); background: var(--bg-soft); padding: 3px 8px; border-radius: 5px; }
.detail-btn { font-size: 12.5px; font-weight: 700; color: var(--primary); border: none; background: transparent; cursor: pointer; padding: 0; white-space: nowrap; }
.detail-btn:hover { text-decoration: underline; }

.empty-state { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty-icon { font-size: 44px; margin-bottom: 12px; }
.empty-state h3 { color: var(--ink); margin: 0 0 6px; }
.empty-state p { margin: 0 0 20px; }

/* ============ 等级说明 ============ */
.sub-heading { font-size: 20px; margin: 44px 0 20px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.guide-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.guide-badge { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-weight: 900; font-size: 18px; margin-bottom: 16px; }
.level-a .guide-badge { background: #fef3c7; color: #b45309; }
.level-n .guide-badge { background: #dbeafe; color: #1d4ed8; }
.level-p .guide-badge { background: #dcfce7; color: #15803d; }
.guide-card h4 { margin: 0 0 8px; font-size: 17px; }
.guide-card p { font-size: 13.5px; color: var(--muted); margin: 0 0 14px; }
.guide-example { font-size: 12px; color: var(--ink-2); background: var(--bg-soft); padding: 10px 12px; border-radius: 8px; line-height: 1.6; }
.category-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cat-item { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.cat-dot { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.cat-item strong { font-size: 14px; display: block; }
.cat-item span { font-size: 12px; color: var(--muted); }
.tip-box { display: flex; gap: 16px; background: #fffbeb; border: 1px solid #fde68a; border-radius: var(--radius); padding: 20px 22px; margin-top: 28px; }
.tip-icon { font-size: 26px; flex-shrink: 0; }
.tip-box strong { font-size: 15px; }
.tip-box p { margin: 6px 0 0; font-size: 13.5px; color: #78500a; line-height: 1.8; }

/* ============ 关于 ============ */
.about-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 60px; align-items: center; }
.about-text > p { margin-top: 16px; }
.about-note { display: flex; gap: 10px; margin-top: 24px; background: var(--bg-soft); border-left: 3px solid var(--accent); padding: 14px 16px; font-size: 12.5px; color: var(--ink-2); line-height: 1.7; border-radius: 0 8px 8px 0; }
.about-note .strong { color: var(--primary); font-weight: 700; }
.about-card { background: linear-gradient(145deg, #0f766e, #115e59); color: #fff; border-radius: 20px; padding: 34px; box-shadow: var(--shadow-lg); }
.about-card-icon { font-size: 36px; margin-bottom: 14px; }
.about-card h3 { margin: 0 0 10px; font-size: 22px; }
.about-card p { color: rgba(255,255,255,.8); font-size: 14px; line-height: 1.8; margin: 0; }
.about-card-stats { display: flex; gap: 28px; margin-top: 28px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.2); }
.about-card-stats div { display: flex; flex-direction: column; }
.about-card-stats strong { font-size: 24px; }
.about-card-stats span { font-size: 12px; color: rgba(255,255,255,.7); }

/* ============ 页脚 ============ */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; background: var(--bg-soft); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand strong { font-size: 14px; }
.footer-brand p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.footer-copy { font-size: 12px; color: var(--muted); margin: 0; }

/* ============ 弹窗 ============ */
.modal-backdrop { position: fixed; inset: 0; background: rgba(8, 30, 26, .55); backdrop-filter: blur(4px); z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal { position: relative; width: 100%; max-width: 640px; max-height: 88vh; overflow-y: auto; background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); padding: 34px; }
.modal-close { position: absolute; top: 16px; right: 18px; width: 32px; height: 32px; border: none; border-radius: 50%; background: var(--bg-soft); color: var(--ink-2); font-size: 22px; cursor: pointer; line-height: 1; }
.modal-close:hover { background: var(--line); }
.modal-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.modal h2 { font-size: 24px; margin: 0 0 10px; line-height: 1.4; padding-right: 30px; }
.modal-sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.modal-section { margin-bottom: 20px; }
.modal-section h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--primary); margin: 0 0 10px; }
.modal-desc { font-size: 14px; color: var(--ink-2); line-height: 1.85; margin: 0; }
.detail-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.detail-item { background: var(--bg-soft); border-radius: 10px; padding: 12px 14px; }
.detail-item span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.detail-item strong { font-size: 13.5px; color: var(--ink); }
.highlight-list { margin: 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); }
.highlight-list li { margin-bottom: 6px; }
.modal-action { display: inline-flex; align-items: center; gap: 8px; background: var(--primary); color: #fff; font-weight: 700; font-size: 14px; padding: 12px 20px; border-radius: 10px; margin-top: 6px; }
.modal-action:hover { background: var(--primary-dark); }
.modal-disclaimer { font-size: 11.5px; color: var(--muted); margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }

/* ============ 响应式 ============ */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 56px; }
  .hero-visual { display: none; }
  .grid, .guide-grid, .category-guide { grid-template-columns: repeat(2, 1fr); }
  .about-inner { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .nav, .nav-cta { display: none; }
  .hero h1 { font-size: 34px; }
  .hero-desc { font-size: 14px; }
  .section { padding: 56px 0; }
  .grid, .guide-grid, .category-guide { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .filter-group { flex-direction: column; align-items: flex-start; gap: 10px; }
  .detail-list { grid-template-columns: 1fr; }
  .modal { padding: 26px 20px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .about-card-stats { flex-wrap: wrap; gap: 18px; }
}
