/* ============================================================
   WPS 计算机二级练手场 · 全站样式
   配色：湖水青蓝 + 米白纸感，三大模块用同冷色系区分
   ============================================================ */

@import url("https://fonts.googleapis.cn/css2?family=Noto+Sans+SC:wght@400;500;700&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --cyan-500: #06b6d4;
  --bg: #f6faf9;
  --card: #ffffff;
  --ink: #13242b;
  --ink-soft: #5b7480;
  --line: #e2ecea;
  --amber-text: #b45309;
  --amber-bg: #fffbeb;
  --amber-line: #fcd34d;
  --green-text: #0f766e;
  --green-bg: #f0fdfa;
  --code-bg: #0e2428;
  --code-ink: #d7f0ec;
  --code-comment: #7fb3ac;
  --radius-card: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 8px 24px -12px rgba(13, 148, 136, 0.18);
  --shadow-hover: 0 16px 36px -14px rgba(13, 148, 136, 0.32);
  --module-color: var(--teal-600);
  --module-soft: #f0fdfa;
  --maxw: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg { display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

code, .mono {
  font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
  font-size: 0.88em;
}

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 250, 249, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--teal-600), var(--cyan-500));
  box-shadow: 0 6px 14px -6px rgba(13, 148, 136, 0.6);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15.5px; letter-spacing: .2px; }
.brand-text small { font-size: 11.5px; color: var(--ink-soft); }

.main-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px;
  font-size: 14px; color: var(--ink-soft); white-space: nowrap;
  transition: background .18s ease-out, color .18s ease-out;
}
.nav-link:hover { background: rgba(13, 148, 136, 0.08); color: var(--teal-700); }
.nav-link.active { background: var(--teal-600); color: #fff; }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 72px; }
.hero-blob { position: absolute; border-radius: 50%; filter: blur(72px); opacity: .32; pointer-events: none; }
.blob-a { width: 420px; height: 420px; background: #5eead4; top: -160px; right: -80px; }
.blob-b { width: 360px; height: 360px; background: #67e8f9; bottom: -180px; left: -100px; }
.hero-inner { position: relative; text-align: center; max-width: 820px; margin: 0 auto; }
.hero-badge {
  display: inline-block; padding: 6px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 500; color: var(--teal-700);
  background: rgba(13, 148, 136, 0.09); border: 1px solid rgba(13, 148, 136, 0.2);
  margin-bottom: 22px;
}
.hero-title { font-size: clamp(30px, 5vw, 46px); font-weight: 700; line-height: 1.28; letter-spacing: .5px; }
.hero-title span { color: var(--teal-600); position: relative; }
.hero-title span::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 10px;
  background: rgba(94, 234, 212, .55); z-index: -1; border-radius: 4px;
}
.hero-desc { color: var(--ink-soft); font-size: 16.5px; max-width: 660px; margin: 22px auto 0; }
.hero-actions { display: flex; gap: 14px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: 12px; font-size: 15px; font-weight: 500;
  transition: transform .18s ease-out, box-shadow .18s ease-out, background .18s;
  cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: var(--teal-600); color: #fff; box-shadow: 0 10px 22px -10px rgba(13, 148, 136, .7); }
.btn-primary:hover { background: var(--teal-700); transform: translateY(-2px); box-shadow: 0 14px 26px -10px rgba(13, 148, 136, .75); }
.btn-ghost { border-color: var(--line); background: #fff; color: var(--ink); }
.btn-ghost:hover { border-color: var(--teal-600); color: var(--teal-700); transform: translateY(-2px); }

.hero-stats { display: flex; justify-content: center; gap: clamp(24px, 6vw, 72px); margin-top: 52px; flex-wrap: wrap; }
.hero-stats div { text-align: center; }
.hero-stats dt { font-size: 30px; font-weight: 700; color: var(--teal-700); line-height: 1.2; }
.hero-stats dd { font-size: 13.5px; color: var(--ink-soft); margin-top: 2px; }

/* ---------- 通用区块标题 ---------- */
.section-title { text-align: center; font-size: 27px; font-weight: 700; }
.section-sub { text-align: center; color: var(--ink-soft); margin-top: 8px; font-size: 14.5px; }

/* ---------- 四步法 ---------- */
.how-section { padding: 30px 0 64px; }
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 34px; }
.how-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 26px 22px; position: relative; transition: transform .2s ease-out, box-shadow .2s ease-out;
}
.how-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.how-no {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-bg); color: var(--teal-700); font-weight: 700; font-size: 16px;
  border: 1.5px dashed rgba(13, 148, 136, .45);
}
.how-card h3 { font-size: 16.5px; margin: 14px 0 6px; }
.how-card p { font-size: 13.8px; color: var(--ink-soft); }

/* ---------- 模块卡片 ---------- */
.modules-section { padding: 26px 0 70px; }
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 36px; }
.module-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 28px 26px 24px; position: relative; overflow: hidden;
  transition: transform .2s ease-out, box-shadow .2s ease-out, border-color .2s;
}
.module-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: var(--module-color); opacity: .9;
}
.module-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--module-color) 35%, var(--line)); }
.module-card-top { display: flex; align-items: center; justify-content: space-between; }
.module-icon {
  width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center;
  background: var(--module-soft); color: var(--module-color);
}
.module-count { font-size: 12.5px; color: var(--ink-soft); background: var(--bg); padding: 4px 11px; border-radius: 999px; }
.module-card h3 { font-size: 20px; margin: 18px 0 2px; }
.module-subtitle { font-size: 13px; color: var(--module-color); font-weight: 500; }
.module-desc { font-size: 14px; color: var(--ink-soft); margin-top: 12px; flex: 1; }
.module-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 18px; }
.module-tags li {
  font-size: 12.5px; padding: 3px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--module-color) 9%, #fff);
  color: var(--module-color);
}
.module-progress { margin: 0 0 14px; }
.progress-track { display: block; height: 6px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.progress-bar { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--module-color); transition: width .4s ease-out; }
.module-progress em, .page-hero-progress em { font-style: normal; font-size: 12px; color: var(--ink-soft); display: block; margin-top: 6px; }
.module-cta {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14.5px; font-weight: 500; color: var(--module-color);
  transition: gap .2s ease-out;
}
.module-card:hover .module-cta { gap: 11px; }

