:root {
    --bg: #0d1117;
    --card: #161b22;
    --border: #30363d;
    --text: #e6edf3;
    --muted: #8b949e;
    --accent: #58a6ff;
    --green: #3fb950;
    --red: #f85149;
    --gold: #d29922;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}
.container {
    max-width: 720px;
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.badge {
    background: rgba(210, 153, 34, 0.15);
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}
h1 { font-size: 1.4rem; color: var(--accent); }
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 20px;
}
.progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 0.3s ease;
}
.question-meta {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.question-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
}
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.option-btn {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 14px 18px;
    border-radius: 8px;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}
.option-btn:hover:not(:disabled) {
    border-color: var(--accent);
    background: #1c2128;
}
.option-btn.correct {
    background: rgba(63, 185, 80, 0.2);
    border-color: var(--green);
    color: #aff5b4;
    font-weight: bold;
}
.option-btn.wrong {
    background: rgba(248, 81, 73, 0.2);
    border-color: var(--red);
    color: #ffdcd7;
}
.feedback {
    margin-top: 18px;
    padding: 14px;
    border-radius: 8px;
    background: rgba(88, 166, 255, 0.1);
    border-left: 4px solid var(--accent);
    display: none;
    font-size: 0.95rem;
}
.controls {
    margin-top: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.btn {
    background: var(--accent);
    color: #0d1117;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.btn:hover { opacity: 0.9; }
.btn-secondary {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
}
.result-box { text-align: center; display: none; }
.score-big {
    font-size: 3rem;
    font-weight: bold;
    color: var(--green);
    margin: 15px 0;
}

/* =========================================================
   CENTRUM TRENINGOWE QUIZÓW (HUB) + KAFELKI POWITALNE (DRY)
   ========================================================= */

.hub-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.hub-hero,
.welcome-banner {
  background: #161b22;
  border: 1px solid #30363d;
  border-left: 4px solid #56D364;
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: 1.3rem;
  flex-wrap: wrap;
}

.hub-hero img {
  width: 185px;
  height: 185px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid #56D364;
}

.welcome-banner img {
  width: 165px;
  height: 165px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #56D364;
}

.welcome-content {
  flex: 1;
  min-width: 240px;
}

.kpi-pill {
  display: inline-block;
  margin-top: 0.65rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(86, 211, 100, 0.14);
  border: 1px solid #56D364;
  color: #56D364;
  font-size: 0.84rem;
  font-weight: bold;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.subject-card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.subject-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: bold;
  color: #58a6ff;
  background: rgba(88, 166, 255, 0.12);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.6rem;
}

.subject-card h3 {
  margin: 0 0 0.5rem 0;
  color: #e6edf3;
  font-size: 1.15rem;
}

.subject-card p {
  color: #8b949e;
  font-size: 0.92rem;
  line-height: 1.45;
  margin-bottom: 1rem;
}

.subject-btn {
  display: block;
  text-align: center;
  text-decoration: none;
}

/* Pasek wyboru modułów / zakresów pytań (Geografia, Polski, Historia) */
.module-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
  background: #161b22;
  padding: 0.85rem;
  border-radius: 10px;
  border: 1px solid #30363d;
}

.mod-btn {
  background: #21262d;
  color: #c9d1d9;
  border: 1px solid #30363d;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: bold;
  transition: all 0.15s ease;
}

.mod-btn:hover {
  border-color: #56D364;
  color: #ffffff;
}

.mod-btn.active {
  background: #238636;
  color: #ffffff;
  border-color: #56D364;
}


/* =========================================================
   PRZYCISKI W STYLU STRONY GŁÓWNEJ BARTKA (.button-quiz / .button-pdf)
   ========================================================= */

.button-quiz {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(135deg, #2ea043 0%, #238636 100%);
  color: #ffffff !important;
  font-size: 1.05rem;
  font-weight: bold;
  padding: 14px 20px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid #56D364;
  box-shadow: 0 4px 12px rgba(46, 160, 67, 0.35);
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button-quiz:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(86, 211, 100, 0.45);
}

.button-pdf {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background-color: #21262d;
  color: #56D364 !important;
  font-size: 1.05rem;
  font-weight: bold;
  padding: 13px 20px;
  border-radius: 8px;
  text-decoration: none;
  border: 2px solid #56D364;
  text-align: center;
  transition: background-color 0.15s ease;
}

.button-pdf:hover {
  background-color: rgba(86, 211, 100, 0.15);
}

