/* ======== ZAKŁADKI (TABS) ======== */
.tab-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: #161b22;
  border-bottom: 2px solid #30363d;
  position: sticky;
  top: 0;
  z-index: 100;
}

.tab-btn {
  padding: 12px 33px;
  background: #21262d;
  color: #8b949e;
  border: 1px solid #30363d;
  border-radius: 9px;
  font-size: 1.38em;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.tab-btn:hover {
  background: #2d333b;
  color: #c9d1d9;
  border-color: #484f58;
}

.tab-btn.active {
  background: #0d419d;
  color: #ffffff;
  border-color: #1f6feb;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

hr.section-divider {
  border: none;
  border-top: 2px solid #30363d;
  margin: 40px 20px 0;
}

/* ======== BUY ME A COFFEE ======== */
.bmac-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 12px 25px;
  background: linear-gradient(135deg, #4a3f00 0%, #0d1117 100%);
  border: 2px solid #ffdd00;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(255, 221, 0, 0.3);
  margin: 20px auto;
  max-width: 650px;
}

.bmac-container > span {
  color: #ffdd00;
  font-size: 1em;
  font-weight: bold;
  text-align: center;
}

.bmac-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #ffdd00 0%, #e6c700 100%);
  color: #000000 !important;
  text-decoration: none !important;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1em;
  box-shadow: 0 4px 15px rgba(255, 221, 0, 0.4);
  border: 1px solid #ffed4a;
  transition: all 0.2s ease;
}

.bmac-button:visited {
  color: #000000 !important;
}

.bmac-button:hover {
  background: linear-gradient(135deg, #ffed4a 0%, #ffdd00 100%);
  box-shadow: 0 6px 20px rgba(255, 221, 0, 0.5);
  transform: translateY(-2px);
}

.bmac-button:active {
  transform: translateY(0);
}

.bmac-top {
  margin-top: 10px;
}

.bmac-bottom {
  margin-top: 40px;
  margin-bottom: 20px;
}

/* ======== PANEL USTAWIEŃ ======== */
.settings-panel {
  max-width: 800px;
  margin: 30px auto 40px auto;
  padding: 20px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-bottom: 25px;
}

.settings-row:last-of-type {
  margin-bottom: 15px;
}

/* ======== GÓRNE KONTROLKI (JĘZYK + WALUTA) ======== */
#top-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px 0 20px;
  gap: 20px;
}

#language-switcher {
  display: flex;
  gap: 5px;
}

#currency-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

#currency-switcher label {
  color: #c9d1d9;
}

#currency-select {
  padding: 8px 12px;
  border: 1px solid #30363d;
  border-radius: 6px;
  background: #21262d;
  color: #c9d1d9;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

#currency-select:hover {
  background: #30363d;
  border-color: #58a6ff;
}

#currency-select:focus {
  outline: none;
  border-color: #58a6ff;
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.3);
}

#vat-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

#vat-switcher label {
  color: #c9d1d9;
}

#vat-select {
  padding: 8px 12px;
  border: 1px solid #30363d;
  border-radius: 6px;
  background: #21262d;
  color: #c9d1d9;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

#vat-select:hover {
  background: #30363d;
  border-color: #58a6ff;
}

#vat-select:focus {
  outline: none;
  border-color: #58a6ff;
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.3);
}

#refresh-rates-btn {
  padding: 8px 12px;
  border: 1px solid #30363d;
  border-radius: 6px;
  background: #21262d;
  color: #c9d1d9;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

#refresh-rates-btn:hover {
  background: #30363d;
  border-color: #58a6ff;
}

#refresh-rates-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#rates-status {
  min-width: 120px;
  text-align: center;
}

.lang-btn {
  padding: 8px 12px;
  border: 1px solid #30363d;
  border-radius: 6px;
  background: #21262d;
  color: #c9d1d9;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  background: #30363d;
  border-color: #58a6ff;
}

.lang-btn.active {
  background: #238636;
  border-color: #238636;
  color: white;
}

/* ======== LOGO STRONY ======== */
.site-logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.site-logo-text {
  display: flex;
  flex-direction: column;
}

