/* Kolor --accent zmienia sie na barwe sieci po wejsciu do sklepu (game.js). */
:root {
  --accent: #2a9aa8;
  --bg: #10131c;
  --panel: #1a1f2c;
  --panel-2: #232a3a;
  --line: #2f384b;
  --text: #edf0f6;
  --muted: #9aa5b8;
  --gold: #ffd86b;
  --radius: 14px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
}

/* Gdy modal z ofertami jest otwarty — chowamy scrollbar głównego okna,
   żeby scrollowała się tylko lista ofert wewnątrz dialogu. */
body.modal-open {
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 18px 20px 24px;
  background:
    radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    var(--bg);
  transition: background 0.4s ease;
}

#hud {
  width: min(1400px, 100%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
}

.hud-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hud-logo {
  width: 30px;
  height: 30px;
  display: block;
  filter: drop-shadow(0 4px 10px rgba(83, 182, 195, 0.45));
}

#hud h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.location-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: background 0.3s ease;
}

#hud .hint {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* legenda sterowania: kazda czynnosc to osobna pastylka — klawisze i krotki podpis */
.hint-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-2) 70%, transparent);
}

.hint-label { font-size: 12.5px; font-weight: 700; color: var(--text); letter-spacing: 0.2px; }
.hint-or { font-size: 11px; color: var(--muted); }
.key-group { display: inline-flex; gap: 2px; }

.key-cap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 6px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}
.key-cap--wide { padding: 0 9px; }
.key-cap svg { width: 13px; height: 13px; display: block; }
.hint-mouse { width: 20px; height: 22px; margin-left: 3px; color: #ffffff; }

kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  background: var(--panel-2);
  color: var(--text);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
}

#game-area {
  width: min(1400px, 100%);
  display: flex;
  align-items: stretch;
  gap: 16px;
}

#stage {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#game {
  display: block;
  width: 100%;
  height: clamp(340px, calc(100vh - 210px), 760px);
  background: #10131c;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  outline: none;
  touch-action: none;
}

/* ------------------ Panel "Idz do" ------------------ */
.dest-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.dest-title {
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.dest-list {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* jedna grupa skrotow (np. sklepy albo atrakcje) z etykieta z lewej */
.dest-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.dest-group + .dest-group {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.dest-group-label {
  flex: 0 0 68px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
}

.dest-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 3px 10px 3px 4px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: var(--font);
  font-size: 12.5px;
  line-height: 1;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.dest-chip:hover {
  border-color: var(--chip);
  background: color-mix(in srgb, var(--chip) 18%, var(--panel-2));
}

.dest-chip:active { transform: scale(0.97); }

.dest-chip:focus-visible {
  outline: 2px solid var(--chip);
  outline-offset: 2px;
}

/* Logo sklepu i ikonka maja ten sam bialy kwadrat, zeby skroty byly rowne. */
.dest-logo,
.dest-icon {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  padding: 2px;
  background: #fff;
  border-radius: 6px;
}

.dest-logo {
  object-fit: contain;
}

.dest-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dest-icon svg {
  width: 100%;
  height: 100%;
}

/* Skroty dzialow w sklepie: mniejsza ikonka kategorii i nizszy przycisk. */
.dest-chip--compact {
  gap: 6px;
  min-height: 30px;
  padding: 3px 11px 3px 5px;
  border-radius: 10px;
  font-size: 12.5px;
}

.dest-logo--category {
  width: 20px;
  height: 20px;
  padding: 0;
  background: none;
  border-radius: 0;
}

.dest-chip--compact .dest-dot {
  margin-left: 5px;
  margin-right: 5px;
}

.dest-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--chip);
}

/* ------------------ Koszyk (zawsze widoczny) ------------------ */
#cart-panel {
  flex: 0 0 300px;
  /* rowno z gra i belka skrotow pod nia (wysokosc ustawia js/main.js) */
  height: var(--stage-full-height, auto);
  max-height: var(--stage-full-height, clamp(340px, calc(100vh - 140px), 830px));
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}

.cart-title {
  font-weight: 800;
  font-size: 15px;
}

.cart-count {
  background: var(--accent);
  color: #fff;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  transition: background 0.3s ease;
}

.cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}

.cart-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
}

/* Naglowek podlisty sklepu (tylko gdy w koszyku sa produkty z kilku sieci). */
.cart-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 1;
}

.cart-group-logo {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  padding: 2px;
  object-fit: contain;
  background: #fff;
  border-radius: 7px;
}

.cart-group-name {
  flex: 1;
  font-size: 13px;
  font-weight: 800;
}

