/* Wspólne style dla Tech Radar (Aktualności), Ciekawostek oraz Quizu Nowości */

html { scroll-behavior: smooth; }
#materialy, .news-article, .lang-news-group { scroll-margin-top: 90px; }

/* Górny panel wyboru języków i wersji live */
.radar-versions-panel {
  background: linear-gradient(135deg, rgba(20, 24, 34, 0.95), rgba(12, 16, 24, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 20px;
  padding: clamp(1.2rem, 2.5vw, 1.8rem);
  margin-bottom: 2rem;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.35);
  position: relative;
}
.radar-versions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.85rem;
}
.radar-versions-header h2 {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: #f8fafc;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.radar-versions-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.65rem;
  margin: 0;
  padding: 0;
}
/* Tryb skupienia na wybranym języku */
.radar-versions-nav.is-focused {
  display: flex !important;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.radar-versions-nav.is-focused .radar-lang-tile.is-active {
  min-width: 180px;
  max-width: 260px;
}
.radar-back-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.4rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(78, 201, 176, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}
.radar-back-all-btn:hover {
  background: linear-gradient(135deg, #38bdf8, #4ec9b0);
  color: #04121d;
  border-color: #4ec9b0;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
}

/* Automatycznie zwinięty sidebar na wszystkich ekranach z przyciskiem wysuwania (wspólny kontrakt z app.css) */
body.page-radar-drawer .header-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  cursor: pointer;
  margin-right: 0.65rem;
  transition: all 0.2s ease;
}

body.page-radar-drawer .header-menu-toggle:hover {
  background: #38bdf8;
  color: #031525;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

/* Pływający uchwyt/ikona przy lewej krawędzi ekranu do szybkiego wysunięcia menu */
.sidebar-edge-trigger {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 95;
  background: linear-gradient(135deg, rgba(20, 28, 44, 0.96), rgba(12, 18, 30, 0.96));
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-left: none;
  border-radius: 0 12px 12px 0;
  padding: 0.75rem 0.55rem;
  color: #38bdf8;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.45);
  transition: all 0.2s ease;
  font-family: Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 700;
}

.sidebar-edge-trigger:hover {
  padding-left: 0.85rem;
  background: #38bdf8;
  color: #031525;
}

body.page-radar-drawer.menu-open .sidebar-edge-trigger {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 720px) {
  .sidebar-edge-trigger {
    display: none !important;
  }
}

/* Przyciemnienie tła (overlay) po wysunięciu menu */
body.page-radar-drawer .overlay {
  position: fixed;
  inset: 0;
  z-index: 105;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  display: block !important;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

body.page-radar-drawer.menu-open .overlay {
  visibility: visible !important;
  opacity: 1 !important;
}

.radar-lang-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  padding: 0.75rem 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.22s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.radar-lang-tile:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.45);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.radar-lang-tile.is-active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(78, 201, 176, 0.25));
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35), inset 0 0 0 1px rgba(56, 189, 248, 0.3);
}
.radar-lang-icon {
  font-size: 1.35rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
.radar-lang-tile:hover .radar-lang-icon,
.radar-lang-tile.is-active .radar-lang-icon {
  transform: scale(1.15);
}
.radar-lang-name {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
}
.ver-pill {
  font-size: 0.7rem;
  font-weight: 700;
  font-family: Consolas, monospace;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.radar-lang-tile.is-active .ver-pill {
  background: #38bdf8;
  color: #031525;
  font-weight: 800;
  border-color: #38bdf8;
}
.radar-tile-count {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.68rem;
  font-family: Consolas, monospace;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
}
.radar-lang-tile.is-active .radar-tile-count {
  color: #38bdf8;
  background: rgba(0, 0, 0, 0.3);
}

/* Pasek wyszukiwania i filtrów */
.radar-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.radar-search-wrapper {
  min-width: 280px;
  flex: 1;
  max-width: 480px;
  position: relative;
}
.radar-search-input {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.9rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  background: #11141b;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  font-family: inherit;
  transition: all 0.2s ease;
}
.radar-search-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

/* Dedykowany Kokpit Wybranego Języka (Language Hub) */
.language-hub-cockpit {
  background: radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.16), transparent 60%),
              linear-gradient(135deg, rgba(18, 25, 38, 0.98), rgba(11, 15, 24, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 20px;
  padding: clamp(1.1rem, 2.2vw, 1.6rem);
  margin: 0.75rem 0 1.25rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  animation: bannerSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hub-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hub-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  padding: 0.48rem 1rem;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.hub-back-btn:hover {
  background: #38bdf8;
  color: #04121d;
  transform: translateX(-2px);
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.4);
}

.hub-care-badge {
  font-size: 0.76rem;
  font-family: Consolas, monospace;
  color: #4ec9b0;
  background: rgba(78, 201, 176, 0.1);
  border: 1px solid rgba(78, 201, 176, 0.25);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.hub-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.hub-quick-nav {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hub-quick-nav-label {
  font-size: 0.75rem;
  font-family: Consolas, monospace;
  color: #94a3b8;
  text-transform: uppercase;
  margin-right: 0.25rem;
}

.hub-topic-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.78rem;
  text-decoration: none;
  transition: all 0.18s ease;
}

.hub-topic-pill:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #fff;
  transform: translateY(-1px);
}

/* Baner aktywnego języka */
.active-category-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  background: linear-gradient(135deg, rgba(20, 30, 48, 0.95), rgba(12, 18, 30, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 16px;
  padding: 1.25rem 1.6rem;
  margin-bottom: 2rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
  animation: bannerSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes bannerSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.active-category-info {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}
.active-category-icon {
  font-size: 2.2rem;
  line-height: 1;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.active-category-title {
  margin: 0 0 0.35rem;
  font-size: 1.3rem;
  color: #f8fafc;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.active-category-desc {
  margin: 0;
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.5;
}
.active-category-desc strong { color: #38bdf8; }
.active-category-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.banner-doc-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}
.banner-doc-btn:hover {
  background: #38bdf8;
  color: #031525;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.35);
}
.reset-filter-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f1f5f9;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.reset-filter-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #fff;
}

/* Grupowanie artykułów per język w widoku cat=all */
.lang-news-group {
  margin-bottom: 3.5rem;
  position: relative;
}
.lang-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(90deg, rgba(25, 32, 46, 0.85), rgba(16, 22, 32, 0.6));
  border-left: 4px solid #38bdf8;
  border-radius: 0 12px 12px 0;
  margin-bottom: 1.5rem;
}
.lang-group-title {
  font-size: 1.22rem;
  font-weight: 800;
  color: #f1f5f9;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.lang-group-filter-link {
  color: #38bdf8;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  transition: all 0.2s ease;
}
.lang-group-filter-link:hover {
  background: #38bdf8;
  color: #031525;
  border-color: #38bdf8;
}

/* Karta pigułki newsa */
.news-article {
  background: var(--cf-surface-panel, rgba(14, 24, 42, .88));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--cf-border-subtle, rgba(255, 255, 255, .1));
  border-radius: 18px;
  padding: clamp(1.4rem, 3vw, 2.25rem);
  margin-bottom: 2.25rem;
  box-shadow: 0 16px 40px rgba(0,0,0,.42);
  position: relative;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.news-article:hover { border-color: #38bdf8; }
.news-meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding-bottom: .85rem;
}
.news-tags {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
}
.tag-category {
  background: #61afef;
  color: #0b1a2d;
  font-weight: 700;
  font-size: .75rem;
  padding: .25rem .6rem;
  border-radius: 6px;
  text-transform: uppercase;
  font-family: Consolas, monospace;
  letter-spacing: 0.04em;
}
.tag-cat-php { background: #4f5b93; color: #fff; }
.tag-cat-css { background: #1d4ed8; color: #fff; }
.tag-cat-html { background: #ea580c; color: #fff; }
.tag-cat-sql { background: #0284c7; color: #fff; }
.tag-cat-javascript { background: #facc15; color: #0b1726; font-weight: 800; }
.tag-cat-python { background: #0284c7; color: #fff; }
.tag-cat-java { background: #ea580c; color: #fff; }
.tag-cat-c { background: #475569; color: #fff; }
.tag-cat-cplusplus { background: #0284c7; color: #fff; }
.tag-cat-csharp { background: #7c3aed; color: #fff; }
.tag-cat-rust { background: #b91c1c; color: #fff; }
.tag-cat-go { background: #00add8; color: #0b1726; font-weight: 800; }
.tag-cat-ruby { background: #cc342d; color: #fff; }
.tag-cat-security { background: #059669; color: #fff; }
.tag-cat-ai { background: #9333ea; color: #fff; }
.tag-version {
  background: #1e293b;
  color: #f1f5f9;
  font-size: .75rem;
  font-weight: 600;
  padding: .25rem .6rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-family: Consolas, monospace;
}
.tag-release-date {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  font-size: .75rem;
  font-weight: 600;
  padding: .25rem .65rem;
  border-radius: 6px;
  font-family: Consolas, monospace;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.tag-time { color: #94a3b8; font-size: .8rem; }
.news-title {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  color: #fff;
  margin: 0 0 1rem;
  line-height: 1.3;
  font-weight: 800;
}
.news-summary-box {
  background: rgba(56, 189, 248, .08);
  border-left: 4px solid #38bdf8;
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #d1d9e6;
}
.news-problem {
  color: #cbd5e1;
  font-size: .94rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

/* Zestawienie kodu Dawniej vs Teraz */
.code-comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.code-box {
  background: #0d1117;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.code-box-header {
  padding: .6rem 1rem;
  font-size: .8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-family: Consolas, monospace;
}
.code-box.is-old { border: 1px solid rgba(224, 108, 117, .35); }
.code-box.is-old .code-box-header { background: rgba(224, 108, 117, .12); color: #e06c75; }
.code-box.is-new { border: 1px solid rgba(78, 201, 176, .4); }
.code-box.is-new .code-box-header { background: rgba(78, 201, 176, .12); color: #4ec9b0; }
.code-content {
  padding: 1rem;
  margin: 0;
  color: #e6edf3;
  font-family: Consolas, 'Fira Code', Monaco, monospace;
  font-size: .88rem;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
  background: #0d1117 !important;
}
.code-lang-pill {
  font-size: 0.68rem;
  font-family: Consolas, monospace;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
}

.news-footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.06);
}
.news-why {
  color: #98c379;
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1;
  min-width: 260px;
}
.news-actions {
  display: flex;
  gap: .75rem;
  align-items: center;
}
.news-copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.news-copy-btn:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }

/* Organ źródłowy */
.news-authority-badge {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(78, 201, 176, 0.25);
  border-radius: 10px;
  padding: 0.65rem 1rem;
  margin-bottom: 1.25rem;
}
.authority-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.84rem;
}
.authority-pill {
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.authority-pill strong { color: #38bdf8; }
.authority-status {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.authority-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #38bdf8;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  transition: all 0.2s ease;
}
.authority-link:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #fff;
  border-color: #38bdf8;
}

@media (max-width: 640px) {
  .radar-versions-nav { grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 0.45rem; }
  .code-comparison-grid { grid-template-columns: 1fr !important; }
  .active-category-banner { flex-direction: column !important; align-items: flex-start !important; }
}

/* Ciekawostki o językach */
/* Górny panel wyboru języka ciekawostek */
.curiosities-nav-panel {
  background: linear-gradient(135deg, rgba(20, 24, 34, 0.95), rgba(12, 16, 24, 0.98));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 20px;
  padding: clamp(1.2rem, 2.5vw, 1.8rem);
  margin-bottom: 2rem;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.35);
}

.curiosities-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.85rem;
}

.curiosities-nav-header h2 {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: #f8fafc;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.curiosity-lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.65rem;
  margin: 0;
  padding: 0;
}

/* Tryb skupienia na wybranym języku */
.curiosity-lang-grid.is-focused {
  display: flex !important;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.curiosity-lang-grid.is-focused .curiosity-lang-tile.is-active {
  min-width: 180px;
  max-width: 260px;
}

.curiosity-back-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.4rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(217, 119, 6, 0.2));
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.curiosity-back-all-btn:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1c1917;
  border-color: #f59e0b;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
  transform: translateY(-2px);
}

.curiosity-lang-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  padding: 0.75rem 0.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.22s ease;
  cursor: pointer;
  position: relative;
}

.curiosity-lang-tile:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.curiosity-lang-tile.is-active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.25));
  border-color: #f59e0b;
  color: #fff;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35), inset 0 0 0 1px rgba(245, 158, 11, 0.3);
}

.curiosity-lang-icon {
  font-size: 1.35rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.curiosity-lang-tile:hover .curiosity-lang-icon,
.curiosity-lang-tile.is-active .curiosity-lang-icon {
  transform: scale(1.15);
}

.curiosity-lang-name {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
}

.fact-count-pill {
  font-size: 0.7rem;
  font-weight: 700;
  font-family: Consolas, monospace;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  white-space: nowrap;
}

.curiosity-lang-tile.is-active .fact-count-pill {
  background: #f59e0b;
  color: #1c1917;
  font-weight: 800;
}

/* Pasek narzędzi wyszukiwania */
.facts-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.facts-search-wrapper {
  min-width: 280px;
  flex: 1;
  max-width: 480px;
}

.facts-search-input {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.9rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  background: #11141b;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  font-family: inherit;
  transition: all 0.2s ease;
}

.facts-search-input:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

/* Baner aktywnego języka */
.active-fact-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  background: linear-gradient(135deg, rgba(35, 26, 15, 0.95), rgba(20, 16, 12, 0.95));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 16px;
  padding: 1.25rem 1.6rem;
  margin-bottom: 2rem;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
  animation: bannerSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.active-fact-info {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.active-fact-icon {
  font-size: 2.2rem;
  line-height: 1;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.active-fact-title {
  margin: 0 0 0.35rem;
  font-size: 1.3rem;
  color: #f8fafc;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.active-fact-desc {
  margin: 0;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.active-fact-desc strong { color: #f59e0b; }

/* Siatka kart ciekawostek */
.curiosity-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.curiosity-card {
  background: linear-gradient(135deg, rgba(30, 33, 40, .98), rgba(24, 26, 32, .98));
  border: 1px solid #3e4451;
  border-radius: 16px;
  padding: clamp(1.4rem, 2.5vw, 1.85rem);
  box-shadow: 0 15px 40px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all .25s ease;
  position: relative;
}

.curiosity-card:hover {
  border-color: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

.curiosity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.75rem;
}

.curiosity-tags {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
}

.fact-tag {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  font-family: Consolas, monospace;
  letter-spacing: 0.03em;
}

.curiosity-title {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 800;
  color: #f8fafc;
  margin: 0 0 1rem;
  line-height: 1.35;
}

.curiosity-content {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0 0 1.25rem;
}

.curiosity-snippet-box {
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.curiosity-snippet-header {
  padding: 0.45rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-family: Consolas, monospace;
  color: #94a3b8;
}

.curiosity-snippet-content {
  padding: 0.85rem 1rem;
  margin: 0;
  font-family: Consolas, monospace;
  font-size: 0.84rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre;
  background: #0d1117 !important;
  color: #e6edf3;
}

.curiosity-footer {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.82rem;
  color: #94a3b8;
}

.curiosity-source {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.curiosity-verified {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #34d399;
  font-weight: 700;
}

@media (max-width: 640px) {
  .curiosity-lang-grid { grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 0.45rem; }
  .curiosity-cards-grid { grid-template-columns: 1fr; }
}

/* Motyw bursztynowy dla strony Ciekawostki */
body.page-curiosities .header-menu-toggle {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}
body.page-curiosities .header-menu-toggle:hover {
  background: #f59e0b;
  color: #1c1917;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}
body.page-curiosities .sidebar-edge-trigger {
  background: linear-gradient(135deg, rgba(28, 24, 20, 0.96), rgba(16, 14, 12, 0.96));
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}
body.page-curiosities .sidebar-edge-trigger:hover {
  background: #f59e0b;
  color: #1c1917;
}
body.page-curiosities .hub-back-btn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}
body.page-curiosities .hub-back-btn:hover {
  background: #f59e0b;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}
body.page-curiosities .hub-care-badge {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.25);
}
body.page-curiosities .hub-topic-pill:hover {
  background: rgba(245, 158, 11, 0.18);
  border-color: #f59e0b;
}

/* Quiz: Wykryj Nowoczesny Standard vs Antywzorzec */
.quiz-container {
  max-width: 900px;
  margin: 1.5rem auto 3rem;
}
.quiz-progress-bar-wrap {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #34d399);
  width: 10%;
  transition: width 0.3s ease;
}
.quiz-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: #94a3b8;
}
.quiz-streak-pill {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.quiz-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}
@media (min-width: 768px) {
  .quiz-cards-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.quiz-choice-card {
  background: #0d1117;
  border: 2px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}
.quiz-choice-card:hover:not(.locked) {
  border-color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.15);
}
.quiz-choice-card:focus-visible {
  outline: 3px solid rgba(56, 189, 248, 0.75);
  outline-offset: 3px;
  border-color: #38bdf8;
}
.quiz-choice-header {
  padding: 0.65rem 1rem;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #cbd5e1;
}
.quiz-code-pre {
  margin: 0;
  padding: 1rem;
  font-family: Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #f1f5f9;
  white-space: pre;
  overflow-x: auto;
  flex: 1;
  background: #090d16;
}
.quiz-choice-card.is-correct {
  border-color: #10b981 !important;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.3);
}
.quiz-choice-card.is-correct .quiz-choice-header {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}
.quiz-choice-card.is-wrong {
  border-color: #ef4444 !important;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.25);
  animation: shake 0.35s ease;
}
.quiz-choice-card.is-wrong .quiz-choice-header {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
.quiz-feedback-box {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  display: none;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.quiz-feedback-box.show {
  display: block;
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.quiz-summary-card {
  text-align: center;
  padding: 3rem 1.5rem;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 16px;
  display: none;
}