.site-logo a {
  font-size: 1.8em;
  font-weight: 900;
  color: #e6b800;
  text-decoration: none;
  letter-spacing: 2px;
  line-height: 1;
}

.site-logo a:hover {
  color: #ffd000;
}

.site-logo-img-link {
  display: flex;
  align-items: center;
  font-size: 0 !important; /* usuwa odstęp inline */
}

.site-logo-img {
  width: 66px;
  height: 66px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.site-logo-img-link:hover .site-logo-img {
  transform: scale(1.12);
}

.site-last-updated {
  font-size: 0.75em;
  color: #8b949e;
  margin-top: 2px;
}

/* ======== OGÓLNE ======== */
body {
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  background-color: #0d1117;
  color: #e6edf3;
  margin: 10px 40px 40px 40px;
}

h1, h2 {
  text-align: center;
  color: #58a6ff;
}

h1 {
  font-size: 3em;
  margin-bottom: 10px;
}

p {
  line-height: 1.6;
  color: #c9d1d9;
  text-align: justify;
}

/* ======== TABELA ======== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 25px;
  font-size: 0.96em;
}

#pricing-table {
  font-size: 1.0em;
  background-color: #161b22;
}

#pricing-table tbody td {
  background-color: #0d1117;
}

#pricing-table tbody tr:nth-child(even) td {
  background-color: #1c2128;
}

#pricing-table tbody tr:hover td {
  background-color: #21262d;
}

th, td {
  border: 1px solid #30363d;
  padding: 10px;
  text-align: center;
}

th {
  background: linear-gradient(180deg, #1f2937 0%, #111827 100%) !important;
  color: #58a6ff !important;
  font-weight: bold;
  font-size: 1.1em !important;
  text-transform: uppercase;
  padding: 14px 10px !important;
  border-bottom: 2px solid #58a6ff !important;
}

tr:nth-child(even) {
  background-color: #1c2128;
}

tr:nth-child(odd) {
  background-color: #0d1117;
}

tr:hover {
  background-color: #21262d;
}

/* ======== KOLORY OPŁACALNOŚCI ======== */
.good,
#pricing-table td.good,
#pricing-table tr.good td {
  color: #3fb950 !important;
  font-weight: bold;
}

.neutral,
#pricing-table td.neutral,
#pricing-table tr.neutral td {
  color: #e3b341 !important;
  font-weight: bold;
}

.bad,
#pricing-table td.bad,
#pricing-table tr.bad td {
  color: #f85149 !important;
  font-weight: bold;
}

/* ======== WSTĘPNE NAGŁÓWKI / SEKCJE ======== */
.section td {
  background: linear-gradient(90deg, #2d1a4e 0%, #4c2889 50%, #2d1a4e 100%) !important;
  color: #e0c3ff !important;
  font-weight: bold;
  text-align: left;
  font-size: 1.8em;
  border-left: 4px solid #a78bfa;
  padding: 18px 10px !important;
}

/* ======== OBRAZKI SAMOLOTÓW ======== */
td img {
  height: 40px;
  vertical-align: middle;
  margin-right: 8px;
  image-rendering: auto;
  transition: transform 0.2s ease;
}

td img:hover {
  transform: scale(1.2);
}

/* Rozmiary ikon w tabelce */
img.icon-xs {
  height: 18px !important;
  width: auto !important;
}

img.icon-sm {
  height: 22px !important;
  width: auto !important;
}

img.icon-md {
  height: 40px !important;
  width: auto !important;
}

/* ======== STOPKA ======== */
footer {
  text-align: center;
  margin-top: 30px;
  color: #8b949e;
  font-size: 0.9em;
}

footer a,
#description a {
  color: #58a6ff !important;
  text-decoration: none;
}

footer a:visited,
#description a:visited {
  color: #58a6ff !important;
}

footer a:hover,
#description a:hover {
  text-decoration: underline;
  color: #79c0ff !important;
}

/* ======== PRZYCISK KONTAKTOWY W STOPCE ======== */
.contact-open-btn {
  background: transparent;
  border: 1px solid #30363d;
  border-radius: 5px;
  color: #58a6ff;
  font-size: 0.9em;
  padding: 3px 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  margin-left: 4px;
  vertical-align: middle;
}
.contact-open-btn:hover {
  background: #21262d;
  border-color: #58a6ff;
}

