/* ============================================================
   职业资格考试挑战 · 智能刷题系统
   样式（从原单文件 HTML 中抽出，保持原界面不变）
   ============================================================ */

:root {
  --bg: #0a0a12;
  --card: rgba(20, 20, 35, 0.78);
  --accent: #00f0ff;
  --accent2: #b400ff;
  --text: #e8e8ff;
  --muted: #8a8aaa;
  --success: #00ff9d;
  --error: #ff3b6b;
  --glow: 0 0 20px rgba(0, 240, 255, 0.4);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Noto Sans SC', sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh; overflow-x: hidden; position: relative;
}
.bg-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px; z-index: 0;
  animation: gridMove 20s linear infinite;
}
@keyframes gridMove { 0% { transform: translateY(0); } 100% { transform: translateY(50px); } }
.particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.particle {
  position: absolute; width: 3px; height: 3px;
  background: var(--accent); border-radius: 50%; opacity: 0.4;
  animation: float 8s infinite ease-in-out;
}
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
  50% { transform: translateY(-30px) scale(1.2); opacity: 0.7; }
}

.top-nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 10, 18, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(0, 240, 255, 0.16);
  padding: 0.65rem 1.2rem;
}
.top-nav-inner {
  max-width: 980px; margin: 0 auto;
  display: flex; align-items: center; gap: 0.35rem;
  flex-wrap: wrap; min-height: 34px;
}
.breadcrumb-item {
  display: inline-flex; align-items: center; gap: 0.3rem;
  color: var(--muted); font-size: 0.82rem;
  padding: 0.32rem 0.65rem; border-radius: 7px;
  border: 1px solid transparent; cursor: pointer;
  transition: all 0.22s ease;
  max-width: 200px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.breadcrumb-item.home {
  color: var(--accent); background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.16); font-weight: 700;
}
.breadcrumb-item.home:hover {
  background: rgba(0, 240, 255, 0.16);
  border-color: rgba(0, 240, 255, 0.38);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.15);
  transform: translateY(-1px);
}
.breadcrumb-icon { font-size: 1rem; line-height: 1; }
.breadcrumb-item:not(.disabled):not(.home) {
  color: var(--accent);
  background: rgba(0, 240, 255, 0.07);
  border-color: rgba(0, 240, 255, 0.12);
}
.breadcrumb-item:not(.disabled):not(.home):hover {
  color: #ffffff; background: rgba(0, 240, 255, 0.14);
  border-color: rgba(0, 240, 255, 0.35);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.14);
  transform: translateY(-1px);
}
.breadcrumb-item.disabled {
  cursor: default; color: #55556f;
  background: transparent; border-color: transparent;
}
.nav-sep {
  color: #55556f; font-size: 0.95rem;
  opacity: 0.65; user-select: none;
}
.breadcrumb-item.current {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(180, 0, 255, 0.12));
  border-color: rgba(0, 240, 255, 0.25); font-weight: 700;
}

.container {
  position: relative; z-index: 1;
  max-width: 920px; margin: 0 auto;
  padding: 1.3rem 1.2rem 2rem;
  min-height: calc(100vh - 60px);
  display: flex; flex-direction: column; justify-content: center;
}
.screen { display: none; animation: fadeIn 0.4s ease; }
.screen.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.header-block { text-align: center; margin-bottom: 1.5rem; }
.logo {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(1.6rem, 5vw, 2.3rem); font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; letter-spacing: 1px; margin-bottom: 0.35rem;
}
.sub-title { color: var(--muted); font-size: 0.92rem; }
.badge-title {
  font-family: 'Orbitron', sans-serif; font-size: 0.92rem;
  color: var(--accent); letter-spacing: 1px; margin-bottom: 0.35rem;
}
.screen-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.25rem; }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem; margin-bottom: 1.2rem;
}
.card-box {
  background: var(--card); backdrop-filter: blur(18px);
  border: 1px solid rgba(0, 240, 255, 0.16);
  border-radius: 16px; padding: 1.4rem 1.2rem;
  cursor: pointer; transition: all 0.28s ease;
  position: relative; overflow: hidden;
}
.card-box::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0; transition: opacity 0.28s;
}
.card-box:hover {
  transform: translateY(-5px);
  border-color: rgba(0, 240, 255, 0.45);
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.14);
}
.card-box:hover::before { opacity: 1; }
.card-icon { font-size: 2rem; display: block; margin-bottom: 0.55rem; }
.card-name { font-size: 1.12rem; font-weight: 700; margin-bottom: 0.3rem; }
.card-desc { font-size: 0.8rem; color: var(--muted); line-height: 1.45; margin-bottom: 0.7rem; }
.card-meta { display: flex; gap: 0.55rem; font-size: 0.72rem; color: var(--accent); flex-wrap: wrap; }
.card-meta span { background: rgba(0, 240, 255, 0.1); padding: 0.18rem 0.5rem; border-radius: 5px; }

