:root {
  --bg: #0f172a;
  --card: #1e293b;
  --border: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --green: #10b981;
  --red: #ef4444;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 24px 16px;
  line-height: 1.6;
}

.container { max-width: 900px; margin: 0 auto; }
.quiz-container-narrow { max-width: 760px; margin: 0 auto; }

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.back-link { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.back-link:hover { text-decoration: underline; }

/* Hub / Ekran główny */
.hero {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 28px;
}

.hero h1 { margin: 0 0 10px 0; font-size: 1.7rem; color: var(--accent); }
.hero p { margin: 0 0 12px 0; color: #cbd5e1; font-size: 0.98rem; }

.kpi-pill {
  display: inline-block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--green);
  color: #6ee7b7;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; }

.quiz-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.quiz-card.locked { opacity: 0.6; }

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.quiz-card h3 { margin: 0 0 8px 0; font-size: 1.15rem; }
.quiz-card p { margin: 0 0 16px 0; color: var(--muted); font-size: 0.9rem; }

.btn {
  display: inline-block;
  text-align: center;
  background: var(--green);
  color: #064e3b;
  font-weight: 700;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 8px;
  transition: transform 0.15s ease;
}

.btn:hover { transform: translateY(-1px); background: #34d399; }

.btn-disabled {
  display: inline-block;
  text-align: center;
  background: #334155;
  color: #94a3b8;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: not-allowed;
}

/* Widok pojedynczego quizu */
.quiz-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.progress { font-size: 0.85rem; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.question-text { font-size: 1.2rem; font-weight: 600; margin-bottom: 20px; }
.options { display: flex; flex-direction: column; gap: 10px; }

.option-btn {
  background: #0f172a;
  border: 1px solid var(--border);
  color: var(--text);
  text-align: left;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 0.98rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.option-btn:hover:not(:disabled) { border-color: var(--accent); background: #172554; }
.option-btn.correct { border-color: var(--green); background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.option-btn.wrong { border-color: var(--red); background: rgba(239, 68, 68, 0.2); color: #fca5a5; }

.feedback {
  margin-top: 18px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.1);
  border-left: 4px solid var(--accent);
  display: none;
  font-size: 0.95rem;
}

.next-btn {
  margin-top: 18px;
  background: var(--accent);
  color: #0f172a;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  display: none;
}

.result-box { text-align: center; display: none; }
.result-score { font-size: 2.2rem; font-weight: 800; color: var(--green); margin: 12px 0; }