/* ======== FORMULARZ KONTAKTOWY (modal) ======== */
#contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-form-group label {
  font-size: 0.85em;
  color: #8b949e;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contact-form-group input,
.contact-form-group textarea {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #e6edf3;
  font-size: 0.95em;
  padding: 8px 12px;
  font-family: inherit;
  transition: border-color 0.15s;
  resize: vertical;
}

.contact-form-group input:focus,
.contact-form-group textarea:focus {
  outline: none;
  border-color: #58a6ff;
}

.contact-submit-btn {
  align-self: flex-start;
  background: #238636;
  border: 1px solid #2ea043;
  border-radius: 6px;
  color: #fff;
  font-size: 0.95em;
  font-weight: 600;
  padding: 8px 20px;
  cursor: pointer;
  transition: background 0.15s;
}
.contact-submit-btn:hover:not(:disabled) {
  background: #2ea043;
}
.contact-submit-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.contact-status {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: 600;
}
.contact-status.success {
  background: #0d2e1a;
  border: 1px solid #2ea043;
  color: #3fb950;
}
.contact-status.error {
  background: #3c1111;
  border: 1px solid #da3633;
  color: #f85149;
}
.contact-status.validation {
  background: #2e2200;
  border: 1px solid #9e6a03;
  color: #e3b341;
}

/* ======== TABELKA BAZOWYCH WARTOŚCI ======== */
#base-values-table {
  background-color: #161b22;
  border: 2px solid #58a6ff;
}

#base-values-table th {
  background-color: #21262d;
  color: #58a6ff;
}

#base-values-table td {
  background-color: #0d1117;
  color: #e6edf3;
}

#base-values-table tr:hover td {
  background-color: #1c2128;
}

/* ======== KOLUMNA Z NUMEREM ======== */
#pricing-table tbody tr td:first-child {
  font-weight: bold;
  color: #8b949e;
  text-align: center;
  width: 40px;
}

/* ======== SEKCJA G2A ======== */
.g2a-section {
  max-width: 800px;
  margin: 50px auto 40px auto;
  padding: 25px;
  background: linear-gradient(135deg, #1a472a 0%, #0d1117 100%);
  border: 2px solid #238636;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(35, 134, 54, 0.3);
}

.g2a-title {
  color: #3fb950;
  margin-top: 0;
  margin-bottom: 15px;
  text-align: center;
  font-size: 1.4em;
}

.g2a-description {
  color: #c9d1d9;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.6;
}

.g2a-table {
  width: 100%;
  margin: 0 auto 20px auto;
  border-collapse: collapse;
  max-width: 500px;
}

.g2a-table th {
  padding: 10px;
  border: 1px solid #30363d;
  color: #58a6ff;
  background: #21262d;
}

.g2a-table td {
  padding: 10px;
  border: 1px solid #30363d;
  text-align: center;
}

.g2a-table .g2a-bad {
  color: #f85149;
}

.g2a-table .g2a-good {
  color: #3fb950;
  font-weight: bold;
}

.g2a-example {
  color: #8b949e;
  text-align: center;
  margin-bottom: 20px;
  font-size: 0.95em;
}

.g2a-example .highlight {
  color: #3fb950;
  font-weight: bold;
}

.g2a-btn-container {
  text-align: center;
  margin-bottom: 15px;
}

.g2a-warning {
  color: #6e7681;
  text-align: center;
  margin: 0;
  font-size: 0.85em;
}

/* ======== PRZYCISK AFILIACYJNY G2A ======== */
.g2a-btn {
  display: inline-block;
  padding: 14px 28px;
  background: linear-gradient(135deg, #2ea043 0%, #238636 100%);
  color: #ffffff !important;
  text-decoration: none !important;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1em;
  box-shadow: 0 4px 15px rgba(46, 160, 67, 0.4);
  border: 1px solid #3fb950;
  transition: all 0.2s ease;
}

.g2a-btn:visited {
  color: #ffffff !important;
}

.g2a-btn:hover {
  background: linear-gradient(135deg, #3fb950 0%, #2ea043 100%);
  box-shadow: 0 6px 20px rgba(63, 185, 80, 0.5);
  transform: translateY(-2px);
}

.g2a-btn:active {
  transform: translateY(0);
}

/* ======== TABELA VIP ======== */
#vip-table {
  max-width: 700px;
  margin: 25px auto;
  background-color: #161b22;
  border: 2px solid #a78bfa;
}

#vip-table th {
  background: linear-gradient(180deg, #2d1a4e 0%, #1a0f30 100%) !important;
  color: #e0c3ff !important;
  border-bottom: 2px solid #a78bfa !important;
}

#vip-table td {
  background-color: #0d1117;
  color: #e6edf3;
}

#vip-table tr:nth-child(even) td {
  background-color: #1c2128;
}