.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.95rem; margin-bottom: 1.4rem;
}
.mode-card {
  background: var(--card); backdrop-filter: blur(16px);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 14px; padding: 1.3rem 1rem;
  cursor: pointer; transition: all 0.25s ease; text-align: center;
}
.mode-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 240, 255, 0.4);
  box-shadow: 0 8px 25px rgba(0, 240, 255, 0.12);
}
.mode-icon { font-size: 1.7rem; margin-bottom: 0.45rem; display: block; }
.mode-name { font-size: 1.02rem; font-weight: 700; margin-bottom: 0.25rem; }
.mode-info { font-size: 0.78rem; color: var(--muted); line-height: 1.4; }

.chapter-list { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.4rem; }
.chapter-item {
  background: var(--card); backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 240, 255, 0.12);
  border-radius: 12px; padding: 1.05rem 1.2rem;
  transition: all 0.22s ease;
  display: flex; align-items: center; gap: 1rem;
}
.chapter-item:hover {
  border-color: rgba(0, 240, 255, 0.4);
  background: rgba(0, 240, 255, 0.06);
}
.chapter-item.clickable { cursor: pointer; }
.chapter-item.clickable:hover { transform: translateX(4px); }
.chapter-num {
  font-family: 'Orbitron', sans-serif; font-weight: 700;
  width: 36px; height: 36px; border-radius: 9px;
  background: rgba(0, 240, 255, 0.15); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 0.9rem;
}
.chapter-info { flex: 1; min-width: 0; }
.chapter-name { font-size: 1.02rem; font-weight: 600; margin-bottom: 0.2rem; }
.chapter-count { font-size: 0.78rem; color: var(--muted); }
.chapter-actions {
  display: flex; gap: 0.5rem; flex-shrink: 0; flex-wrap: wrap;
}
.btn-mini {
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.78rem; font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: 8px; cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-mini.primary {
  background: linear-gradient(135deg, var(--accent), #00c4d4);
  color: #0a0a12;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}
.btn-mini.primary:hover {
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.55);
  transform: translateY(-1px);
}
.btn-mini.primary:disabled {
  opacity: 0.35; cursor: not-allowed;
  transform: none; box-shadow: none;
}
.btn-mini.ghost {
  background: transparent; color: var(--accent);
  border-color: rgba(0, 240, 255, 0.4);
}
.btn-mini.ghost:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.start-card, .question-card, .result-card, .empty-card {
  background: var(--card); backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 20px; padding: 2.1rem 1.5rem;
  text-align: center;
  box-shadow: var(--glow), 0 18px 40px rgba(0,0,0,0.4);
}
.selected-subject {
  font-family: 'Orbitron', sans-serif; font-size: 0.95rem;
  color: var(--accent); margin-bottom: 0.4rem; letter-spacing: 1px;
}
.start-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.35rem; }
.start-desc { color: var(--muted); margin-bottom: 1.5rem; font-size: 0.92rem; }
.stats-preview {
  display: flex; justify-content: center; gap: 1.4rem;
  margin-bottom: 1.7rem; flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-value {
  font-family: 'Orbitron', sans-serif; font-size: 1.3rem;
  color: var(--accent); font-weight: 700;
}
.stat-label { font-size: 0.75rem; color: var(--muted); margin-top: 0.12rem; }
.btn {
  font-family: 'Noto Sans SC', sans-serif; font-weight: 700; font-size: 0.98rem;
  padding: 0.85rem 1.9rem; border: none; border-radius: 50px;
  cursor: pointer; transition: all 0.25s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #00c4d4);
  color: #0a0a12; box-shadow: 0 0 25px rgba(0, 240, 255, 0.4);
}
.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.6);
}
.btn-primary:disabled {
  opacity: 0.4; cursor: not-allowed;
  transform: none !important; box-shadow: none !important;
}
.btn-secondary {
  background: transparent; color: var(--accent);
  border: 2px solid var(--accent); margin-top: 0.65rem;
}
.btn-secondary:hover { background: rgba(0, 240, 255, 0.1); transform: translateY(-2px); }
.btn-back {
  background: transparent; color: var(--muted);
  border: 1px solid rgba(255,255,255,0.12);
  margin-top: 0.65rem; font-size: 0.88rem; padding: 0.6rem 1.3rem;
}
.btn-back:hover { border-color: var(--muted); color: var(--text); }

