/* ============== 基础 ============== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #1f2330;
  background: #f7f8fb;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: #2c5cff; text-decoration: none; }
a:hover { color: #1a3fc7; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, h5 { font-weight: 600; line-height: 1.3; margin: 0 0 .5em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.muted { color: #6b7280; font-size: .95em; }
.lead { color: #4b5563; font-size: 1.05rem; }
.badge { display: inline-block; padding: 4px 10px; background: rgba(44,92,255,.1); color: #2c5cff; border-radius: 999px; font-size: .85rem; font-weight: 500; margin-bottom: 12px; }

/* ============== 按钮 ============== */
.btn { display: inline-block; padding: 10px 22px; border-radius: 8px; font-weight: 500; font-size: 1rem; cursor: pointer; transition: all .2s; border: 1px solid transparent; }
.btn-primary { background: #2c5cff; color: #fff; }
.btn-primary:hover { background: #1a3fc7; color: #fff; }
.btn-ghost { background: transparent; border-color: #2c5cff; color: #2c5cff; }
.btn-ghost:hover { background: #2c5cff; color: #fff; }
.btn-light { background: #fff; color: #2c5cff; }
.btn-block { display: block; text-align: center; width: 100%; }

/* ============== 头部 ============== */
.site-header { background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.05); position: sticky; top: 0; z-index: 99; }
.topbar { background: #0f172a; color: #cbd5e1; font-size: .85rem; }
.topbar-inner { display: flex; justify-content: space-between; padding: 8px 20px; }
.topbar a { color: #cbd5e1; }
.topbar-right .dot { margin: 0 8px; color: #64748b; }
.header-inner { display: flex; align-items: center; gap: 24px; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: #1f2330; }
.brand-text strong { display: block; font-size: 1.15rem; }
.brand-text em { display: block; font-style: normal; font-size: .78rem; color: #6b7280; }
.main-nav { flex: 1; }
.main-nav ul { list-style: none; display: flex; gap: 8px; margin: 0; padding: 0; justify-content: center; }
.main-nav a { display: block; padding: 8px 14px; color: #1f2330; border-radius: 6px; font-weight: 500; }
.main-nav li.active a, .main-nav a:hover { background: rgba(44,92,255,.1); color: #2c5cff; }
.cta-btn { background: linear-gradient(135deg, #2c5cff, #6c8cff); color: #fff !important; padding: 10px 22px; border-radius: 8px; font-weight: 500; }
.cta-btn:hover { opacity: .9; color: #fff; }

/* ============== Hero ============== */
.hero { background: linear-gradient(135deg, #eef3ff 0%, #f7f8fb 100%); padding: 60px 0; }
.hero-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 2.6rem; line-height: 1.2; }
.hero h1 em { color: #2c5cff; font-style: normal; }
.hero-cta { display: flex; gap: 12px; margin: 24px 0 12px; flex-wrap: wrap; }
.hero-points { list-style: none; padding: 0; color: #4b5563; font-size: .95rem; }
.hero-points li { margin-bottom: 4px; }

.hero-card { display: flex; justify-content: center; }
.board {
  --s: 50px;
  display: grid;
  grid-template-columns: repeat(8, var(--s));
  grid-template-rows: repeat(8, var(--s));
  background: #1f2330;
  padding: 8px;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,.15);
}
.board::before {
  content: '';
  position: absolute; inset: 8px;
  background-image:
    linear-gradient(45deg, #f3d390 25%, transparent 25%),
    linear-gradient(-45deg, #f3d390 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f3d390 75%),
    linear-gradient(-45deg, transparent 75%, #f3d390 75%);
  background-size: calc(var(--s) * 2) calc(var(--s) * 2);
  background-position: 0 0, 0 var(--s), var(--s) calc(var(--s) * -1), calc(var(--s) * -1) 0;
  background-color: #f0d090;
}
.piece, .pawn {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  font-size: calc(var(--s) * .75);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.3);
  grid-column: var(--x);
  grid-row: var(--y);
}
.pawn { color: #e2e8f0; }

/* ============== Section ============== */
.section { padding: 56px 0; }
.section-alt { background: #fff; }
.section-head { text-align: center; margin-bottom: 36px; }
.section-head h2 { font-size: 1.8rem; }
.section-head p { color: #6b7280; max-width: 640px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 28px; }

/* ============== 分类卡片 ============== */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.cat-card { background: #fff; border-radius: 12px; padding: 28px 18px; text-align: center; box-shadow: 0 4px 16px rgba(15,23,42,.04); transition: all .25s; color: #1f2330; }
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(44,92,255,.15); color: #2c5cff; }
.cat-icon { display: inline-flex; width: 64px; height: 64px; align-items: center; justify-content: center; background: linear-gradient(135deg, #2c5cff, #6c8cff); color: #fff; border-radius: 16px; font-size: 1.8rem; margin-bottom: 12px; }
.cat-card h3 { font-size: 1.1rem; margin-bottom: 4px; }
.cat-card p { color: #6b7280; font-size: .85rem; margin: 0; }

/* ============== 课程卡片 ============== */
.course-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.course-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 16px rgba(15,23,42,.04); color: #1f2330; transition: all .25s; display: block; }
.course-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(44,92,255,.15); }
.course-cover { height: 140px; background: linear-gradient(135deg, #2c5cff, #6c8cff); position: relative; display: flex; align-items: center; justify-content: center; }
.cover-fallback { color: rgba(255,255,255,.6); font-size: 4rem; font-weight: 700; }
.cover-tag { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.95); color: #2c5cff; font-size: .8rem; padding: 4px 10px; border-radius: 999px; font-weight: 500; }
.course-body { padding: 18px; }
.course-body h3 { font-size: 1.05rem; margin-bottom: 4px; }
.meta { list-style: none; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.meta li { font-size: .8rem; color: #6b7280; background: #f1f5f9; padding: 2px 8px; border-radius: 4px; }
.price strong { color: #ef4444; font-size: 1.3rem; }
.price span { color: #6b7280; font-size: .8rem; }
.empty { text-align: center; color: #6b7280; padding: 40px 0; }

/* ============== 思维训练 ============== */
.think-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.ability-list { list-style: none; padding: 0; margin: 16px 0 24px; }
.ability-list li { padding: 8px 0; border-bottom: 1px solid #e5e7eb; }
.ability-list b { display: inline-block; min-width: 80px; color: #2c5cff; }
.think-board { display: flex; justify-content: center; }
.think-card { background: linear-gradient(135deg, #1f2330, #2c5cff); color: #fff; padding: 40px; border-radius: 20px; text-align: center; max-width: 320px; box-shadow: 0 20px 40px rgba(15,23,42,.15); }
.think-card .big { font-size: 5rem; display: block; }
.think-card p { margin-top: 12px; color: rgba(255,255,255,.9); }

.ability-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.ability-card { background: #fff; padding: 24px; border-radius: 12px; box-shadow: 0 4px 16px rgba(15,23,42,.04); }
.ability-card h3 { color: #2c5cff; }
.ability-card ul { padding-left: 1.2em; }
.ability-card li { color: #4b5563; font-size: .95rem; }

.think-method { max-width: 720px; margin: 0 auto; }
.think-method ol { padding-left: 1.4em; }
.think-method li { padding: 8px 0; font-size: 1.05rem; }
.think-method b { color: #2c5cff; }

/* ============== 数据 ============== */
.section-data { background: linear-gradient(135deg, #2c5cff, #1a3fc7); color: #fff; }
.data-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.data-grid div strong { display: block; font-size: 2.4rem; font-weight: 700; }
.data-grid div span { color: rgba(255,255,255,.85); }

/* ============== 师资 ============== */
.teacher-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.teacher-card { background: #fff; padding: 24px; border-radius: 12px; box-shadow: 0 4px 16px rgba(15,23,42,.04); text-align: center; }
.avatar { display: inline-flex; width: 64px; height: 64px; align-items: center; justify-content: center; background: linear-gradient(135deg, #2c5cff, #6c8cff); color: #fff; border-radius: 50%; font-size: 1.4rem; font-weight: 600; margin-bottom: 12px; }
.avatar-lg { width: 80px; height: 80px; font-size: 1.7rem; }
.meta-line { color: #6b7280; font-size: .9rem; margin: 0 0 8px; }
.tag-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.tag-list li { background: #eef2ff; color: #2c5cff; font-size: .8rem; padding: 4px 10px; border-radius: 999px; }
.teacher-mini { display: flex; gap: 16px; background: #f8fafc; padding: 16px; border-radius: 12px; }
.teacher-mini .avatar { flex-shrink: 0; }

/* ============== 新闻 ============== */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.news-card { background: #fff; border-radius: 12px; overflow: hidden; color: #1f2330; box-shadow: 0 4px 16px rgba(15,23,42,.04); transition: all .25s; }
.news-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(44,92,255,.15); }
.news-cover { height: 120px; background: linear-gradient(135deg, #6c8cff, #2c5cff); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 2rem; font-weight: 700; }
.news-body { padding: 18px; }
.news-tag { display: inline-block; background: #eef2ff; color: #2c5cff; font-size: .75rem; padding: 2px 8px; border-radius: 4px; margin-bottom: 8px; }
.news-body h3 { font-size: 1.05rem; margin-bottom: 6px; }
.news-body p { color: #4b5563; font-size: .9rem; margin-bottom: 8px; }
.news-date { color: #9ca3af; font-size: .8rem; }

/* ============== 面包屑 ============== */
.page-head { background: linear-gradient(135deg, #eef3ff 0%, #f7f8fb 100%); padding: 40px 0 30px; }
.page-head h1 { font-size: 2rem; margin-bottom: 6px; }
.page-head p { color: #4b5563; }
.crumbs { margin-bottom: 12px; }
.crumbs ol { list-style: none; padding: 0; margin: 0; font-size: .9rem; color: #6b7280; }
.crumbs li { display: inline; }
.crumbs li.active { color: #1f2330; }
.crumbs .sep { margin: 0 6px; color: #9ca3af; }
.crumbs a { color: #6b7280; }

/* ============== 分类筛选 ============== */
.cat-filter { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.cat-filter a { padding: 8px 18px; border-radius: 999px; background: #fff; color: #1f2330; border: 1px solid #e5e7eb; font-size: .9rem; }
.cat-filter a.on, .cat-filter a:hover { background: #2c5cff; color: #fff; border-color: #2c5cff; }

/* ============== 课程详情 ============== */
.course-detail-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; }
.course-stats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px 0; }
.course-stats li { background: #f8fafc; padding: 12px; border-radius: 8px; text-align: center; }
.course-stats span { display: block; font-size: .8rem; color: #6b7280; }
.course-stats b { display: block; margin-top: 4px; color: #1f2330; }
.check-list { list-style: none; padding: 0; }
.check-list li { padding: 6px 0 6px 24px; position: relative; }
.check-list li::before { content: '✓'; position: absolute; left: 0; top: 6px; color: #2c5cff; font-weight: 700; }
.outline { padding-left: 1.2em; }
.outline li { padding: 6px 0; }
.course-aside .aside-card { background: #fff; padding: 24px; border-radius: 12px; box-shadow: 0 4px 16px rgba(15,23,42,.06); position: sticky; top: 100px; }
.aside-list { list-style: none; padding: 0; margin-top: 16px; }
.aside-list li { padding: 4px 0; color: #4b5563; font-size: .9rem; }

/* ============== 文章 ============== */
.article-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; }
.article-content h3 { margin-top: 1.5em; color: #1f2330; }
.article-content p { color: #374151; }
.article-meta { color: #9ca3af; font-size: .85rem; margin-bottom: 16px; }
.article-tags { margin-top: 24px; }
.article-tags .tag { display: inline-block; padding: 4px 10px; background: #eef2ff; color: #2c5cff; border-radius: 4px; font-size: .8rem; margin-right: 6px; margin-bottom: 6px; }
.article-aside { background: #fff; padding: 24px; border-radius: 12px; height: fit-content; position: sticky; top: 100px; }
.article-aside h4 { margin-bottom: 12px; }
.article-aside ul { list-style: none; padding: 0; }
.article-aside li { padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.article-aside a { color: #1f2330; }
.article-aside a:hover { color: #2c5cff; }
.article-aside .btn { margin-top: 16px; }

/* ============== 关于我们 ============== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.timeline { list-style: none; padding: 0; max-width: 600px; margin: 0 auto; }
.timeline li { padding: 12px 0 12px 110px; border-left: 2px solid #2c5cff; margin-left: 90px; position: relative; }
.timeline li b { position: absolute; left: -90px; top: 12px; color: #2c5cff; font-weight: 600; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 18px; width: 12px; height: 12px; background: #2c5cff; border-radius: 50%; }

/* ============== 联系 ============== */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
.contact-form { background: #fff; padding: 28px; border-radius: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; box-shadow: 0 4px 16px rgba(15,23,42,.04); }
.contact-form .full { grid-column: 1 / -1; }
.contact-form label { display: flex; flex-direction: column; gap: 4px; }
.contact-form label > span { font-size: .9rem; color: #4b5563; }
.contact-form input, .contact-form select, .contact-form textarea {
  border: 1px solid #d1d5db; border-radius: 8px; padding: 10px 12px; font: inherit; color: #1f2330;
  background: #fff; transition: border .2s;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: #2c5cff; outline: 2px solid rgba(44,92,255,.2); }
.contact-aside { background: #fff; padding: 28px; border-radius: 12px; box-shadow: 0 4px 16px rgba(15,23,42,.04); }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.alert-ok  { background: #ecfdf5; color: #047857; }
.alert-err { background: #fef2f2; color: #b91c1c; }

/* ============== CTA ============== */
.cta-section { background: linear-gradient(135deg, #2c5cff, #1a3fc7); color: #fff; padding: 48px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-inner h2 { margin: 0; font-size: 1.5rem; }
.cta-inner p { margin: 6px 0 0; color: rgba(255,255,255,.85); }

/* ============== 页脚 ============== */
.site-footer { background: #0f172a; color: #cbd5e1; padding: 48px 0 0; }
.site-footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: 12px; }
.site-footer h5 { color: #fff; font-size: .95rem; margin-bottom: 12px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr 1fr; gap: 24px; }
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid li { padding: 4px 0; }
.footer-grid a { color: #cbd5e1; }
.footer-grid a:hover { color: #fff; }
.footer-intro { color: #94a3b8; font-size: .9rem; }
.footer-news li { padding: 6px 0; border-bottom: 1px dashed rgba(255,255,255,.06); }
.copyright { border-top: 1px solid rgba(255,255,255,.08); margin-top: 32px; padding: 16px 0; font-size: .85rem; color: #94a3b8; }
.copyright .container { display: flex; gap: 16px; flex-wrap: wrap; }
.copyright a { color: #94a3b8; }
.meta { color: #94a3b8; font-size: .85rem; }

/* ============== more ============== */
.more { text-align: center; margin-top: 24px; }

/* ============== 响应式 ============== */
@media (max-width: 960px) {
  .hero-inner, .think-grid, .course-detail-grid, .article-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .data-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .header-inner { flex-wrap: wrap; }
  .main-nav { order: 3; flex-basis: 100%; }
  .main-nav ul { justify-content: flex-start; flex-wrap: wrap; }
  .hero h1 { font-size: 2rem; }
  .course-stats { grid-template-columns: repeat(2, 1fr); }
  .board { --s: 36px; }
  .course-aside .aside-card, .article-aside { position: static; }
  .cta-inner { text-align: center; justify-content: center; }
}
@media (max-width: 600px) {
  .topbar-inner { flex-direction: column; gap: 4px; }
  .footer-grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.6rem !important; }
  h2 { font-size: 1.3rem !important; }
  .contact-form { grid-template-columns: 1fr; }
}