#vip-table tr:hover td {
  background-color: #21262d;
}

#vip-table td:first-child {
  font-weight: bold;
  color: #a78bfa;
}

/* ======== KLASY POMOCNICZE (zamiast inline styles) ======== */
.label-accent {
  color: #58a6ff;
}

.highlight-green {
  color: #3fb950;
  font-weight: bold;
}

.pln-original {
  color: #8b949e;
  font-size: 0.85em;
}

.vip-disclaimer {
  color: #e3b341;
  font-style: italic;
}

/* ======== TABELE GEAR ======== */
.gear-info-table {
  max-width: 700px;
  margin: 25px auto;
  background-color: #161b22;
  border: 2px solid #58a6ff;
}

.gear-info-table th {
  background: linear-gradient(180deg, #1f2937 0%, #111827 100%) !important;
  color: #58a6ff !important;
  border-bottom: 2px solid #58a6ff !important;
}

.gear-info-table td {
  background-color: #0d1117;
  color: #e6edf3;
}

.gear-info-table tr:nth-child(even) td {
  background-color: #1c2128;
}

.gear-info-table tr:hover td {
  background-color: #21262d;
}

.gear-info-table tfoot td {
  background: #161b22 !important;
  color: #58a6ff;
  text-align: center;
}

.gear-upgrade-table {
  width: 100%;
  margin: 25px auto;
  background-color: #161b22;
  border: 2px solid #58a6ff;
  border-collapse: collapse;
  font-size: 0.92em;
}

.gear-upgrade-table th {
  background: linear-gradient(180deg, #1f2937 0%, #111827 100%) !important;
  color: #58a6ff !important;
  border-bottom: 2px solid #58a6ff !important;
  padding: 10px 8px;
  font-size: 0.95em;
  position: sticky;
  top: 0;
  z-index: 10;
}

.gear-upgrade-table td {
  background-color: #0d1117;
  color: #e6edf3;
  padding: 6px 8px;
  border: 1px solid #30363d;
  text-align: center;
}

.gear-upgrade-table tbody tr:nth-child(even) td {
  background-color: #1c2128;
}

.gear-upgrade-table tbody tr:hover td {
  background-color: #21262d;
}

.gear-upgrade-table td:first-child {
  font-weight: bold;
  color: #8b949e;
  width: 40px;
}

.gear-upgrade-table .gear-gem-step td {
  border-bottom: 2px solid #30363d;
}

/* Zone coloring for merged gear tables */
.gear-upgrade-table tr.gear-silver-zone td {
  background-color: rgba(192, 192, 192, 0.07) !important;
}

.gear-upgrade-table tr.gear-silver-zone:hover td {
  background-color: rgba(192, 192, 192, 0.14) !important;
}

.gear-upgrade-table tr.gear-gold-zone td {
  background-color: rgba(255, 215, 0, 0.07) !important;
}

.gear-upgrade-table tr.gear-gold-zone:hover td {
  background-color: rgba(255, 215, 0, 0.14) !important;
}

.gear-section-row td {
  padding: 12px 10px !important;
}

.gear-merge-row td {
  padding: 10px !important;
}

.gear-tier-heading {
  color: #58a6ff;
  text-align: center;
  margin-top: 50px;
  font-size: 1.5em;
}

.gear-tier-desc {
  color: #8b949e;
  text-align: center;
  font-size: 0.9em;
  margin-bottom: 10px;
}

/* Collapsible gear tables */
.gear-collapsible {
  margin: 10px 0;
  border: 1px solid #30363d;
  border-radius: 6px;
  overflow: hidden;
}

.gear-collapsible[open] {
  border-color: #58a6ff;
}

.gear-collapsible-btn {
  display: block;
  padding: 12px 16px;
  background: #161b22;
  color: #c9d1d9;
  cursor: pointer;
  font-size: 1.05em;
  list-style: none;
  transition: background 0.2s ease;
  user-select: none;
}

.gear-collapsible-btn::-webkit-details-marker {
  display: none;
}

.gear-collapsible-btn::before {
  content: '▶ ';
  color: #58a6ff;
  font-size: 0.8em;
  transition: transform 0.2s ease;
  display: inline-block;
  margin-right: 6px;
}

.gear-collapsible[open] > .gear-collapsible-btn::before {
  content: '▼ ';
}

.gear-collapsible-btn:hover {
  background: #21262d;
}

.gear-collapsible[open] > .gear-collapsible-btn {
  background: #1c2533;
  border-bottom: 1px solid #30363d;
}

.gear-row-count {
  color: #6e7681;
  font-size: 0.85em;
  font-weight: normal;
}

.gear-header-title {
  margin-bottom: 6px;
}

.gear-header-slot-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
}

.gear-header-slot-name {
  color: #c9d1d9;
  font-size: 0.88em;
  font-weight: 500;
}

.gear-header-icon {
  height: 48px !important;
  width: auto !important;
  vertical-align: middle;
  margin-right: 10px;
  image-rendering: auto;
}

.gear-no-img {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 40px !important;
  height: 48px !important;
  border: 1px dashed;
  border-radius: 4px;
  font-size: 0.72em;
  font-weight: 700;
  opacity: 0.55;
  box-sizing: border-box;
}

.gear-collapsible .gear-upgrade-table {
  margin: 0;
  border: none;
  border-radius: 0;
}

/* ======== STICKY HEADER ======== */
#pricing-table thead th {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, #1f2937 0%, #111827 100%) !important;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.6);
}