.quiz-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.15rem; flex-wrap: wrap; gap: 0.65rem;
}
.progress-wrap { flex: 1; min-width: 160px; }
.progress-label {
  display: flex; justify-content: space-between;
  font-size: 0.82rem; color: var(--muted); margin-bottom: 0.28rem;
}
.progress-bar {
  height: 7px; background: rgba(255,255,255,0.08);
  border-radius: 10px; overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 10px; transition: width 0.35s ease;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.45);
}
.timer {
  font-family: 'Orbitron', sans-serif; font-size: 1.2rem; font-weight: 700;
  color: var(--accent); background: rgba(0, 240, 255, 0.1);
  padding: 0.38rem 0.85rem; border-radius: 10px;
  border: 1px solid rgba(0, 240, 255, 0.3);
  min-width: 70px; text-align: center;
}
.timer.warning { color: #ffaa00; border-color: #ffaa00; animation: pulse 1s infinite; }
.timer.danger { color: var(--error); border-color: var(--error); animation: pulse 0.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.subject-tag {
  display: inline-block; background: rgba(180, 0, 255, 0.15);
  color: #d580ff; font-size: 0.72rem; padding: 0.2rem 0.6rem;
  border-radius: 5px; margin-bottom: 0.45rem;
  border: 1px solid rgba(180, 0, 255, 0.3);
}
.mode-tag {
  display: inline-block; background: rgba(0, 240, 255, 0.12);
  color: var(--accent); font-size: 0.7rem; padding: 0.16rem 0.5rem;
  border-radius: 5px; margin-left: 0.35rem;
  border: 1px solid rgba(0, 240, 255, 0.25);
}
.question-card { text-align: left; margin-bottom: 1.15rem; }
.question-number {
  font-family: 'Orbitron', sans-serif; font-size: 0.78rem;
  color: var(--accent); margin-bottom: 0.45rem; letter-spacing: 1px;
}
.question-text { font-size: 1.15rem; font-weight: 500; line-height: 1.5; }
.options { display: flex; flex-direction: column; gap: 0.7rem; }
.option {
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 12px; padding: 0.85rem 1.05rem;
  cursor: pointer; transition: all 0.22s ease;
  display: flex; align-items: center; gap: 0.8rem;
}
.option:hover:not(.disabled) {
  border-color: var(--accent); background: rgba(0, 240, 255, 0.08);
  transform: translateX(4px);
}
.option.selected {
  border-color: var(--accent); background: rgba(0, 240, 255, 0.14);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.18);
}
.option.correct { border-color: var(--success); background: rgba(0, 255, 157, 0.14); }
.option.wrong { border-color: var(--error); background: rgba(255, 59, 107, 0.14); }
.option.disabled { pointer-events: none; opacity: 0.75; }
.option-letter {
  font-family: 'Orbitron', sans-serif; font-weight: 700;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; background: rgba(0, 240, 255, 0.15); color: var(--accent);
  flex-shrink: 0; font-size: 0.85rem;
}
.option.correct .option-letter { background: rgba(0, 255, 157, 0.25); color: var(--success); }
.option.wrong .option-letter { background: rgba(255, 59, 107, 0.25); color: var(--error); }
.option-text { flex: 1; font-size: 0.95rem; }

/* 作答后的反馈区（新增：显示正确答案与解析，仅作答后可见） */
.answer-feedback {
  margin-top: 1rem; padding: 0.9rem 1.05rem;
  border-radius: 12px; font-size: 0.9rem; line-height: 1.6;
  text-align: left;
}
.answer-feedback .feedback-head { font-weight: 700; margin-bottom: 0.3rem; }
.answer-feedback.correct {
  border: 1px solid rgba(0, 255, 157, 0.35);
  background: rgba(0, 255, 157, 0.08);
}
.answer-feedback.correct .feedback-head { color: var(--success); }
.answer-feedback.wrong {
  border: 1px solid rgba(255, 59, 107, 0.35);
  background: rgba(255, 59, 107, 0.08);
}
.answer-feedback.wrong .feedback-head { color: var(--error); }
.answer-feedback .feedback-exp { color: var(--muted); }

.nav-btns { display: flex; justify-content: space-between; gap: 0.85rem; margin-top: 0.65rem; }
.btn-next, .btn-prev { flex: 1; max-width: 170px; }

.score-circle {
  width: 135px; height: 135px; margin: 0 auto 1.15rem;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--percent) * 1%), rgba(255,255,255,0.08) 0);
  display: flex; align-items: center; justify-content: center; position: relative;
  box-shadow: 0 0 28px rgba(0, 240, 255, 0.28);
}
.score-circle::before {
  content: ''; position: absolute; inset: 10px;
  background: var(--bg); border-radius: 50%;
}
.score-inner { position: relative; z-index: 1; text-align: center; }
.score-value {
  font-family: 'Orbitron', sans-serif; font-size: 2rem; font-weight: 900;
  color: var(--accent); line-height: 1;
}
.score-label { font-size: 0.75rem; color: var(--muted); margin-top: 0.12rem; }
.result-title { font-size: 1.45rem; font-weight: 700; margin-bottom: 0.3rem; }
.result-desc { color: var(--muted); margin-bottom: 1.3rem; font-size: 0.92rem; }
.result-details {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem; margin-bottom: 1.5rem;
}
.detail-box {
  background: rgba(255,255,255,0.04); border-radius: 11px; padding: 0.8rem;
  border: 1px solid rgba(255,255,255,0.07);
}
.detail-value {
  font-family: 'Orbitron', sans-serif; font-size: 1.2rem;
  font-weight: 700; color: var(--accent);
}
.detail-label { font-size: 0.72rem; color: var(--muted); margin-top: 0.12rem; }
.footer { text-align: center; margin-top: 1.4rem; color: var(--muted); font-size: 0.78rem; }

@media (max-width: 600px) {
  .top-nav { padding: 0.55rem 0.75rem; }
  .top-nav-inner { gap: 0.2rem; }
  .breadcrumb-item { font-size: 0.75rem; padding: 0.25rem 0.45rem; max-width: 120px; }
  .nav-sep { font-size: 0.8rem; }
  .breadcrumb-icon { font-size: 0.9rem; }
  .grid-cards, .mode-grid { grid-template-columns: 1fr; }
  .result-details { grid-template-columns: 1fr; }
  .nav-btns { flex-direction: column; }
  .btn-next, .btn-prev { max-width: none; }
  .start-card, .question-card, .result-card { padding: 1.4rem 1.1rem; }
  .chapter-item { flex-wrap: wrap; }
  .chapter-actions { width: 100%; justify-content: flex-end; }
}
