/* ==========================================================
   WEB — Internet Exploiter i udawane strony z js/web/
   ========================================================== */

/* ---------- Okno przeglądarki ---------- */
.ie {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  container-type: inline-size;
}
.ie__toolbar { position: relative; padding-right: 40px; }
.ie__toolbar .btn:disabled { color: var(--shadow); text-shadow: 1px 1px var(--light); cursor: default; }
.ie__toolbar .btn--flat:disabled:hover { box-shadow: none; }
@container (max-width: 520px) {
  .ie__opt { display: none; }
}

/* logo w prawym górnym rogu — "kręci się", gdy strona się ładuje */
.ie__throbber {
  position: absolute;
  right: 2px;
  top: 0;
  width: 32px;
  height: 32px;
  padding: 2px;
  background: #000;
  box-shadow: var(--bevel-thin-in);
  image-rendering: pixelated;
}
.ie__throbber.is-loading { animation: ie-spin 0.6s steps(4) infinite; }
@keyframes ie-spin {
  50% { filter: hue-rotate(180deg) brightness(1.3); transform: scale(0.9); }
}

.ie__address-row { display: flex; align-items: center; gap: 6px; padding: 0 2px; }
.ie__address { flex: 1; min-width: 0; font-size: 13px; padding: 3px 4px; }

.ie__view {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #fff;
  box-shadow: var(--bevel-field);
  padding: 2px;
  outline: none;
}
.ie .statusbar { flex: 0 0 auto; }
.ie__zone { flex: 0 0 auto !important; }
.ie__status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ie__fav-wrap { position: relative; }
.ie__favorites {
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 5;
  min-width: 220px;
  margin: 0;
  padding: 2px;
  list-style: none;
  background: var(--face);
  box-shadow: var(--bevel-out);
}
.ie__favorites img { width: 16px; height: 16px; }
.ie__favorites img[src$=".png"] { image-rendering: auto; } /* logo (np. Playdate) gładko, nie w pikselach */

/* okienka (Security Alert, automatyczna sekretarka) */
.ie__modal {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.15);
}
.ie__dialog {
  position: relative;
  width: min(360px, 100%);
  min-height: 0;
  animation: none;
}
.ie__dialog-body { display: flex; gap: 14px; padding: 14px 12px 4px; }
.ie__dialog-body p { margin: 0 0 6px; overflow-wrap: anywhere; }
.ie__dialog-icon { width: 32px; height: 32px; image-rendering: pixelated; flex: 0 0 auto; }
.ie__dialog-actions { display: flex; justify-content: center; gap: 8px; padding: 8px 0 10px; }
.ie__dialog-actions .btn { min-width: 76px; }