/* Ikony sortowania */
.tablesorter-header {
  cursor: pointer;
  position: relative;
  padding-right: 22px !important;
  white-space: nowrap;
}

.tablesorter-header::after {
  content: '⇅';
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.3;
  font-size: 0.8em;
}

.tablesorter-headerAsc::after {
  content: '▲';
  opacity: 1;
  color: #58a6ff;
}

.tablesorter-headerDesc::after {
  content: '▼';
  opacity: 1;
  color: #58a6ff;
}

/* Ukryj domyślne ikony sortowania z theme.dark */
#pricing-table.tablesorter th.tablesorter-header .tablesorter-header-inner {
  display: inline;
}

#pricing-table.tablesorter th.tablesorter-header i.tablesorter-icon {
  display: none !important;
}

/* Nadpisanie kolorów z theme.dark dla tablesorter */
#pricing-table.tablesorter tbody td {
  color: #c9d1d9;
}

#pricing-table.tablesorter tbody tr:hover td {
  color: #c9d1d9;
}

/* Zachowanie kolorów opłacalności pomimo theme.dark */
#pricing-table.tablesorter tbody td.good,
#pricing-table.tablesorter tbody tr.good td {
  color: #3fb950 !important;
}

#pricing-table.tablesorter tbody td.neutral,
#pricing-table.tablesorter tbody tr.neutral td {
  color: #e3b341 !important;
}

#pricing-table.tablesorter tbody td.bad,
#pricing-table.tablesorter tbody tr.bad td {
  color: #f85149 !important;
}

/* ======== KONTENER TABELI ======== */
.table-container {
  width: 100%;
}

/* Kontrolka widoczności kolumn - domyślnie ukryta */
.mobile-column-toggle {
  display: none;
}

/* Kolumna Wartość - zawsze w 1 linii */
#pricing-table th:nth-child(4),
#pricing-table td:nth-child(4) {
  white-space: nowrap;
}