/* ---------- 备考贴士 ---------- */
.tips-section { padding: 0 0 76px; }
.tip-band {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 36px; align-items: center;
  background: linear-gradient(120deg, #f0fdfa, #ecfeff);
  border: 1px solid rgba(13, 148, 136, .18);
  border-radius: 20px; padding: 38px 40px;
}
.tip-band h2 { font-size: 21px; margin-bottom: 10px; }
.tip-band p { font-size: 14.3px; color: #41605c; }
.tip-list { display: grid; gap: 12px; }
.tip-list li {
  background: #fff; border-radius: var(--radius-sm); padding: 11px 16px;
  font-size: 14px; box-shadow: 0 4px 12px -8px rgba(13, 148, 136, .35);
}
.tip-list span { color: var(--teal-700); font-weight: 700; }

/* ---------- 模块列表页 ---------- */
.page-hero { padding: 38px 0 30px; background: var(--module-soft); border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-soft); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--teal-700); }
.breadcrumb strong { color: var(--ink); font-weight: 500; }
.page-hero-flex { display: flex; align-items: center; gap: 18px; }
.page-hero-icon {
  width: 60px; height: 60px; border-radius: 16px; flex-shrink: 0;
  display: grid; place-items: center;
  background: #fff; color: var(--module-color); box-shadow: var(--shadow-soft);
}
.page-hero-flex h1 { font-size: 26px; line-height: 1.3; }
.page-hero-flex p { color: var(--ink-soft); font-size: 14px; }
.page-hero-progress { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.page-hero-progress em { white-space: nowrap; margin: 0; font-size: 13px; }
.ring { position: relative; width: 54px; height: 54px; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: var(--module-color); }
.ring svg { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: rgba(13, 148, 136, .12); stroke-width: 4; }
.ring-fg { fill: none; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 106.8; stroke-dashoffset: 106.8; transition: stroke-dashoffset .5s ease-out; }

.exercise-list-section { padding: 34px 0 72px; }
.exercise-list { display: grid; gap: 16px; }
.exercise-card {
  display: flex; align-items: center; gap: 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 22px 26px; position: relative;
  transition: transform .2s ease-out, box-shadow .2s ease-out, border-color .2s;
}
.exercise-card::before {
  content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3.5px;
  border-radius: 0 4px 4px 0; background: var(--module-color); opacity: 0; transition: opacity .2s;
}
.exercise-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--module-color) 30%, var(--line)); }
.exercise-card:hover::before { opacity: 1; }
.exercise-index {
  font-family: "JetBrains Mono", monospace; font-size: 20px; font-weight: 500;
  color: var(--module-color); background: var(--module-soft);
  width: 52px; height: 52px; border-radius: 13px; flex-shrink: 0;
  display: grid; place-items: center;
}
.exercise-card-body { flex: 1; min-width: 0; }
.exercise-card-body h2 { font-size: 17px; font-weight: 700; }
.exercise-objective { font-size: 13.5px; color: var(--ink-soft); margin: 3px 0 9px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.exercise-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.stars { display: inline-flex; gap: 2px; }
.star { fill: #cbd5e1; }
.star.on { fill: #f59e0b; }
.duration, .meta-duration { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-soft); }
.point-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.point-chips li { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--module-soft); color: var(--module-color); }
.exercise-done-badge {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  font-size: 12.5px; font-weight: 500; color: var(--green-text);
  background: var(--green-bg); border-radius: 999px; padding: 6px 12px;
}

/* ---------- 练习详情页 ---------- */
.detail-topbar { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); backdrop-filter: blur(10px); position: sticky; top: 64px; z-index: 50; }
.detail-topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 10px; }
.done-toggle { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 15px; font-size: 13.5px; color: var(--ink-soft); cursor: pointer; transition: all .2s ease-out; font-family: inherit; flex-shrink: 0; }
.done-toggle:hover { border-color: var(--module-color); color: var(--module-color); }
.toggle-box { width: 17px; height: 17px; border-radius: 5px; border: 1.6px solid #b7c8c5; display: grid; place-items: center; color: #fff; transition: all .2s; }
.done-toggle.done { background: var(--module-color); border-color: var(--module-color); color: #fff; }
.done-toggle.done .toggle-box { background: #fff; color: var(--module-color); border-color: #fff; }
.done-toggle:not(.done) .toggle-box svg { opacity: 0; }

.detail-article { padding: 34px 0 70px; }
.detail-container { max-width: 820px; }
.detail-header { margin-bottom: 28px; }
.detail-module-pill { display: inline-block; font-size: 12.5px; font-weight: 500; padding: 4px 13px; border-radius: 999px; margin-bottom: 12px; }
.detail-header h1 { font-size: clamp(24px, 3.4vw, 31px); line-height: 1.35; }
.detail-meta { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.detail-points { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 14px; }
.detail-points li { font-size: 13px; padding: 4px 13px; border-radius: 999px; background: var(--module-soft); color: var(--module-color); font-weight: 500; }
.detail-objective { font-size: 15.5px; color: var(--ink-soft); background: #fff; border: 1px solid var(--line); border-left: 3.5px solid var(--module-color); border-radius: 10px; padding: 14px 18px; }

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 24px 26px; margin-bottom: 20px; box-shadow: 0 2px 10px -8px rgba(19, 36, 43, .12);
}
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-heading h2 { font-size: 17.5px; display: flex; align-items: center; gap: 9px; }
.panel-heading h2::before { content: ""; width: 5px; height: 17px; border-radius: 3px; background: var(--module-color); }
.panel-note { font-size: 12.5px; color: var(--ink-soft); }

/* TSV / 素材数据卡 */
.tsv-textarea, .source-textarea {
  width: 100%; display: block; resize: vertical;
  background: var(--code-bg); color: var(--code-ink);
  border: none; border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
  font-size: 13px; line-height: 1.7;
  tab-size: 4; white-space: pre; overflow-x: auto;
  outline: none;
}
.tsv-textarea { min-height: 150px; }
.source-textarea { min-height: 120px; }
.data-hint { font-size: 12.8px; color: var(--ink-soft); margin-top: 10px; padding-left: 2px; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  border: 1px solid rgba(215, 240, 236, .25); background: rgba(255,255,255,.08);
  color: var(--code-ink); border-radius: 8px; padding: 7px 15px;
  font-size: 13px; cursor: pointer; font-family: inherit;
  transition: background .18s;
}
.copy-btn:hover { background: rgba(255,255,255,.18); }
.copy-btn.copied { background: #10b981; border-color: #10b981; color: #fff; }
.data-panel { background: #123238; border-color: #1a454b; padding: 20px 22px; }
.data-panel .panel-heading h2 { color: #eafaf7; }
.data-panel .panel-heading h2::before { background: #5eead4; }

/* 步骤时间线 */
.steps-timeline { position: relative; padding-left: 6px; }
.step-item { display: flex; gap: 18px; position: relative; padding-bottom: 26px; }
.step-item:last-child { padding-bottom: 0; }
.step-item::before {
  content: ""; position: absolute; left: 18px; top: 38px; bottom: -4px;
  width: 2px; background: linear-gradient(var(--module-color), color-mix(in srgb, var(--module-color) 18%, #fff));
  opacity: .35;
}
.step-item:last-child::before { display: none; }
.step-no {
  width: 37px; height: 37px; border-radius: 50%; flex-shrink: 0; z-index: 1;
  display: grid; place-items: center; font-weight: 700; font-size: 15.5px;
  background: var(--module-color); color: #fff;
  box-shadow: 0 4px 10px -4px color-mix(in srgb, var(--module-color) 70%, transparent);
}
.step-content { flex: 1; padding-top: 4px; }
.step-content h3 { font-size: 16px; margin-bottom: 8px; }
.step-ops { display: grid; gap: 8px; }
.step-ops li {
  position: relative; padding-left: 17px; font-size: 14.8px; color: #334e54;
}
.step-ops li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--module-color); opacity: .55; }
.step-ops code {
  background: var(--module-soft); color: var(--module-color);
  border: 1px solid color-mix(in srgb, var(--module-color) 22%, #fff);
  padding: 1px 7px; border-radius: 6px; font-size: .86em; white-space: nowrap;
}

/* 检验与提示 */
.detail-grid { display: grid; gap: 20px; }
.verify-panel { border-left: 4px solid var(--teal-600); }
.verify-list { display: grid; gap: 12px; }
.verify-list li { display: flex; gap: 11px; align-items: flex-start; font-size: 14.6px; color: #334e54; }
.check-icon {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--green-bg); color: var(--teal-700); display: grid; place-items: center; margin-top: 3px;
}
.tip-panel { border-left: 4px solid var(--amber-line); background: var(--amber-bg); }
.tip-panel .panel-heading h2::before { background: #d97706; }
.tip-callout-list { display: grid; gap: 11px; }
.tip-callout-list li {
  position: relative; padding-left: 20px; font-size: 14.3px; color: #7c5210;
}
.tip-callout-list li::before { content: "!"; position: absolute; left: 0; top: 1px; width: 15px; height: 15px; border-radius: 50%; background: #d97706; color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.tip-callout-list code { background: rgba(217,119,6,.12); color: #92400e; border-color: rgba(217,119,6,.25); padding: 1px 7px; border-radius: 6px; font-size: .86em; }

/* 上一题/下一题 */
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; margin-top: 8px; }
.pager-link {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s, transform .2s, box-shadow .2s; min-width: 0;
}
.pager-link:hover { border-color: var(--module-color); transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.pager-link span { display: flex; flex-direction: column; line-height: 1.4; min-width: 0; font-size: 13.8px; font-weight: 500; }
.pager-link small { font-size: 11.5px; color: var(--ink-soft); font-weight: 400; }
.pager-link.next { justify-content: flex-end; text-align: right; }
.pager-center { font-size: 13.5px; color: var(--module-color); font-weight: 500; white-space: nowrap; }

/* 404 */
.empty-state { text-align: center; padding: 110px 24px; }
.empty-code { font-size: 72px; font-weight: 700; color: var(--teal-600); font-family: "JetBrains Mono", monospace; }
.empty-state h1 { font-size: 24px; margin: 8px 0; }
.empty-state p { color: var(--ink-soft); margin-bottom: 26px; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 40px 0 34px; }
.footer-inner { display: grid; gap: 8px; }
.footer-inner strong { font-size: 15px; }
.footer-inner p { font-size: 12.8px; color: var(--ink-soft); }
.footer-copy { font-size: 12px; color: #94a9b2; margin-top: 6px; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .how-grid { grid-template-columns: repeat(2, 1fr); }
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .module-card:last-child { grid-column: span 2; max-width: 480px; width: 100%; margin: 0 auto; }
  .tip-band { grid-template-columns: 1fr; gap: 22px; padding: 30px 28px; }
}

@media (max-width: 680px) {
  body { font-size: 15px; }
  .container { padding: 0 16px; }
  .header-inner { height: 58px; }
  .brand-text small { display: none; }
  .hero { padding: 56px 0 48px; }
  .hero-stats { gap: 28px; }
  .how-grid { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr; }
  .module-card:last-child { grid-column: auto; max-width: none; }
  .page-hero-flex { flex-wrap: wrap; }
  .page-hero-progress { margin-left: auto; }
  .exercise-card { flex-wrap: wrap; gap: 12px; padding: 18px; }
  .exercise-index { width: 42px; height: 42px; font-size: 16px; border-radius: 10px; }
  .exercise-done-badge { order: 3; }
  .panel { padding: 20px 18px; }
  .detail-topbar { top: 58px; }
  .detail-topbar-inner { flex-wrap: wrap; }
  .pager { grid-template-columns: 1fr; }
  .pager-center { grid-row: 1; text-align: center; }
  .pager-link.next { justify-content: flex-start; text-align: left; }
  .step-ops code { white-space: normal; }
}