/* ---------- Wspólne dla stron ---------- */
.site {
  min-height: 100%;
  padding: 16px clamp(12px, 4cqi, 32px) 24px;
  font-family: "Times New Roman", Times, serif;
  font-size: 16px;
  line-height: 1.4;
  color: #000;
}
.site a { color: #0000ee; }
.site a:visited { color: #551a8b; }

.web__construction {
  display: inline-block;
  margin: 8px 0;
  padding: 4px 10px;
  font: 700 13px/1 Arial, sans-serif;
  letter-spacing: 1px;
  color: #000;
  background: #ffd800;
  border: 3px solid transparent;
  border-image: repeating-linear-gradient(45deg, #000 0 6px, #ffd800 6px 12px) 3;
  animation: web-blink 1s steps(1) infinite;
}
@keyframes web-blink { 50% { opacity: 0.4; } }

.web__counter {
  display: inline-block;
  padding: 1px 4px;
  font-family: var(--font-mono);
  font-size: 20px;
  letter-spacing: 2px;
  color: #ff2020;
  background: #000;
  border: 2px inset #808080;
}

/* ---------- Portal (strona startowa) ---------- */
.site--home {
  background: #fffff0;
}
.site--home h1 { margin: 0 0 4px; color: #000080; font-size: 30px; }
.portal__lead { margin: 0; font-style: italic; }
.site--home h2 { font-size: 20px; margin: 12px 0 6px; }

/* ---------- Gepetto's Chop Shop ---------- */
.site--gepetto {
  color: #e6e6e6;
  background-color: #111;
  /* kafelkowe tło "blacha z nitami" */
  background-image:
    radial-gradient(circle at 4px 4px, #3a3a3a 0 1.5px, transparent 2px),
    repeating-linear-gradient(0deg, #161616 0 1px, transparent 1px 4px);
  background-size: 24px 24px, auto;
}
.site--gepetto a { color: #66ccff; }
.site--gepetto a:visited { color: #cc99ff; }
.site--gepetto p { max-width: 64ch; }

.gep__sign {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 520px;
  margin: 0 auto 14px;
  padding: 12px 20px;
  background: linear-gradient(#3b3f45, #23262a);
  border: 3px solid #0a0a0a;
  box-shadow: inset 0 0 0 2px #5a6068, 0 4px 0 #000;
}
.gep__sign-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  font-family: "Silkscreen", var(--font-title);
  font-weight: 400;
  color: #f2f2f2;
  line-height: 1;
}
.gep__sign-name { font-size: clamp(26px, 7cqi, 44px); font-weight: 700; letter-spacing: 2px; }
.gep__sign-sub { margin-top: 6px; font-size: clamp(10px, 2.4cqi, 15px); letter-spacing: 1px; }
.gep__gear {
  width: clamp(36px, 9cqi, 56px);
  height: auto;
  image-rendering: pixelated;
  animation: gep-spin 6s steps(16) infinite;
}
@keyframes gep-spin { to { transform: rotate(360deg); } }

.gep__marquee {
  overflow: hidden;
  white-space: nowrap;
  margin: 0 0 16px;
  padding: 3px 0;
  font: 700 14px "Courier New", monospace;
  color: #ff3030;
  background: #000;
  border-top: 1px solid #ff3030;
  border-bottom: 1px solid #ff3030;
}
.gep__marquee span {
  display: inline-block;
  padding-left: 100%;
  animation: gep-marquee 14s linear infinite;
}
@keyframes gep-marquee { to { transform: translateX(-100%); } }

.gep__hr {
  border: 0;
  height: 4px;
  margin: 18px 0;
  background: repeating-linear-gradient(90deg, #ffd800 0 10px, #000 10px 20px);
}
.gep__h2 { font: 700 18px "Courier New", monospace; color: #ffd800; margin: 0 0 8px; }
.gep__list { padding-left: 22px; max-width: 64ch; }
.gep__list li { margin-bottom: 8px; }
.gep__list b { color: #fff; }

.gep__footer { margin-top: 24px; text-align: center; }
.gep__footer p { margin: 6px auto; }
.gep__small { font-size: 12px; color: #9a9a9a; }

/* ---------- L'omino's Toyland ---------- */
.site--toyland {
  font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", cursive;
  color: #2a0040;
  background-color: #ffe3f3;
  /* kafelki w gwiazdki jak w sklepie z zabawkami z lat 90 */
  background-image:
    radial-gradient(circle at 10px 10px, #ffd800 0 2px, transparent 3px),
    radial-gradient(circle at 30px 30px, #6ad1ff 0 2px, transparent 3px);
  background-size: 40px 40px;
}
.site--toyland a { color: #c4007a; }

.toy__header { text-align: center; margin-bottom: 14px; }
.toy__logo {
  margin: 0;
  font-family: "Press Start 2P", var(--font-title);
  font-weight: 400;
  font-size: clamp(18px, 5cqi, 32px);
  line-height: 1.3;
  /* "WordArt": tęczowe litery z grubym cieniem */
  background: linear-gradient(90deg, #ff2bd6, #ff8a00, #ffd800, #28d36a, #1c9bff, #8a3dff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(3px 3px 0 #2a0040);
}
.toy__tagline {
  display: inline-block;
  margin: 10px 0 0;
  padding: 2px 10px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  background: #c4007a;
  transform: rotate(-2deg);
}

.toy__intro {
  max-width: 68ch;
  margin: 0 auto 18px;
  padding: 10px 16px;
  background: #fff;
  border: 3px dashed #ff2bd6;
}
.toy__intro p { margin: 6px 0; }

.toy__h2 {
  margin: 0 0 10px;
  font-size: 22px;
  color: #c4007a;
  text-align: center;
  animation: web-blink 1.2s steps(1) infinite;
}

.toy__products {
  max-width: 68ch;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  counter-reset: toy;
}
.toy__product {
  position: relative;
  margin-bottom: 12px;
  padding: 10px 14px 12px 52px;
  background: #fffbe0;
  border: 2px solid #2a0040;
  box-shadow: 4px 4px 0 #6ad1ff;
  counter-increment: toy;
}
.toy__product::before {
  content: "#" counter(toy);
  position: absolute;
  left: 10px;
  top: 10px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  font: 700 14px Arial, sans-serif;
  color: #fff;
  background: #ff2bd6;
  border-radius: 50%;
  transform: rotate(-12deg);
}
.toy__product h3 { margin: 0 0 4px; font-size: 17px; }
.toy__product small { font-size: 13px; font-weight: 400; }
.toy__product p { margin: 0 0 8px; }
.toy__buy {
  font: 700 13px Arial, sans-serif;
  padding: 4px 12px;
  color: #000;
  background: #ffd800;
  border: 2px outset #ffe866;
  cursor: pointer;
}
.toy__buy:active { border-style: inset; }

.toy__footer {
  max-width: 68ch;
  margin: 20px auto 0;
  font-size: 12px;
  text-align: center;
  color: #6a3a7a;
}

/* ---------- Fox & Cat Corp. ---------- */
.site--foxcat {
  font-family: "Courier New", Courier, monospace;
  font-size: 15px;
  color: #b8b8b8;
  background: #050505;
}
.site--foxcat p { max-width: 64ch; }
.fox__logo {
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: clamp(32px, 9cqi, 56px);
  line-height: 1;
  letter-spacing: 4px;
  color: #fff;
  border-bottom: 2px solid #8b0000;
  padding-bottom: 8px;
}
.fox__warning {
  padding: 6px 10px;
  color: #ff4040;
  border: 1px solid #ff4040;
  animation: web-blink 1.4s steps(1) infinite;
}
.fox__getlost { color: #fff; font-weight: 700; }
.fox__info { margin: 22px 0; }
.fox__row { margin: 4px 0; }
.fox__redacted {
  display: inline-block;
  padding: 0 6px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #ff4040;
  border: 2px solid #ff4040;
  transform: rotate(-3deg);
}
.fox__footer { margin-top: 28px; font-size: 11px; color: #555; }

/* ---------- Błąd "serwer nie odpowiada" ---------- */
.site--enforcers {
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 13px;
  background: #fff;
}
.err { max-width: 60ch; }
.err__title { margin: 0 0 12px; font-size: 18px; color: #000; }
.err hr { border: 0; border-top: 1px solid #c0c0c0; margin: 12px 0; }
.err ul { padding-left: 22px; }
.err__code { margin-top: 24px; color: #808080; }

/* ---------- Reklama-popup PINOCCH10 ---------- */
.ad {
  position: absolute;
  z-index: 8;
  width: 230px;
  min-width: 0;
  min-height: 0;
  animation: none;
}
/* na telefonie okna idą na cały ekran (window.css) — reklama zostaje mała */
@media (max-width: 640px) {
  .window.ad {
    right: auto !important;
    bottom: auto !important;
    width: min(200px, 70%) !important;
    height: auto !important;
  }
  .ad .window__titlebar { height: auto; }
  .ad__title { font-size: 13px; }
  .ad__line { font-size: 15px; }
}
.ad__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 3px;
  padding: 0 0 10px;
  border: 0;
  background: #000;
  color: #fff;
  cursor: pointer;
  text-align: center;
}
.ad__img { width: 100%; aspect-ratio: 5 / 3; object-fit: cover; image-rendering: pixelated; }
.ad__title { font-family: var(--font-title); font-size: 16px; }
.ad__line { font-family: var(--font-mono); font-size: 18px; color: #ffb81c; letter-spacing: 1px; }
.ad__cta {
  padding: 2px 10px;
  font: 700 13px Arial, sans-serif;
  color: #000;
  background: var(--brand-pink);
  animation: web-blink 0.8s steps(1) infinite;
}
.ad__body:hover .ad__cta { background: #fff; }

@media (prefers-reduced-motion: reduce) {
  .gep__marquee span, .gep__gear, .web__construction, .toy__h2, .fox__warning, .ad__cta, .ie__throbber.is-loading { animation: none; }
  .gep__marquee span { padding-left: 0; }
}