/* ======== RESPONSYWNOŚĆ ======== */
@media (max-width: 768px) {
  /* Ukryj elementy tylko na mobile */
  .hide-mobile {
    display: none !important;
  }

  /* Poziome przewijanie na html/body */
  html, body {
    overflow-x: auto;
  }

  .table-container {
    width: max-content;
    min-width: 100%;
  }

  body {
    margin: 10px;
  }

  /* Sticky pierwsza kolumna (numer) i druga kolumna (przedmiot) */
  #pricing-table th:nth-child(1),
  #pricing-table td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 10;
    background: #161b22;
    min-width: 30px;
    max-width: 30px;
  }

  #pricing-table th:nth-child(2),
  #pricing-table td:nth-child(2) {
    position: sticky;
    left: 30px;
    z-index: 10;
    background: #161b22;
    min-width: 140px;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Cień na sticky kolumnach dla wizualnego oddzielenia */
  #pricing-table th:nth-child(2)::after,
  #pricing-table td:nth-child(2)::after {
    content: '';
    position: absolute;
    top: 0;
    right: -6px;
    width: 6px;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.3), transparent);
    pointer-events: none;
  }

  /* Fixed header bar (JavaScript) */
  #fixed-header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: #0d1117;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.8);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #fixed-header-table {
    border-collapse: collapse;
    margin: 0;
  }

  #fixed-header-table th {
    background: #1f2937 !important;
    color: #58a6ff !important;
    font-weight: bold;
    border: 1px solid #30363d;
    padding: 8px 4px;
    text-align: center;
    font-size: 0.8em;
    white-space: nowrap;
    position: relative;
  }

  /* Sticky kolumny w fixed header */
  #fixed-header-table thead th:nth-child(1) {
    position: sticky !important;
    left: 0 !important;
    z-index: 100 !important;
    background: #1a1f2b !important;
    min-width: 30px;
    max-width: 30px;
    box-shadow: 2px 0 4px rgba(0,0,0,0.5);
  }

  #fixed-header-table thead th:nth-child(2) {
    position: sticky !important;
    left: 30px !important;
    z-index: 100 !important;
    background: #1a1f2b !important;
    box-shadow: 2px 0 4px rgba(0,0,0,0.5);
  }

  /* Ukryj te same kolumny co w głównej tabeli */
  #fixed-header-table th:nth-child(3),
  #fixed-header-table th:nth-child(7) {
    display: none;
  }

  #fixed-header-table.show-all-columns th:nth-child(3),
  #fixed-header-table.show-all-columns th:nth-child(7) {
    display: table-cell;
  }

  /* Alternatywne kolory dla sticky kolumn */
  #pricing-table tbody tr:nth-child(even) td:nth-child(1),
  #pricing-table tbody tr:nth-child(even) td:nth-child(2) {
    background: #1c2128;
  }

  #pricing-table tbody tr:hover td:nth-child(1),
  #pricing-table tbody tr:hover td:nth-child(2) {
    background: #21262d;
  }

  /* Sekcje - sticky i wycentrowane */
  #pricing-table tr.section td {
    position: sticky;
    left: 0;
    z-index: 50;
    min-width: auto;
    max-width: none;
    background: linear-gradient(90deg, #2d1a4e 0%, #4c2889 50%, #2d1a4e 100%) !important;
    text-align: center;
  }

  /* Kontrolka widoczności kolumn */
  .mobile-column-toggle {
    display: block;
    padding: 10px;
    margin-bottom: 10px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 6px;
  }

  .mobile-column-toggle label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #c9d1d9;
    cursor: pointer;
  }

  .mobile-column-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
  }

  /* Domyślnie ukryj kolumny Opis i Uwagi na mobile */
  #pricing-table th:nth-child(3),
  #pricing-table td:nth-child(3),
  #pricing-table th:nth-child(7),
  #pricing-table td:nth-child(7) {
    display: none;
  }

  /* Pokaż wszystkie kolumny gdy checkbox zaznaczony */
  #pricing-table.show-all-columns th:nth-child(3),
  #pricing-table.show-all-columns td:nth-child(3),
  #pricing-table.show-all-columns th:nth-child(7),
  #pricing-table.show-all-columns td:nth-child(7) {
    display: table-cell;
  }

  /* Mniejsza czcionka */
  table {
    font-size: 0.8em;
  }

  td img {
    height: 24px;
    margin-right: 3px;
  }

  /* Mobilne rozmiary ikon - nadpisanie !important */
  img.icon-xs {
    height: 14px !important;
  }

  img.icon-sm {
    height: 18px !important;
  }

  img.icon-md {
    height: 24px !important;
  }

  th, td {
    padding: 6px 4px;
    position: relative;
  }

  /* Mniejszy padding w sticky kolumnach */
  #pricing-table th:nth-child(1),
  #pricing-table td:nth-child(1),
  #pricing-table th:nth-child(2),
  #pricing-table td:nth-child(2) {
    padding: 6px 3px;
  }

  /* Wskaźnik przewijania */
  .table-container::after {
    content: '← przewiń →';
    display: block;
    text-align: center;
    color: #6e7681;
    font-size: 0.85em;
    padding: 8px;
  }
}

