:root{
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --card: #ffffff;
  --border: #e2e8f0;
}
[data-theme="dark"]{
  --bg: #0b1220;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #60a5fa;
  --accent-2: #3b82f6;
  --card: #0f172a;
  --border: #1e293b;
}
*{box-sizing:border-box}
body{margin:0; font-family:Segoe UI, system-ui, -apple-system, "Helvetica Neue", Arial; background:var(--bg); color:var(--text); line-height:1.6}
a{color:var(--accent)}
.container{max-width:960px; margin:0 auto; padding:24px}
.head-flex{display:flex; align-items:center; justify-content:space-between}
.site-header{border-bottom:1px solid var(--border); background:linear-gradient(90deg, rgba(255,255,255,0.15), transparent)}
.logo{margin:0; font-size:1.2rem}
.head-actions{display:flex; gap:8px}
.hero{padding:28px 0 8px}
.hero h2{margin:0 0 6px}
.hero p{margin:0 0 12px; color:var(--muted)}
.hero-actions{display:flex; gap:10px}
.filter-label{align-self:center; color:var(--muted); font-weight:600}
.select{padding:9px 12px; border-radius:10px; border:1px solid var(--border); background:var(--card); color:var(--text); font-weight:600}
.card{background:var(--card); border:1px solid var(--border); border-radius:12px; padding:20px; box-shadow:0 8px 24px rgba(15,23,42,0.08)}
.card-head{display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px}
.meta{color:var(--muted); font-size:0.95rem}
.pill{padding:4px 10px; border-radius:999px; border:1px solid var(--border); color:var(--muted); font-size:0.9rem}
.question-text{font-size:1.05rem; white-space:pre-wrap; margin-bottom:14px}
.options-container{display:grid; gap:10px; margin-bottom:12px; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr))}
.option-btn{display:flex; align-items:flex-start; gap:10px; padding:10px 12px; border-radius:10px; border:1px solid var(--border); background:var(--card); color:var(--text); cursor:pointer; box-shadow:0 2px 6px rgba(15,23,42,0.05); text-align:left}
.option-btn:hover{border-color:var(--accent)}
.option-btn.active{border-color:var(--accent); background:rgba(37,99,235,0.08)}
.option-letter{font-weight:700; color:var(--accent)}
.option-text{flex:1; white-space:pre-wrap}
.short-actions{display:flex; gap:10px; flex-wrap:wrap; margin-bottom:12px}
.subject-buttons{display:flex; flex-wrap:wrap; justify-content:center; gap:14px; margin-top:4px}
.answer-form label{display:block; margin-bottom:6px; font-weight:600}
.answer-form input{width:100%; padding:10px 12px; border-radius:8px; border:1px solid var(--border); background:transparent; color:var(--text); font-size:1rem}
.actions{margin-top:12px; display:flex; gap:10px; flex-wrap:wrap}
.btn{display:inline-block; padding:10px 16px; border-radius:10px; border:1px solid transparent; background:var(--accent); color:white; cursor:pointer; font-weight:600; box-shadow:0 4px 14px rgba(37,99,235,0.25)}
.btn:hover{background:var(--accent-2)}
.btn.small{padding:7px 12px; font-size:0.95rem}
.btn.large{padding:14px 22px; font-size:1.05rem; border-radius:12px}
.btn.ghost{background:transparent; color:var(--text); border:1px solid var(--border); box-shadow:none}
.btn.ghost:hover{border-color:var(--accent); color:var(--accent)}
.result{margin-top:12px; padding:10px 12px; border-radius:10px; background:rgba(99,102,241,0.05); border:1px dashed var(--border)}
.result.success{background:rgba(16,185,129,0.08); border-color:rgba(16,185,129,0.4); color:#065f46}
.result.error{background:rgba(239,68,68,0.08); border-color:rgba(239,68,68,0.4); color:#991b1b}
.panel{margin-top:16px; padding:12px; border-radius:10px; border:1px solid var(--border); background:rgba(99,102,241,0.04)}
.panel-title{font-weight:700; margin-bottom:6px}
#logicContent{white-space:pre-wrap}
#tipsList{margin:0; padding-left:18px}
.jump-group{margin-top:10px; display:flex; gap:8px; align-items:center; flex-wrap:wrap}
.jump-group input{width:120px; padding:8px 10px; border-radius:8px; border:1px solid var(--border); background:transparent; color:var(--text); font-size:0.95rem}
.wrong-list{list-style:none; padding:0; margin:0}
.wrong-list li{border-top:1px dashed var(--border); padding:8px 0}
.wrong-list li:first-child{border-top:none}
.wrong-title{font-weight:700; margin-bottom:4px}
.wrong-text{white-space:pre-wrap; margin-bottom:2px}
.muted{color:var(--muted)}
.site-footer{border-top:1px solid var(--border); padding:16px 0; margin-top:24px; text-align:center; color:var(--muted)}
@media (max-width:640px){
  .container{padding:18px}
  .card{padding:16px}
  .head-flex{flex-direction:column; align-items:flex-start; gap:10px}
}