.cart-group-sum {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.cart-item-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cart-item {
  gap: 8px;
  padding-left: 10px;
}

.cart-item-thumb {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.1s ease, border-color 0.15s ease;
}

.cart-item-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cart-item-thumb:hover { border-color: var(--accent); transform: scale(1.06); }

button.cart-item-name {
  padding: 0;
  font: inherit;
  text-align: left;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

button.cart-item-name:hover { text-decoration: underline; }

.cart-item-name {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-meta {
  font-size: 12px;
  color: var(--muted);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.cart-qty-up,
.cart-qty-down {
  width: 24px;
  height: 24px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-family: var(--font);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cart-qty-up:hover,
.cart-qty-down:hover { border-color: var(--accent); }

.cart-qty-input {
  width: 36px;
  height: 24px;
  padding: 0 2px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 7px;
  text-align: center;
  font-family: var(--font);
  font-size: 13px;
  -moz-appearance: textfield;
}

.cart-qty-input:focus {
  outline: none;
  border-color: var(--accent);
}

.cart-qty-input::-webkit-inner-spin-button,
.cart-qty-input::-webkit-outer-spin-button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}

.cart-item-remove {
  width: 24px;
  height: 24px;
  border: none;
  background: #e5484d;
  color: white;
  font-size: 14px;
  font-weight: bold;
  border-radius: 7px;
  cursor: pointer;
  line-height: 1;
  flex: 0 0 auto;
}

.cart-item-remove:hover { filter: brightness(1.1); }

.cart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--panel-2);
  border-top: 1px solid var(--line);
}

.cart-total-label { color: var(--muted); font-size: 13px; }
.cart-total { font-weight: 800; color: var(--gold); font-size: 17px; }

@media (max-width: 900px) {
  #game-area { flex-direction: column; }
  #cart-panel { flex: 0 0 auto; height: auto; max-height: 320px; align-self: stretch; }
  #game { height: clamp(300px, 62vh, 640px); }
}

/* ------------------ Modal produktow ------------------ */
#product-modal {
  width: min(900px, 95vw);
  height: var(--stage-height, 85vh);
  max-height: 85vh;
  padding: 0;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font);
  overflow: hidden;
}

#product-modal[open] {
  display: flex;
  flex-direction: column;
}

#product-modal::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0;
  color: var(--text);
}

#modal-close {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  padding: 0 6px;
}

#modal-close:hover { color: #ee1c25; }

#query-modal {
  width: min(420px, 90vw);
  padding: 0;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font);
}

#query-modal::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

#query-modal-close {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  padding: 0 6px;
}

#query-modal-close:hover { color: #ee1c25; }

.query-form {
  display: flex;
  gap: 10px;
  padding: 16px 18px;
}

.query-form input[type="text"] {
  flex: 1;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  font-family: var(--font);
  font-size: 14px;
}

.query-form input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}

.query-form button[type="submit"] {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0 16px;
  font-family: var(--font);
  font-weight: bold;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
}

.query-form button[type="submit"]:hover { filter: brightness(1.1); }

.modal-status:empty { display: none; }

.modal-status {
  margin: 0;
  padding: 10px 18px;
  font-size: 13px;
  opacity: 0.8;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.modal-status.error { color: #ee9c9c; opacity: 1; }

.modal-subcategories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 18px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.modal-subcategories[hidden] { display: none; }

.subcat-pill {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.subcat-pill:hover { border-color: var(--accent); }
.subcat-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: bold;
}

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  overflow-y: auto;
}

.product-list {
  list-style: none;
  margin: 0;
  padding: 14px 18px;
  position: relative;
}

.modal-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--panel);
  z-index: 2;
  opacity: 1;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.modal-loader.hidden {
  opacity: 0;
}

/* Loader: produkty wpadaja do jadacego wozka. */
.cart-loader {
  position: relative;
  width: 96px;
  height: 96px;
  color: var(--accent);
}

.cart-loader-cart {
  position: absolute;
  left: 10px;
  bottom: 14px;
  width: 76px;
  height: 57px;
  animation: cart-roll 0.6s ease-in-out infinite;
}

.cart-loader-wheel {
  fill: var(--text);
}

.cart-loader-item {
  position: absolute;
  top: 0;
  left: 44px;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: #ffd43b;
  opacity: 0;
  animation: cart-drop 1.8s cubic-bezier(0.5, 0, 0.8, 0.6) infinite;
}

.cart-loader-item:nth-child(2) {
  left: 54px;
  border-radius: 50%;
  background: #ff6b6b;
  animation-delay: 0.6s;
}

.cart-loader-item:nth-child(3) {
  left: 36px;
  width: 11px;
  height: 17px;
  background: #51cf66;
  animation-delay: 1.2s;
}

.cart-loader-ground {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 8px;
  height: 3px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--line) 0 14px, transparent 14px 24px);
  animation: cart-ground 0.5s linear infinite;
}

@keyframes cart-drop {
  0% { transform: translateY(-6px) rotate(0deg); opacity: 0; }
  12% { opacity: 1; }
  55% { transform: translateY(46px) rotate(140deg); opacity: 1; }
  68%, 100% { transform: translateY(50px) rotate(160deg); opacity: 0; }
}

@keyframes cart-roll {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50% { transform: translateY(-2px) rotate(1.5deg); }
}

@keyframes cart-ground {
  to { background-position: -24px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cart-loader-cart, .cart-loader-ground { animation: none; }
}

/* Nowoczesne, waskie paski przewijania w modalach i koszyku. */
.modal-body,
.cart-list,
.offer-detail-body {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent) 70%, #ffffff 0%) transparent;
}

.modal-body::-webkit-scrollbar,
.cart-list::-webkit-scrollbar,
.offer-detail-body::-webkit-scrollbar {
  width: 10px;
}

.modal-body::-webkit-scrollbar-track,
.cart-list::-webkit-scrollbar-track,
.offer-detail-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb,
.cart-list::-webkit-scrollbar-thumb,
.offer-detail-body::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 75%, transparent);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

