/* 广东3+证书数学刷题 - 简约清晰风格 */
* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(135deg, #e8eaf6 0%, #f5f5f5 100%);
  min-height: 100vh;
  color: #333;
  line-height: 1.7;
}
.page {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.hero {
  text-align: center;
  padding: 30px 20px;
  background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%);
  color: white;
  border-radius: 12px;
  margin-bottom: 20px;
}
.hero h1 { font-size: 1.8em; font-weight: 600; margin-bottom: 6px; }
.hero p { opacity: 0.9; font-size: 0.95em; }
.hero .stats-bar {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 16px;
  font-size: 0.9em;
}
.hero .stats-bar span { background: rgba(255,255,255,0.2); padding: 4px 14px; border-radius: 20px; }

/* Module Cards */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.module-card {
  background: white;
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #e0e0e0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.module-card:hover {
  border-color: #1565c0;
  box-shadow: 0 4px 12px rgba(21,101,192,0.15);
}
.module-card h3 {
  font-size: 1.05em;
  color: #1565c0;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.module-card .count { font-size: 0.85em; color: #888; }

/* Unit List */
.unit-list {
  background: white;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 16px 0;
}
.unit-list h2 {
  font-size: 1.1em;
  color: #1565c0;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e3f2fd;
}
.unit-list ul { list-style: none; }
.unit-list li {
  padding: 12px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
}
.unit-list li:last-child { border-bottom: none; }
.unit-list li:hover { background: #f5f5f5; }
.unit-list li .unit-name { font-weight: 500; }
.unit-list li .unit-count { color: #888; font-size: 0.85em; }

/* Question View */
.q-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 18px;
  background: white;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
}
.q-header .tag {
  background: #e3f2fd;
  color: #1565c0;
  padding: 3px 12px;
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: 500;
}
.q-header .info { flex: 1; font-size: 0.85em; color: #666; }
.q-header .counter { font-weight: 600; color: #333; }

.q-box {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid #e0e0e0;
}
.q-number { font-size: 0.85em; color: #888; margin-bottom: 12px; }
.q-text { font-size: 1.05em; line-height: 1.8; margin-bottom: 20px; }

/* Options */
.options { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 1em;
  background: white;
}
.opt:hover { border-color: #90caf9; background: #f5f9ff; }
.opt .opt-label {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e3f2fd;
  color: #1565c0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9em;
  flex-shrink: 0;
}
.opt.correct {
  border-color: #43a047;
  background: #e8f5e9;
}
.opt.correct .opt-label { background: #43a047; color: white; }
.opt.wrong {
  border-color: #e53935;
  background: #ffebee;
}
.opt.wrong .opt-label { background: #e53935; color: white; }
.opt.disabled { cursor: default; pointer-events: none; }

/* Answer Box */
.answer-box {
  display: none;
  background: white;
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 16px;
  border: 2px solid #1565c0;
}
.answer-box.show { display: block; }
.answer-box .correct-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #c8e6c9;
  color: #2e7d32;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
  margin-bottom: 14px;
  font-size: 0.95em;
}
.answer-box .wrong-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffcdd2;
  color: #c62828;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 600;
  margin-bottom: 14px;
  font-size: 0.95em;
}
.answer-box .your-ans {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 12px;
}
.answer-box .correct-ans {
  font-size: 0.9em;
  color: #2e7d32;
  font-weight: 600;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #e8f5e9;
  border-radius: 8px;
  border-left: 3px solid #43a047;
}

/* Solution Box */
.solution-box {
  background: #fffde7;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid #fff9c4;
  border-left: 4px solid #fbc02d;
  display: none;
}
.solution-box.show { display: block; }
.solution-box h3 { color: #f57f17; margin-bottom: 10px; font-size: 0.95em; }
.solution-text { font-size: 0.92em; color: #333; line-height: 1.9; white-space: pre-wrap; }

/* Navigation Buttons */
.nav-btns {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
}
.nav-btns.sticky {
  position: sticky;
  bottom: 0;
  background: rgba(248,248,248,0.95);
  padding: 12px 0;
}
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-blue { background: #1565c0; color: white; }
.btn-blue:hover { background: #0d47a1; }
.btn-gray { background: #e0e0e0; color: #555; }
.btn-gray:hover { background: #bdbdbd; }
.btn-green { background: #2e7d32; color: white; }
.btn-green:hover { background: #1b5e20; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Back */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1565c0;
  text-decoration: none;
  font-weight: 500;
  padding: 10px 0;
}

/* Progress bar */
.progress-bar-wrap {
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  margin-bottom: 16px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1565c0, #42a5f5);
  transition: width 0.3s;
}

/* Filter */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: white;
  border-radius: 12px;
  margin: 16px 0;
  border: 1px solid #e0e0e0;
  align-items: center;
}
.filter-bar label { display: flex; align-items: center; gap: 6px; font-size: 0.9em; cursor: pointer; }
.filter-bar input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.filter-bar .sep { flex: 1; }
.filter-bar select { padding: 6px 10px; border: 1px solid #ccc; border-radius: 6px; font-size: 0.9em; cursor: pointer; }

@media (max-width: 600px) {
  .module-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.4em; }
  .q-box { padding: 16px; }
}