/* Małe telefony */
@media (max-width: 480px) {
  body {
    margin: 5px;
  }

  table {
    font-size: 0.7em;
  }

  td img {
    height: 18px;
    margin-right: 2px;
  }

  /* Jeszcze mniejsze ikony na małych telefonach */
  img.icon-xs {
    height: 12px !important;
  }

  img.icon-sm {
    height: 14px !important;
  }

  img.icon-md {
    height: 18px !important;
  }

  #pricing-table th:nth-child(2),
  #pricing-table td:nth-child(2) {
    min-width: 100px;
    max-width: 140px;
  }

}

/* ======== BEER CALCULATOR ======== */

#beer-calc-section {
  margin: 40px 0;
  padding: 24px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
}

#beer-calc-section h2 {
  margin: 0 0 8px 0;
  color: #e6edf3;
  font-size: 1.4em;
}

.beer-calc-intro {
  color: #8b949e;
  margin: 0 0 20px 0;
}

/* Przycisk pomocy ? */
.beer-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid #388bfd;
  background: transparent;
  color: #388bfd;
  font-size: 0.75em;
  font-weight: 700;
  cursor: pointer;
  vertical-align: middle;
  margin-left: 8px;
  line-height: 1;
  padding: 0;
  transition: background 0.15s, color 0.15s;
}
.beer-help-btn:hover {
  background: #388bfd;
  color: #fff;
}

/* Nagłówek sekcji z przyciskiem ? */
.beer-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.beer-section-header h2 {
  margin: 0;
}

/* Modal overlay — domyślnie ukryty, widoczny po dodaniu .is-open */
.beer-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.beer-modal-overlay.is-open {
  display: flex;
}

.beer-modal {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 10px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.beer-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #30363d;
  flex-shrink: 0;
}
.beer-modal-header h3 {
  margin: 0;
  color: #e6edf3;
  font-size: 1.05em;
}

.beer-modal-close {
  background: transparent;
  border: none;
  color: #8b949e;
  font-size: 1.1em;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
}
.beer-modal-close:hover {
  background: #30363d;
  color: #e6edf3;
}

.beer-modal-body {
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Krok instrukcji */
.beer-help-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.beer-help-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1f6feb;
  color: #fff;
  font-weight: 700;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.beer-help-step-content h4 {
  margin: 0 0 6px;
  color: #e6edf3;
  font-size: 0.95em;
}
.beer-help-step-content p {
  margin: 0;
  color: #8b949e;
  font-size: 0.88em;
  line-height: 1.5;
}
.beer-help-step-content img {
  display: block;
  margin-top: 10px;
  max-width: 100%;
  border-radius: 6px;
  border: 1px solid #30363d;
}

.beer-initial-settings {
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 18px 20px 14px;
  margin-bottom: 20px;
  background: #0d1117;
}

.beer-settings-title {
  margin: 0 0 16px 0;
  color: #e6edf3;
  font-size: 1em;
  font-weight: 600;
  border-bottom: 1px solid #21262d;
  padding-bottom: 10px;
}


.beer-reset-row {
  margin-top: 12px;
}

.beer-calc-goals {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
}

.beer-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85em;
  color: #8b949e;
  font-weight: 600;
}

.beer-input {
  padding: 6px 10px;
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #e6edf3;
  font-size: 1em;
  width: 130px;
}

.beer-input:focus {
  outline: none;
  border-color: #388bfd;
}

.beer-section-title {
  margin: 0 0 12px 0;
  color: #58a6ff;
  font-size: 1.05em;
}