.modal-body::-webkit-scrollbar-thumb:hover,
.cart-list::-webkit-scrollbar-thumb:hover,
.offer-detail-body::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
  border: 2px solid transparent;
  background-clip: padding-box;
}

.offer {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  margin: 0;
  background: #f4f4f6;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translate(0, 0);
  transition:
    transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1),
    opacity 0.45s ease,
    box-shadow 0.15s ease;
  will-change: transform, opacity;
}

.offer.visible {
  opacity: 1;
}

.offer:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
}

.offer:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.offer.added {
  box-shadow: 0 0 0 3px #58a848, 0 6px 16px rgba(0, 0, 0, 0.55);
}

.offer-image {
  display: block;
  width: 100%;
  height: auto;
  background: #f4f4f6;
}

.offer-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px 10px 8px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.55) 60%,
    rgba(0, 0, 0, 0) 100%
  );
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.offer-title {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 500;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.offer-price {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: bold;
  color: #ffe54a;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}

/* Licznik ilosci na obrazku oferty — pojawia sie po dodaniu do koszyka. */
.offer-qty {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 4px;
  background: rgba(26, 31, 44, 0.94);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  display: none;
  cursor: default;
}

.offer.added .offer-qty {
  display: flex;
  transform-origin: top right;
  animation: offer-qty-open 0.28s cubic-bezier(0.2, 1.5, 0.4, 1);
}

.offer-qty .cart-qty-up,
.offer-qty .cart-qty-down {
  width: 34px;
  height: 34px;
  font-size: 13px;
}

.offer-qty .cart-qty-input {
  width: 44px;
  height: 34px;
  font-size: 16px;
  font-weight: 700;
}

/* Koszyczek na kafelku: widoczny po najechaniu, dodaje oferte do koszyka. */
.offer-add {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #ffffff;
  background: #2a9aa8;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.offer:hover .offer-add,
.offer:focus-within .offer-add {
  opacity: 1;
  transform: scale(1);
}

.offer-add:hover { background: #1f7f8b; transform: scale(1.1); }
.offer-add:active { transform: scale(0.92); }
.offer-add svg { width: 22px; height: 22px; display: block; }
/* po dodaniu koszyczek zmienia sie w zielony "ptaszek" i zostaje widoczny */
.offer-add-check { display: none !important; }
.offer.added .offer-add {
  opacity: 1;
  transform: scale(1);
  background: #2f9e44;
  cursor: default;
  animation: offer-added-pop 0.3s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.offer.added .offer-add svg:not(.offer-add-check) { display: none; }
.offer.added .offer-add .offer-add-check { display: block !important; }

@keyframes offer-added-pop {
  from { transform: scale(0.5); }
}

/* na ekranach dotykowych nie ma najechania, wiec koszyczek jest zawsze widoczny */
@media (hover: none) {
  .offer-add { opacity: 1; transform: scale(1); }
}

/* miniatura lecaca do koszyka po dodaniu oferty */
.offer-fly {
  position: fixed;
  z-index: 50;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

#cart-count.bump { animation: cart-bump 0.45s ease; }

@keyframes cart-bump {
  40% { transform: scale(1.7); }
}

@keyframes offer-qty-open {
  from { opacity: 0; transform: scale(0.35); }
}

/* ------------------ Koszyk w oknie ofert ------------------ */
#product-modal.with-cart {
  width: min(1240px, 96vw);
  flex-direction: row;
}

.modal-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.modal-cart-slot { display: none; }

#product-modal.with-cart .modal-cart-slot {
  flex: 0 0 300px;
  width: 300px;
  min-width: 0;
  display: flex;
  min-height: 0;
  border-left: 1px solid var(--line);
}

.modal-cart-slot #cart-panel {
  flex: 1 1 0;
  min-width: 0;
  height: auto;
  max-height: none;
  align-self: stretch;
  border: none;
  border-radius: 0;
  box-shadow: none;
}


/* ------------------ Modal szczegolow oferty ------------------ */
#offer-detail-modal {
  width: min(880px, 95vw);
  max-height: 90vh;
  padding: 0;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font);
  overflow: hidden;
}

#offer-detail-modal[open] {
  display: flex;
  flex-direction: column;
}

#offer-detail-modal::backdrop {
  background: rgba(0, 0, 0, 0.75);
}

@keyframes detail-pop-in {
  from { transform: scale(0.12); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
@keyframes detail-backdrop-in {
  from { background: rgba(0, 0, 0, 0); }
  to   { background: rgba(0, 0, 0, 0.75); }
}

#offer-detail-modal.opening {
  animation: detail-pop-in 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
}
#offer-detail-modal.opening::backdrop {
  animation: detail-backdrop-in 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  #offer-detail-modal.opening,
  #offer-detail-modal.opening::backdrop { animation: none; }
}

#offer-detail-close {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  padding: 0 6px;
}

#offer-detail-close:hover { color: #ee1c25; }

.offer-detail-body {
  display: flex;
  gap: 18px;
  padding: 18px;
  overflow-y: auto;
}

.offer-detail-image-wrap {
  width: 460px;
  max-width: 58%;
  aspect-ratio: 1 / 1;
  align-self: flex-start;
  background: #f4f4f6;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  flex: 0 0 auto;
  touch-action: none;
}

.offer-detail-image-wrap.zoomed { cursor: zoom-out; }
.offer-detail-image-wrap.dragging { cursor: grabbing; }

