/* Wygląd elementów interaktywnych (wspólny dla strony i edytora) */
.wid { margin: 16px 0; clear: both; }

/* ---------- przyciski ---------- */
.btn-aero {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none !important;
  font-weight: 700; color: #fff !important; border-radius: 999px; border: 1px solid rgba(0,0,0,.25);
  text-shadow: 0 1px 1px rgba(0,0,0,.35); position: relative; overflow: hidden; line-height: 1.2;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 4px 12px rgba(0,50,110,.28);
  transition: transform .12s, filter .15s; -webkit-text-fill-color: #fff;
}
.btn-aero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 50%; background: linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.12)); pointer-events: none; }
.btn-aero:hover { filter: brightness(1.08) saturate(1.1); transform: translateY(-1px); }
.btn-aero:active { transform: translateY(1px); }
.btn-maly { padding: 6px 14px; font-size: 13px; }
.btn-sredni { padding: 10px 22px; font-size: 16px; }
.btn-duzy { padding: 15px 34px; font-size: 20px; }
.btn-niebieski { background: linear-gradient(180deg, #8fe0ff, #1d94ec 55%, #0b74d1); border-color: #0a63b3; }
.btn-zielony { background: linear-gradient(180deg, #c9ff9a, #5cc93a 55%, #2f9a1c); border-color: #2a7f1a; }
.btn-rozowy { background: linear-gradient(180deg, #ffc4e4, #ff5fae 55%, #e0338a); border-color: #c22777; }
.btn-pomarancz { background: linear-gradient(180deg, #ffd99a, #ff9a2e 55%, #e6700f); border-color: #c95f0b; }
.btn-fiolet { background: linear-gradient(180deg, #e1c8ff, #9a5cff 55%, #6d32d9); border-color: #5a28b5; }
.btn-czerwony { background: linear-gradient(180deg, #ffb3b3, #f0433a 55%, #c61f17); border-color: #a51911; }
.btn-ciemny { background: linear-gradient(180deg, #5c6b7a, #23303d 55%, #121a22); border-color: #0b1117; }
.btn-szklo { background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.3)); color: #0a4f8f !important; -webkit-text-fill-color: #0a4f8f; text-shadow: none; border-color: rgba(255,255,255,.95); backdrop-filter: blur(10px); }
.btn-ikona { font-size: 1.15em; }

/* ---------- muzyka ---------- */
.muz { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.8), rgba(220,240,255,.55)); border: 1px solid rgba(255,255,255,.95);
  box-shadow: 0 8px 24px rgba(0,50,110,.2), inset 0 1px 0 #fff; backdrop-filter: blur(14px); color: #0b2a45; }
.muz-ciemny { background: linear-gradient(180deg, rgba(30,45,60,.92), rgba(10,18,28,.9)); color: #e8f4ff; border-color: rgba(255,255,255,.2); }
.muz-rozowy { background: linear-gradient(180deg, rgba(255,225,240,.9), rgba(255,170,210,.7)); }
.muz-okladka { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; flex: none; display: grid; place-items: center; font-size: 30px; color: #fff;
  background: linear-gradient(180deg, #8fe0ff, #1d94ec); box-shadow: 0 3px 10px rgba(0,50,110,.3); }
.muz-okladka img { width: 100%; height: 100%; object-fit: cover; }
.muz-srodek { flex: 1; min-width: 0; }
.muz-tytul { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.muz-wyk { font-size: 13px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.muz-pasek { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-top: 4px; }
.muz-postep { flex: 1; min-width: 40px; accent-color: #1d94ec; }
.muz-przyciski { display: flex; align-items: center; gap: 6px; flex: none; }
.muz-play, .muz-wycisz { width: 42px; height: 42px; border-radius: 50%; border: 1px solid #0a63b3; cursor: pointer; font-size: 17px; color: #fff;
  background: linear-gradient(180deg, #8fe0ff, #1d94ec 55%, #0b74d1); box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 3px 8px rgba(0,50,110,.3); }
.muz-wycisz { width: 34px; height: 34px; font-size: 14px; }
.muz-glosnosc { width: 70px; accent-color: #1d94ec; }
.wid-muzyka.w-tle { display: none; }
.muz-plywajacy { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 6px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(210,236,255,.7)); border: 1px solid #fff; box-shadow: 0 8px 22px rgba(0,40,90,.3); backdrop-filter: blur(12px); font-size: 13px; color: #0b2a45; max-width: calc(100vw - 36px); }
.muz-plywajacy button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #0a63b3; color: #fff; cursor: pointer; font-size: 15px;
  background: linear-gradient(180deg, #8fe0ff, #1d94ec 55%, #0b74d1); box-shadow: inset 0 1px 0 rgba(255,255,255,.8); }
.pl-tytul { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
@media (max-width: 520px) { .muz { flex-wrap: wrap; } .muz-glosnosc { display: none; } .pl-tytul { max-width: 110px; } }

/* ---------- filmy i osadzenia ---------- */
.film-ramka { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 10px 28px rgba(0,40,90,.3); }
.film-ramka iframe, .film-ramka video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.osadz-iframe { width: 100%; border: 0; border-radius: 14px; display: block; box-shadow: 0 8px 24px rgba(0,40,90,.2); background: rgba(255,255,255,.4); }

/* ---------- okno HTML / gra (okno w stylu Visty) ---------- */
.okno-aero { border-radius: 12px; overflow: hidden; border: 1px solid rgba(0,40,80,.45);
  box-shadow: 0 14px 36px rgba(0,30,70,.35), inset 0 0 0 1px rgba(255,255,255,.5); background: rgba(160,210,240,.55); backdrop-filter: blur(10px); padding: 0 7px 7px; }
.okno-aero.bez-ramki { padding: 0; background: none; border: 0; }
.okno-pasek { display: flex; align-items: center; justify-content: space-between; height: 34px; color: #fff; text-shadow: 0 0 8px #000, 0 1px 2px #000; font-size: 14px; font-weight: 600; padding: 0 2px 0 6px; }
.okno-btns { display: flex; gap: 3px; }
.okno-btns button { height: 22px; min-width: 30px; border-radius: 4px; border: 1px solid rgba(0,30,60,.55); color: #fff; font-size: 13px; cursor: pointer;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.15) 50%, rgba(0,30,70,.25) 51%, rgba(255,255,255,.25)); text-shadow: 0 1px 2px #000; }
.okno-btns .okno-pelny:hover { background: linear-gradient(180deg, #ffb0a0, #e0442a 50%, #b8200a 51%, #e86a50); }
.okno-iframe { width: 100%; display: block; border: 1px solid rgba(0,30,60,.5); border-radius: 3px; background: #fff; }
.okno-aero:fullscreen { padding: 0 7px 7px; display: flex; flex-direction: column; }
.okno-aero:fullscreen .okno-iframe { flex: 1; height: auto !important; }

/* ---------- wyskakujące okienko ---------- */
.popup-wyzwalacz { cursor: pointer; }
.popup-okno { display: none; }
.popup-tlo { position: fixed; inset: 0; z-index: 100; background: rgba(0,30,70,.35); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; animation: pojaw .18s; }
@keyframes pojaw { from { opacity: 0; } }
.popup-okno.otwarte { display: block; width: min(var(--szer, 520px), 100%); max-height: 86vh; overflow: auto; border-radius: 18px; color: #0b2a45;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(225,243,255,.9)); border: 1px solid #fff; box-shadow: 0 20px 50px rgba(0,30,70,.45); animation: wysun .2s; }
@keyframes wysun { from { transform: translateY(16px) scale(.97); opacity: 0; } }
.popup-glowa { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; position: sticky; top: 0;
  background: linear-gradient(180deg, #8fe0ff, #1d94ec 55%, #0b74d1); color: #fff; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.popup-x { width: 30px; height: 26px; display: grid; place-items: center; border-radius: 5px; cursor: pointer; border: 1px solid rgba(120,0,0,.6);
  background: linear-gradient(180deg, #ffb0a0, #e0442a 50%, #b8200a 51%, #e86a50); }
.popup-tresc { padding: 16px 20px; }
.popup-tresc > :last-child { margin-bottom: 0; }

/* ---------- zakładki ---------- */
.zakl-pasek { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: -1px; position: relative; z-index: 1; }
.zakl-btn { padding: 8px 18px; border-radius: 12px 12px 0 0; border: 1px solid rgba(10,90,170,.3); border-bottom: 0; cursor: pointer; font: inherit; font-weight: 600;
  background: linear-gradient(180deg, rgba(255,255,255,.6), rgba(200,230,255,.5)); color: #0a4f8f; }
.zakl-btn.akt { background: linear-gradient(180deg, #8fe0ff, #1d94ec 55%, #0b74d1); color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.3); }
.zakl-gotowe > .zakl { display: none; }
.zakl-gotowe > .zakl.akt { display: block; }
.zakl-gotowe .zakl-tytul { display: none; }
.zakl-tresc { padding: 16px 18px; border-radius: 0 14px 14px 14px; border: 1px solid rgba(10,90,170,.3); background: rgba(255,255,255,.55); backdrop-filter: blur(10px); }
.zakl-tresc > :last-child { margin-bottom: 0; }
.zakl-tytul { font-weight: 700; color: #0a4f8f; margin: 10px 0 4px; }

/* ---------- rozwijana sekcja ---------- */
.wid-rozwijana { border-radius: 14px; border: 1px solid rgba(10,90,170,.25); background: rgba(255,255,255,.5); overflow: hidden; }
.rozw-tytul { padding: 12px 16px 12px 40px; font-weight: 700; cursor: pointer; position: relative; color: #0a4f8f;
  background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(210,236,255,.6)); }
.rozw-tytul::before { content: "▸"; position: absolute; left: 16px; transition: transform .2s; }
.wid-rozwijana.otwarta .rozw-tytul::before { transform: rotate(90deg); }
.rozw-tresc { display: none; padding: 12px 16px; }
.wid-rozwijana.otwarta .rozw-tresc { display: block; }
.rozw-tresc > :last-child { margin-bottom: 0; }

/* ---------- quiz ---------- */
.quiz { border-radius: 18px; overflow: hidden; border: 1px solid rgba(255,255,255,.95); background: linear-gradient(180deg, rgba(255,255,255,.85), rgba(225,243,255,.65));
  box-shadow: 0 10px 28px rgba(0,50,110,.2); backdrop-filter: blur(12px); }
.quiz-glowa { display: flex; justify-content: space-between; padding: 12px 18px; color: #fff; font-weight: 700; text-shadow: 0 1px 2px rgba(0,0,0,.3);
  background: linear-gradient(180deg, #c9ff9a, #5cc93a 55%, #2f9a1c); }
.quiz-cialo { padding: 18px; }
.quiz-pyt { font-size: 1.15em; font-weight: 700; margin-bottom: 12px; }
.quiz-odp { display: grid; gap: 8px; }
.quiz-o { text-align: left; padding: 11px 16px; border-radius: 12px; border: 1px solid rgba(10,90,170,.3); background: rgba(255,255,255,.85); cursor: pointer; font: inherit; color: inherit; transition: .15s; }
.quiz-o:hover:not(:disabled) { background: #e3f4ff; border-color: #1d94ec; }
.quiz-o.dobra { background: #d9ffc9; border-color: #3fae2a; font-weight: 700; }
.quiz-o.zla { background: #ffd9d6; border-color: #e0442a; }
.quiz-info { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.quiz-info:empty { display: none; }
.quiz-wynik { text-align: center; display: grid; gap: 10px; justify-items: center; }
.quiz-wynik-liczba { font-size: 44px; font-weight: 800; color: #0a84ff; }

/* ---------- galeria ---------- */
.gal-pokaz { position: relative; overflow: hidden; border-radius: 16px; height: var(--h, 420px); background: #0b2a45; box-shadow: 0 10px 28px rgba(0,40,90,.3); }
.gal-tasma { display: flex; height: 100%; transition: transform .45s ease; }
.gal-slajd { flex: 0 0 100%; margin: 0; position: relative; height: 100%; }
.gal-pokaz .gal-slajd img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-slajd figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 30px; color: #fff; text-shadow: 0 1px 3px #000; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.gal-l, .gal-p { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.9); cursor: pointer;
  font-size: 26px; line-height: 1; color: #fff; background: rgba(255,255,255,.28); backdrop-filter: blur(8px); text-shadow: 0 1px 3px #000; }
.gal-l { left: 12px; } .gal-p { right: 12px; }
.gal-kropki { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 7px; }
.gal-kropki span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; box-shadow: 0 0 3px rgba(0,0,0,.5); }
.gal-kropki span.akt { background: #fff; }
.gal-siatka { display: grid; grid-template-columns: repeat(var(--kol, 3), 1fr); gap: 10px; }
.gal-siatka .gal-slajd img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; display: block; box-shadow: 0 4px 12px rgba(0,40,90,.2); }
.gal-siatka figcaption { position: static; padding: 4px 2px; background: none; color: inherit; text-shadow: none; font-size: 13px; }
.gal-pusta { padding: 30px; text-align: center; border: 2px dashed rgba(10,90,170,.3); border-radius: 14px; }
.gal-lightbox { cursor: zoom-out; }
.gal-lightbox img { max-width: 94vw; max-height: 86vh; border-radius: 10px; box-shadow: 0 20px 50px rgba(0,0,0,.5); }
.gal-lb-podpis { color: #fff; text-align: center; margin-top: 8px; text-shadow: 0 1px 3px #000; }
@media (max-width: 600px) { .gal-siatka { grid-template-columns: repeat(2, 1fr); } .gal-pokaz { height: min(var(--h, 420px), 60vw); } }

/* ---------- odliczanie ---------- */
.odl { text-align: center; padding: 18px; border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.8), rgba(220,240,255,.55)); border: 1px solid #fff; box-shadow: 0 8px 24px rgba(0,50,110,.18); }
.odl-tytul { font-weight: 700; margin-bottom: 10px; }
.odl-licz { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.odl-licz span { min-width: 74px; padding: 10px 8px; border-radius: 14px; color: #fff; display: grid; text-shadow: 0 1px 2px rgba(0,0,0,.35);
  background: linear-gradient(180deg, #8fe0ff, #1d94ec 55%, #0b74d1); box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 4px 10px rgba(0,50,110,.25); }
.odl-licz b { font-size: 30px; line-height: 1.1; }
.odl-licz i { font-style: normal; font-size: 12px; }
.odl-koniec { display: none; font-size: 26px; font-weight: 800; color: #0a84ff; }
.odl-zielony .odl-licz span { background: linear-gradient(180deg, #c9ff9a, #5cc93a 55%, #2f9a1c); }
.odl-rozowy .odl-licz span { background: linear-gradient(180deg, #ffc4e4, #ff5fae 55%, #e0338a); }
