/* ===== 测试分类大全页面样式 ===== */

:root {
  --sprout: #7CB342;
  --sprout-dark: #558B2F;
  --sprout-deep: #33691E;
  --sprout-light: #AED581;
  --sprout-pale: #DCEDC8;
  --leaf-yellow: #CDDC39;
  --bg: #F5F9EF;
  --bg-warm: #FAFDF7;
  --card: #FFFFFF;
  --text: #2E3B24;
  --text-secondary: #6B7A5C;
  --text-muted: #9AAA8B;
  --border: #DCE8C8;
  --border-light: #E8F0DC;
  --shadow-sm: 0 2px 8px rgba(85, 139, 47, 0.08);
  --shadow-md: 0 4px 20px rgba(85, 139, 47, 0.12);
  --shadow-lg: 0 8px 40px rgba(85, 139, 47, 0.16);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --nav-h: 54px;
  --content-w: 680px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif; background: #fff; color: var(--text); line-height: 1.7; overflow-x: hidden; }

h1, h2, h3, h4 { font-family: 'Noto Serif SC', serif; font-weight: 700; line-height: 1.35; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===== 顶部导航 ===== */
.quiz-topnav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(85, 139, 47, 0.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  height: var(--nav-h); display: flex; align-items: center;
  padding: 0 16px; color: #fff;
  max-width: var(--content-w); margin: 0 auto;
}
.quiz-topnav-brand {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 700; color: #fff;
  letter-spacing: 1px;
}
.quiz-topnav-brand .quiz-topnav-title {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  margin: 0;
}
.quiz-topnav-logo { width: 28px; height: 28px; }
.quiz-topnav-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.quiz-topnav-search {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.15); transition: background 0.2s;
}
.quiz-topnav-search:hover { background: rgba(255,255,255,0.28); }
.quiz-topnav-search svg { width: 18px; height: 18px; color: #fff; }
.quiz-topnav-menu {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.15); transition: background 0.2s;
}
.quiz-topnav-menu:hover { background: rgba(255,255,255,0.28); }
.quiz-topnav-menu svg { width: 20px; height: 20px; color: #fff; }

/* ===== 搜索弹窗 ===== */
.quiz-search-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(46, 59, 36, 0.5);
  backdrop-filter: blur(4px);
  align-items: flex-start; justify-content: center;
  padding-top: 25vh;
}
.quiz-search-overlay.quiz-active { display: flex; }
.quiz-search-modal {
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: calc(100% - 32px); max-width: 520px;
  padding: 20px;
}
.quiz-search-modal form { display: flex; gap: 10px; }
.quiz-search-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.quiz-search-input:focus { border-color: var(--sprout); }
.quiz-search-btn {
  padding: 12px 24px;
  background: var(--sprout);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.quiz-search-btn:hover { background: var(--sprout-dark); }

/* ===== 汉堡菜单 ===== */
.quiz-nav-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(46, 59, 36, 0.4);
}
.quiz-nav-overlay.quiz-active { display: block; }
.quiz-nav-panel {
  position: fixed; top: 0; right: 0;
  width: 280px; height: 100%;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0,0,0,0.1);
  padding: 20px;
}
.quiz-nav-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}
.quiz-nav-header span { font-family: 'Noto Serif SC', serif; font-size: 18px; font-weight: 700; color: var(--sprout-deep); }
.quiz-nav-close { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; }
.quiz-nav-close svg { width: 20px; height: 20px; color: var(--text-muted); }
.quiz-nav-links { display: flex; flex-direction: column; gap: 4px; }
.quiz-nav-links a {
  padding: 14px 12px;
  font-size: 15px; font-weight: 500;
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: background 0.2s, color 0.2s;
}
.quiz-nav-links a:hover { background: var(--bg); color: var(--sprout-dark); }

/* ===== 页面标题区 ===== */
.quiz-cat-header {
  background: linear-gradient(135deg, var(--bg), var(--bg-warm));
  padding: 36px 16px 28px;
  max-width: var(--content-w); margin: 0 auto;
  text-align: center;
}
.quiz-cat-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.quiz-cat-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.quiz-cat-num {
  color: var(--sprout);
  font-weight: 600;
  margin: 0 2px;
}

/* ===== 分类列表 ===== */
.quiz-cat-main {
  max-width: var(--content-w); margin: 0 auto;
  padding: 8px 16px 32px;
}
.quiz-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.quiz-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  text-align: center;
  min-height: 120px;
}
.quiz-cat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--sprout-light);
}
.quiz-cat-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 25px;
  line-height: 1.4;
}
.quiz-cat-meta {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.quiz-cat-meta span {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-weight: 300;
}
.quiz-cat-meta .quiz-cat-num {
  color: #FF9800;
  display: inline;
  padding: 0;
  border: none;
  border-radius: 0;
  font-weight: normal;
}

/* ===== Footer ===== */
.quiz-footer {
  background: #4A6B2E;
  color: rgba(255, 255, 255, 0.85);
  padding: 24px 16px calc(14px + env(safe-area-inset-bottom));
  margin-top: 0;
  max-width: var(--content-w); margin-left: auto; margin-right: auto;
}
.quiz-footer-inner { max-width: 100%; }
.quiz-footer-brand {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.quiz-footer-brand svg { width: 28px; height: 28px; }
.quiz-footer-brand span { font-family: 'Noto Serif SC', serif; font-size: 18px; font-weight: 700; color: #fff; }
.quiz-footer-desc { font-size: 13px; line-height: 1.8; color: rgba(255,255,255,0.6); margin-bottom: 14px; }
.quiz-footer-bottom { font-size: 12px; color: rgba(255,255,255,0.45); text-align: center; }
.quiz-footer-icp { margin-top: 4px; font-size: 11px; color: rgba(255,255,255,0.35); }

/* ===== 平板适配 ===== */
@media (min-width: 768px) {
  :root { --content-w: 760px; }
  .quiz-cat-header { padding: 44px 24px 36px; }
  .quiz-cat-title { font-size: 28px; }
  .quiz-cat-desc { font-size: 15px; }
  .quiz-cat-main { padding: 12px 24px 40px; }
  .quiz-cat-grid { gap: 16px; }
  .quiz-cat-card { padding: 28px 16px; min-height: 140px; }
  .quiz-cat-name { font-size: 18px; }
  .quiz-cat-meta { font-size: 13px; }
  .quiz-cat-meta span { padding: 4px 12px; }
  .quiz-footer { padding: 28px 24px 16px; }
}

/* ===== 桌面适配 ===== */
@media (min-width: 1024px) {
  :root { --content-w: 820px; }
  .quiz-cat-header { padding: 52px 24px 40px; }
  .quiz-cat-title { font-size: 32px; }
  .quiz-cat-desc { font-size: 16px; }
  .quiz-cat-main { padding: 16px 24px 48px; }
  .quiz-cat-grid { gap: 20px; }
  .quiz-cat-card { padding: 32px 20px; min-height: 150px; }
  .quiz-cat-name { font-size: 24px; }
  .quiz-cat-meta { font-size: 14px; }
  .quiz-cat-meta span { padding: 4px 14px; }
}