.offer-detail-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  will-change: transform;
  transition: transform 0.05s linear;
  user-select: none;
  -webkit-user-drag: none;
}

.offer-detail-image-wrap.dragging .offer-detail-image { transition: none; }

.offer-detail-info {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.offer-detail-brand {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--text);
}

.offer-detail-subcategory {
  margin: 0;
  font-size: 12px;
  opacity: 0.7;
}

.offer-detail-prices {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-top: 4px;
}

.offer-detail-price {
  font-size: 24px;
  font-weight: bold;
  color: #ffe54a;
}

.offer-detail-regular-price {
  font-size: 14px;
  text-decoration: line-through;
  opacity: 0.6;
}

.offer-detail-regular-price:empty { display: none; }

.offer-detail-discount {
  font-size: 12px;
  font-weight: bold;
  background: #ee1c25;
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
}

.offer-detail-discount:empty { display: none; }

.offer-detail-availability {
  margin: 0;
  font-size: 12px;
  opacity: 0.75;
}

.offer-detail-availability:empty { display: none; }

.offer-detail-add {
  margin-top: auto;
  align-self: stretch;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 16px;
  font-family: var(--font);
  font-weight: bold;
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.offer-detail-add:hover { filter: brightness(1.1); }
.offer-detail-add[hidden] { display: none; }

.offer-detail-qty {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  background: var(--panel-2);
  border: 1px solid #58a848;
  border-radius: 10px;
}

.offer-detail-qty[hidden] { display: none; }

.offer-detail-qty-label {
  font-size: 14px;
  font-weight: 700;
  color: #7fd66e;
}

.offer-detail-qty .cart-qty-up,
.offer-detail-qty .cart-qty-down {
  width: 30px;
  height: 30px;
}

.offer-detail-qty .cart-qty-input {
  width: 44px;
  height: 30px;
  font-size: 15px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .offer-detail-body {
    flex-direction: column;
  }
  .offer-detail-image-wrap {
    width: 100%;
    max-width: none;
  }
}

/* ------------------ Okno ofert swiatecznych (choinka) ------------------ */
#product-modal.xmas {
  --accent: #e5383b;
  --panel: #10231a;
  --panel-2: #173224;
  --line: #2b4d3a;
  --gold: #ffd166;
  border: 2px solid #d4a94a;
  box-shadow: 0 0 0 4px rgba(212, 169, 74, 0.18), 0 24px 70px rgba(0, 0, 0, 0.6);
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.07) 0 2px, transparent 3px) 0 0 / 90px 90px,
    radial-gradient(circle at 64% 62%, rgba(255, 255, 255, 0.05) 0 1.5px, transparent 2.5px) 0 0 / 70px 70px,
    var(--panel);
}

#product-modal.xmas .modal-header {
  position: relative;
  background: linear-gradient(100deg, #9d0208, #d00000 45%, #1b6b43);
  border-bottom: none;
  padding-bottom: 18px;
}

#product-modal.xmas .modal-header h2 {
  color: #fff;
  font-size: 20px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

#product-modal.xmas .modal-header h2::before {
  content: "";
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin-right: 10px;
  vertical-align: -0.08em;
  background: #ffd166;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* girlanda swiatelek pod naglowkiem */
#product-modal.xmas .modal-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 10px;
  background:
    radial-gradient(circle, #ffd166 0 3.5px, transparent 4.5px) 0 50% / 96px 10px repeat-x,
    radial-gradient(circle, #8ce99a 0 3.5px, transparent 4.5px) 32px 50% / 96px 10px repeat-x,
    radial-gradient(circle, #74c0fc 0 3.5px, transparent 4.5px) 64px 50% / 96px 10px repeat-x;
  animation: xmas-twinkle 1.4s ease-in-out infinite alternate;
}

@keyframes xmas-twinkle {
  from { opacity: 0.45; filter: brightness(0.9); }
  to { opacity: 1; filter: brightness(1.25); }
}

#product-modal.xmas .subcat-pill.active {
  background: #ffd166;
  border-color: #ffd166;
  color: #10231a;
}

#product-modal.xmas .offer {
  border-radius: 14px;
  box-shadow: 0 0 0 2px #d4a94a, 0 6px 16px rgba(0, 0, 0, 0.45);
}

#product-modal.xmas .offer.added {
  box-shadow: 0 0 0 3px #58a848, 0 6px 16px rgba(0, 0, 0, 0.55);
}

#product-modal.xmas .offer-price {
  background: #d00000;
  color: #fff;
  padding: 2px 8px;
  border-radius: 999px;
  text-shadow: none;
}

