:root {
  --navy: #0f2540;
  --navy-dark: #0a1a2e;
  --accent: #ff8a3d;
  --accent-dark: #e56f22;
  --bg: #f4f6f9;
  --card-bg: #ffffff;
  --text: #1c2b3a;
  --muted: #5c6b7a;
  --border: #dfe4ea;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff;
  padding: 28px 0;
}

.header-inner { display: flex; align-items: center; }

.brand { display: flex; align-items: center; gap: 14px; }

.brand-icon {
  font-size: 34px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.site-header h1 { margin: 0; font-size: 1.5rem; }
.tagline { margin: 4px 0 0; font-size: 0.9rem; color: #b9c6d6; }

main { padding: 28px 0 60px; }

.filters {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
}

#search {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

select {
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 0.9rem;
  color: var(--text);
  flex: 1 1 160px;
}

#clear-filters {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #eef1f5;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--muted);
}

#clear-filters:hover { background: #e3e7ec; }

.result-count {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 14px 4px;
}

.question-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.question-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.q-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 9px;
  border-radius: 20px;
  background: #eef2f7;
  color: var(--navy);
}

.tag.exam { background: #fff1e6; color: var(--accent-dark); }
.tag.difficulty { background: #eaf5ec; color: #2c7a3f; }

.q-statement {
  margin: 0 0 12px;
  font-size: 0.98rem;
}

.q-source {
  font-size: 0.78rem;
  color: var(--muted);
  margin: -6px 0 12px;
}

.q-options {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.q-options li {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 0.92rem;
}

.q-options li.correct-reveal {
  border-color: #2c7a3f;
  background: #eaf5ec;
  font-weight: 600;
}

.reveal-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.88rem;
}

.reveal-btn:hover { background: var(--accent-dark); }

.explanation {
  margin-top: 12px;
  padding: 12px 14px;
  background: #f4f7fa;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--text);
}

.explanation[hidden] { display: none; }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
}

.site-footer {
  background: var(--navy-dark);
  color: #9fb0c2;
  padding: 18px 0;
  font-size: 0.82rem;
  text-align: center;
}

@media (max-width: 600px) {
  .header-inner { flex-direction: row; }
  .site-header h1 { font-size: 1.2rem; }
  .filter-row { flex-direction: column; }
}