.beer-calc-add-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 6px;
}

.beer-select {
  padding: 6px 10px;
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #e6edf3;
  font-size: 0.9em;
  cursor: pointer;
}

.beer-select:focus {
  outline: none;
  border-color: #388bfd;
}

.beer-btn-add {
  padding: 6px 14px;
  background: #238636;
  border: 1px solid #2ea043;
  border-radius: 6px;
  color: #fff;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
}

.beer-btn-add:hover { background: #2ea043; }

.beer-empty-msg {
  color: #8b949e;
  font-style: italic;
  margin: 8px 0;
}

.beer-inv-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 0.9em;
}

.beer-inv-table th, .beer-inv-table td {
  padding: 7px 10px;
  border: 1px solid #21262d;
  text-align: center;
}

.beer-inv-table th {
  background: #161b22;
  color: #58a6ff;
  font-weight: 600;
}

.beer-inv-table tfoot td {
  background: #0d1117;
  font-weight: bold;
}

.beer-btn-remove {
  padding: 2px 8px;
  background: #6e1111;
  border: 1px solid #da3633;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-size: 0.85em;
}

.beer-btn-remove:hover { background: #da3633; }

.beer-action-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 16px 0;
}

.beer-btn-calc {
  padding: 10px 24px;
  background: #1f6feb;
  border: 1px solid #388bfd;
  border-radius: 6px;
  color: #fff;
  font-size: 1em;
  font-weight: 700;
  cursor: pointer;
}

.beer-btn-calc:hover { background: #388bfd; }

.beer-btn-reset {
  padding: 10px 18px;
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #8b949e;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
}

.beer-btn-reset:hover {
  background: #30363d;
  color: #e6edf3;
}

.beer-options-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0 18px;
  padding: 10px 14px;
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 6px;
}

.beer-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #e6edf3;
  font-size: 0.9em;
  user-select: none;
}

.beer-checkbox-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: #58a6ff;
  flex-shrink: 0;
}

.beer-option-hint {
  color: #8b949e;
  font-size: 0.82em;
}

.beer-algo-label {
  color: #8b949e;
  font-size: 0.92em;
  margin: 16px 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #30363d;
}


.beer-calc-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.beer-calc-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 16px;
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 6px;
  min-width: 130px;
}

.beer-calc-stat span {
  font-size: 0.78em;
  color: #8b949e;
}

.beer-calc-stat strong {
  font-size: 1.1em;
  color: #e6edf3;
}

.beer-plan-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 16px 0;
  font-size: 0.9em;
}

.beer-plan-table th, .beer-plan-table td {
  padding: 7px 10px;
  border: 1px solid #21262d;
  text-align: center;
}

.beer-plan-table th {
  background: #161b22;
  color: #58a6ff;
  font-weight: 600;
}

.beer-plan-table tfoot td {
  background: #0d1117;
  font-weight: bold;
}

.beer-calc-ok {
  padding: 10px 14px;
  background: #0e3a1e;
  border: 1px solid #238636;
  border-radius: 6px;
  color: #3fb950;
  font-weight: 600;
  margin-top: 12px;
}

.beer-calc-warn {
  padding: 10px 14px;
  background: #2e2200;
  border: 1px solid #9e6a03;
  border-radius: 6px;
  color: #e3b341;
  font-weight: 600;
  margin-top: 12px;
}

.beer-calc-fail {
  padding: 10px 14px;
  background: #3c1111;
  border: 1px solid #da3633;
  border-radius: 6px;
  color: #f85149;
  font-weight: 600;
  margin-top: 12px;
}

/* ======== COOKIE CONSENT BANNER ======== */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 20px;
  background: #161b22;
  border-top: 1px solid #30363d;
  color: #8b949e;
  font-size: 0.85em;
}

.cookie-consent[hidden] {
  display: none;
}

.cookie-consent-btn {
  padding: 6px 18px;
  background: #1f6feb;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.cookie-consent-btn:hover {
  background: #388bfd;
}

.cookie-consent-link {
  color: #58a6ff;
  font-size: 0.85em;
  white-space: nowrap;
}

.cookie-consent-link:hover {
  color: #79c0ff;
}