/* plakietka sklepu na kafelku */
.offer-brand {
  position: absolute;
  top: 6px;
  left: 6px;
  max-width: calc(100% - 60px); /* miejsce na koszyczek w prawym gornym rogu */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 3px;
  background: rgba(255, 255, 255, 0.96);
  color: #1a1f2c;
  border-radius: 9px;
  font-size: 11.5px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* logo sieci zawsze w takim samym kwadracie, niezaleznie od proporcji pliku */
.offer-brand img {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 24px;
  height: 24px;
  padding: 1px;
  object-fit: contain;
  border: 1px solid rgba(26, 31, 44, 0.14);
  border-radius: 6px;
  background: #fff;
}

.offer-brand span { padding-left: 2px; }



@media (prefers-reduced-motion: reduce) {
  #product-modal.xmas .modal-header::after { animation: none; }
}

/* ------------------ Okno z pucharami Blix Awards ------------------ */
.awards-modal {
  --aw-gold: #f6c343;
  --aw-navy: #0e1a30;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  color: #ffffff;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(83, 182, 195, 0.28) 0%, rgba(83, 182, 195, 0) 60%),
    linear-gradient(180deg, #12284a 0%, var(--aw-navy) 55%, #0a1222 100%);
  border: 1px solid rgba(246, 195, 67, 0.55);
  border-radius: 22px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7), 0 0 60px rgba(246, 195, 67, 0.12);
  overflow: hidden auto;
}

.awards-modal::backdrop {
  background: rgba(5, 8, 16, 0.78);
  backdrop-filter: blur(4px);
}

.awards-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s ease;
}

.awards-close:hover { background: rgba(255, 255, 255, 0.22); }

.awards-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px 24px 6px;
  text-align: center;
}

.awards-logo {
  width: min(250px, 62%);
  height: auto;
}

.awards-kicker {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--aw-gold);
}

.awards-kicker::before,
.awards-kicker::after {
  content: "";
  display: inline-block;
  width: 34px;
  height: 1px;
  margin: 0 12px;
  vertical-align: middle;
  background: linear-gradient(90deg, transparent, var(--aw-gold));
}

.awards-kicker::after { transform: scaleX(-1); }

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

.awards-shop-logo {
  box-sizing: border-box;
  width: 58px;
  height: 58px;
  padding: 6px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.awards-shop h2 {
  margin: 0;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
}

.awards-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 26px 26px 12px;
  list-style: none;
}

.awards-list.single {
  grid-template-columns: minmax(0, 420px);
  justify-content: center;
}

.award-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 34px 18px 22px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(246, 195, 67, 0.5);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 14px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: award-pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1) backwards;
}

.award-card:nth-child(2) { animation-delay: 0.14s; }

/* poswiata za pucharem */
.award-card::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 240px;
  height: 240px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(246, 195, 67, 0.38) 0%, rgba(246, 195, 67, 0) 62%);
  pointer-events: none;
  animation: award-glow 3.2s ease-in-out infinite;
}

.award-ribbon {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 16px 6px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #3a2500;
  background: linear-gradient(180deg, #ffe58a, #f0b429);
  border-radius: 0 0 10px 10px;
}

.award-cup {
  position: relative;
  width: 132px;
  height: 145px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.5));
}

.award-cup svg { width: 100%; height: 100%; display: block; }

.award-category {
  position: relative;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.25;
  background: linear-gradient(180deg, #fff6cf, #f6c343);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.award-group {
  position: relative;
  padding: 4px 13px;
  font-size: 12px;
  font-weight: 700;
  color: #dff6f9;
  background: rgba(83, 182, 195, 0.22);
  border: 1px solid rgba(83, 182, 195, 0.6);
  border-radius: 999px;
}

.award-description {
  position: relative;
  margin: 6px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.awards-list.single .award-description { font-size: 13px; }

.awards-source {
  margin: 0;
  padding: 8px 22px 20px;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.awards-source a { color: #7fd3de; }

@keyframes award-pop {
  from { opacity: 0; transform: translateY(18px) scale(0.9); }
}

@keyframes award-glow {
  50% { opacity: 0.55; }
}

@media (max-width: 560px) {
  .awards-list { grid-template-columns: minmax(0, 1fr); }
  .awards-shop h2 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .award-card, .award-card::before { animation: none; }
}

/* ------------------ Minimapa ------------------ */
.game-frame {
  position: relative;
}

.minimap {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
}

.minimap-toggle {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  color: #ffffff;
  background: rgba(22, 27, 40, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.minimap-toggle:hover { background: #2a9aa8; }
.minimap-toggle:active { transform: scale(0.94); }
.minimap-toggle svg { width: 24px; height: 24px; }
.minimap-toggle[hidden], .minimap-panel[hidden], .minimap[hidden] { display: none; }

.minimap-panel {
  padding: 6px;
  background: rgba(22, 27, 40, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.minimap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px 5px 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}

.minimap-min {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.minimap-min:hover { border-color: #53b6c3; color: #53b6c3; }

.minimap-canvas {
  display: block;
  border-radius: 8px;
}

/* ------------------ Okno z rybami (staw) ------------------ */
#product-modal.fish .modal-header {
  background: linear-gradient(90deg, #0d4f7a 0%, #1587b8 60%, #29a9c9 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

#product-modal.fish .modal-header h2 { color: #ffffff; }
#product-modal.fish .modal-header h2::before { content: "🎣"; margin-right: 10px; }
#product-modal.fish #modal-close { color: #ffffff; }
#product-modal.fish .subcat-pill.active { background: #1587b8; border-color: #1587b8; color: #ffffff; }


/* ------------------ Licznik przyspieszenia po grillu ------------------ */
.hud-badges {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}

.boost-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  color: #ffd43b;
  background: rgba(22, 27, 40, 0.9);
  border: 1px solid rgba(255, 212, 59, 0.6);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45), 0 0 18px rgba(255, 212, 59, 0.25);
  pointer-events: none;
}

.boost-badge[hidden] { display: none; }

.boost-badge svg {
  width: 24px;
  height: 24px;
  animation: boost-pulse 0.6s ease-in-out infinite;
}

.boost-time {
  min-width: 34px;
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
}

.boost-bar {
  width: 70px;
  height: 6px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  overflow: hidden;
}

.boost-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #f59f00, #ffd43b);
  border-radius: 999px;
}

@keyframes boost-pulse {
  50% { transform: scale(1.2); }
}

@media (prefers-reduced-motion: reduce) {
  .boost-badge svg { animation: none; }
}

/* ------------------ Dymek rozmowy (np. Mikolaj) ------------------ */
.speech {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  width: min(560px, calc(100% - 140px));
  transform: translateX(-50%);
  padding: 14px 18px 12px;
  color: #1a1f2c;
  background: #ffffff;
  border: 3px solid #c8202f;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  animation: speech-in 0.22s ease-out;
}

.speech[hidden] { display: none; }

.speech-name {
  display: inline-block;
  margin: -26px 0 6px -4px;
  padding: 3px 12px;
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
  background: #c8202f;
  border-radius: 999px;
  vertical-align: top;
}

.speech-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.speech-hint {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #7c8698;
  text-align: right;
}

@keyframes speech-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
}

/* ------------------ Okno billboardu (strona w ramce / pobranie aplikacji) ------------------ */
.link-modal {
  width: min(1100px, 94vw);
  padding: 0;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.link-modal[open] {
  display: flex;
  flex-direction: column;
}

.link-modal::backdrop { background: rgba(0, 0, 0, 0.7); }

.link-app[hidden] { display: none; }

.link-modal:has(.link-app:not([hidden])) { width: min(460px, 94vw); }

.link-contact-icon { width: 92px; height: 92px; }

.link-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 30px 28px 26px;
  text-align: center;
}

.link-app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.link-app h3 { margin: 6px 0 0; font-size: 20px; font-weight: 800; }
.link-app p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }

.link-app-button {
  margin-top: 8px;
  padding: 13px 26px;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
  background: #2a9aa8;
  border-radius: 12px;
  transition: background 0.15s ease, transform 0.1s ease;
}

.link-app-button:hover { background: #1f7f8b; }
.link-app-button:active { transform: scale(0.97); }

.link-app-note { font-size: 11.5px; color: var(--muted); }

#link-modal-close {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  padding: 0 6px;
}

#link-modal-close:hover { color: #ee1c25; }

.boost-badge.paused { opacity: 0.45; }
.boost-badge.paused svg { animation: none; }

/* oryginalne odznaki sklepow z aplikacja */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.store-badge {
  display: block;
  border-radius: 8px;
  transition: transform 0.1s ease, filter 0.15s ease;
}

.store-badge img { display: block; height: 50px; width: auto; }
.store-badge:hover { filter: brightness(1.15); transform: translateY(-1px); }
.store-badge:active { transform: scale(0.97); }

/* karta Blix Awards w oknie billboardu */
.link-modal:has(.link-awards:not([hidden])) {
  width: min(520px, 94vw);
  background: linear-gradient(180deg, #12284a 0%, #0e1a30 60%, #0a1222 100%);
  border-color: rgba(246, 195, 67, 0.55);
}

.link-awards-logo { width: min(260px, 70%); height: auto; margin-top: 4px; }
.link-awards h3 { color: #f6c343; letter-spacing: 2px; text-transform: uppercase; font-size: 15px; }
.link-awards p { color: rgba(255, 255, 255, 0.85); }
.link-awards .link-app-button { background: #f0b429; color: #2b1c00; }
.link-awards .link-app-button:hover { background: #ffd35c; }

/* ------------------ Bateria hulajnogi ------------------ */
.battery-badge {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 13px 7px 10px;
  font-size: 14px;
  font-weight: 800;
  color: #51cf66;
  background: rgba(22, 27, 40, 0.9);
  border: 1px solid currentColor;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

.battery-badge[hidden] { display: none; }
.battery-badge svg { width: 30px; height: 17px; }
.battery-text { color: #ffffff; font-variant-numeric: tabular-nums; }
.battery-badge[data-state="low"] { color: #ffd43b; }
.battery-badge[data-state="empty"] { color: #ff6b6b; animation: battery-alert 0.9s ease-in-out infinite; }
.battery-badge[data-state="charging"] { color: #53b6c3; }
.battery-badge[data-state="charging"] .battery-fill { animation: battery-charge 1s ease-in-out infinite; }

@keyframes battery-alert { 50% { box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.35); } }
@keyframes battery-charge { 50% { opacity: 0.45; } }

@media (prefers-reduced-motion: reduce) {
  .battery-badge, .battery-badge .battery-fill { animation: none !important; }
}

/* ------------------ Okno potrawy wigilijnej ------------------ */
.dish-modal {
  width: min(560px, 94vw);
  padding: 0;
  color: var(--text);
  background: linear-gradient(180deg, #3a1420 0%, var(--panel) 42%);
  border: 1px solid rgba(200, 32, 47, 0.7);
  border-radius: 18px;
  overflow: hidden;
}

.dish-modal::backdrop { background: rgba(0, 0, 0, 0.7); }
.dish-modal .modal-header h2::before { content: "🍽️"; margin-right: 10px; }

#dish-modal-close {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  padding: 0 6px;
}

#dish-modal-close:hover { color: #ee1c25; }

.dish-body { padding: 18px 22px 20px; }
.dish-number { margin: 0 0 8px; font-size: 11.5px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: #f5b82e; }
.dish-description { margin: 0 0 16px; font-size: 14.5px; line-height: 1.55; }
.dish-body h3 { margin: 0 0 10px; font-size: 13px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); }

.dish-ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dish-ingredient {
  padding: 7px 13px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.dish-ingredient:hover { border-color: #f5b82e; background: rgba(245, 184, 46, 0.14); }
.dish-note { margin: 14px 0 0; font-size: 12px; color: var(--muted); }

/* dluzsze wypowiedzi (np. Babcia wymienia potrawy) */
.speech-text { max-height: 42vh; overflow-y: auto; }

/* zdjecie potrawy w oknie */
.dish-photo { margin: 0; position: relative; background: #0d1018; }
.dish-photo[hidden] { display: none; }
.dish-photo img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.dish-photo figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 3px 9px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.55);
  border-top-left-radius: 8px;
}

.dish-modal { max-height: calc(100vh - 32px); overflow: hidden auto; }
.dish-ingredient.seen::after, .ingredient-pill.seen::after { content: " ✓"; color: #51cf66; }

/* pasek skladnikow potrawy nad lista ofert */
.modal-ingredients {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(200, 32, 47, 0.12);
}

.modal-ingredients[hidden] { display: none; }

.ingredients-back {
  flex: 0 0 auto;
  padding: 7px 13px;
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 800;
  color: #ffffff;
  background: #c8202f;
  border: none;
  border-radius: 999px;
  cursor: pointer;
}

.ingredients-back:hover { background: #a81825; }
.ingredients-list { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }

/* ------------------ Kolo nagrod ------------------ */
.wheel-modal {
  width: min(440px, 96vw);
  max-height: 94vh;
  background: linear-gradient(180deg, #0f3b40 0%, #10262c 55%, #0d1a20 100%);
  border-color: rgba(247, 199, 117, 0.55);
}

#wheel-modal-close {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  padding: 0 6px;
}

#wheel-modal-close:hover { color: #ee1c25; }

.wheel-body {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 26px;
  padding: 10px 24px 24px;
  overflow-y: auto;
}

.wheel-owned {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 260px;
  min-width: 240px;
  padding-top: 18px;
}

.wheel-owned h3 { margin: 0; font-size: 16px; font-weight: 800; color: #ffdc9f; }
.wheel-owned-list { display: flex; flex-direction: column; gap: 8px; }
.wheel-empty { margin: 0; font-size: 14px; color: var(--muted); }

.prize-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px 7px 7px;
  font-family: inherit;
  text-align: left;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.prize-chip:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
.prize-chip.on { border-color: #00b5b2; background: rgba(0, 181, 178, 0.16); }
.prize-chip:disabled { cursor: default; }

.prize-chip canvas {
  flex: none;
  width: 36px;
  height: 36px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #f2b632;
}

.prize-text { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.prize-text strong { font-size: 14px; }
.prize-text small { font-size: 11.5px; line-height: 1.3; color: var(--muted); }

.prize-chip em {
  flex: none;
  padding: 3px 8px;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
}

.prize-chip.on em { color: #06292b; background: #5fe0d8; border-color: #5fe0d8; }

/* podpowiedz klawisza skoku (sprezynowe buty) */
.jump-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  font-size: 13px;
  font-weight: 800;
  color: #b2f2bb;
  background: rgba(22, 27, 40, 0.9);
  border: 1px solid rgba(64, 192, 87, 0.6);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

.jump-badge[hidden] { display: none; }

.jump-badge kbd {
  min-width: 22px;
  padding: 2px 6px;
  font-family: inherit;
  font-size: 13px;
  text-align: center;
  color: #10131c;
  background: #b2f2bb;
  border-radius: 6px;
}


/* przycisk otwierajacy liste wygranych nagrod */
.wardrobe-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px 7px 9px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  color: #ffdc9f;
  background: rgba(22, 27, 40, 0.9);
  border: 1px solid rgba(247, 199, 117, 0.6);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  pointer-events: auto;
}

.wardrobe-badge[hidden] { display: none; }
.wardrobe-badge:hover { background: rgba(40, 48, 66, 0.95); }
.wardrobe-badge svg { width: 20px; height: 20px; }

/* plecak: schowana hulajnoga i podpowiedz klawisza H */
.pack-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px 6px 10px;
  font-size: 13px;
  font-weight: 800;
  color: #9fb0c8;
  background: rgba(22, 27, 40, 0.9);
  border: 1px solid rgba(159, 176, 200, 0.45);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

.pack-badge[hidden] { display: none; }
.pack-badge svg { width: 20px; height: 20px; }
.pack-badge.has-item { color: #7fd6e0; border-color: rgba(83, 182, 195, 0.7); }
.pack-badge .pack-text { color: #ffffff; }
.pack-badge.no-key kbd { display: none; }

.pack-badge kbd {
  min-width: 22px;
  padding: 2px 6px;
  font-family: inherit;
  font-size: 13px;
  text-align: center;
  color: #10131c;
  background: #9fb0c8;
  border-radius: 6px;
}

.pack-badge.has-item kbd { background: #7fd6e0; }

/* skroty specjalne w sklepie (wyszukiwarka, wozki, wyjscie): ikona bez bialego tla */
.dest-chip--compact .dest-icon {
  width: 20px;
  height: 20px;
  padding: 0;
  background: none;
  border-radius: 0;
}

/* ------------------ Przycisk zamykania okien ------------------ */
/* Jeden prosty przycisk we wszystkich oknach: duzy, wyrazny krzyzyk na jasniejszym
   tle, bez animacji; po najechaniu zmienia tylko kolor tla na czerwony. */
#modal-close,
#offer-detail-close,
#query-modal-close,
#awards-modal-close,
#dish-modal-close,
#wheel-modal-close,
#link-modal-close,
#share-modal-close {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 0; /* znak "×" z HTML zastepuje rysowany krzyzyk */
  line-height: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: none;
  border-radius: 10px;
  outline: none;
  cursor: pointer;
  transition: background 0.12s ease;
}

#modal-close::before,
#offer-detail-close::before,
#query-modal-close::before,
#awards-modal-close::before,
#dish-modal-close::before,
#wheel-modal-close::before,
#link-modal-close::before,
#share-modal-close::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 3l10 10M13 3L3 13' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 3l10 10M13 3L3 13' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

#modal-close:hover,
#offer-detail-close:hover,
#query-modal-close:hover,
#awards-modal-close:hover,
#dish-modal-close:hover,
#wheel-modal-close:hover,
#link-modal-close:hover,
#modal-close:focus-visible:hover,
#offer-detail-close:focus-visible:hover,
#query-modal-close:focus-visible:hover,
#awards-modal-close:focus-visible:hover,
#dish-modal-close:focus-visible:hover,
#wheel-modal-close:focus-visible:hover,
#link-modal-close:focus-visible:hover,
#share-modal-close:hover { background: #e5484d; color: #ffffff; } /* starsze reguly okien barwily tu krzyzyk na czerwono */

#modal-close:focus-visible,
#offer-detail-close:focus-visible,
#query-modal-close:focus-visible,
#awards-modal-close:focus-visible,
#dish-modal-close:focus-visible,
#wheel-modal-close:focus-visible,
#link-modal-close:focus-visible,
#share-modal-close:focus-visible { background: rgba(255, 255, 255, 0.28); }

#product-modal.fish #modal-close { color: #ffffff; }

.minimap-canvas { cursor: pointer; }

/* ------------------ Przycisk muzyki (lewy gorny rog okna gry) ------------------ */
.music-toggle {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: #ffffff;
  background: rgba(22, 27, 40, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: background 0.15s ease;
}

.music-toggle:hover { background: #2a9aa8; }
.music-toggle svg { width: 22px; height: 22px; }
.music-toggle.off { color: rgba(255, 255, 255, 0.55); }

/* ------------------ Udostepnianie listy (zapowiedz funkcji) ------------------ */
.cart-share { padding: 10px 14px; border-top: 1px solid var(--line); }

.cart-share-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 800;
  color: #ffffff;
  background: #2a9aa8;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cart-share-button:hover { background: #1f7f8b; }
.cart-share-button svg { width: 18px; height: 18px; }

.cart-share-button em,
.share-soon {
  padding: 2px 7px;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #3b2a00;
  background: #ffd43b;
  border-radius: 999px;
}

.share-soon { margin-left: 8px; vertical-align: middle; }
.share-modal { width: min(600px, 94vw); max-height: 94vh; }

.share-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 24px 24px;
  overflow-y: auto;
}

.share-body p { margin: 0; font-size: 14px; line-height: 1.5; }
.share-lead { font-size: 15px !important; }
.share-summary { color: var(--muted); }
.share-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }

.share-qr-wrap {
  position: relative;
  flex: 0 0 auto;
  padding: 10px;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
}

#share-qr { display: block; width: 150px; height: 150px; opacity: 0.35; }

.share-stamp {
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 5px 14px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #3b2a00;
  background: #ffd43b;
  border-radius: 6px;
  transform: translate(-50%, -50%) rotate(-12deg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.share-steps {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
}

.share-steps strong { color: var(--text); }

.share-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.share-link-url { flex: 1; min-width: 0; font-size: 13.5px; color: var(--muted); }

.share-link button {
  padding: 8px 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: not-allowed;
}

.share-note {
  padding: 10px 14px;
  font-size: 13px !important;
  color: #ffe9a8;
  background: rgba(255, 212, 59, 0.1);
  border: 1px solid rgba(255, 212, 59, 0.35);
  border-radius: 10px;
}

.share-ok { align-self: center; margin-top: 0; border: none; cursor: pointer; font-family: inherit; }

.cart-share[hidden] { display: none; }

/* ------------------ Okna mieszcza sie w obrebie gry ------------------ */
/* Kazde okno dialogowe zajmuje najwyzej wysokosc okna gry razem z belka
   skrotow pod nim (zmienne ustawia js/main.js) i jest w tym obszarze
   wysrodkowane w pionie. Zbyt dluga tresc przewija sie w srodku okna. */
dialog:modal {
  top: var(--stage-top, 16px);
  bottom: var(--stage-bottom, 16px);
  margin-block: auto;
  height: fit-content;
  max-height: var(--stage-height, calc(100vh - 32px)) !important;
}

.awards-modal, .dish-modal, .wheel-modal, .query-modal { overflow-y: auto; }
