body { font-family: system-ui, Arial; margin: 0; background: #0b0b10; color: #f2f2f7; }
a { color: #b7a6ff; text-decoration: none; }
.wrap{
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 40px 12px; /* ↓ dół */
}
.top { display:flex; justify-content:space-between; align-items:center; padding: 16px 24px; background:#121225; position:sticky; top:0; }
.brand { font-weight: 800; letter-spacing: .5px; }
.menu a { margin-left: 14px; opacity: .9; }
.menu a:hover { opacity: 1; text-decoration: underline; }

/* ✅ DOMYŚLNIE: MEDIA = SIATKA */
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

/* ✅ WYJĄTEK: PODSTRONA PIOSENKI = LISTA (bez siatki)
   Wykrycie po elementach typowych dla piosenki */
.grid:has(.lyrics),
.grid:has(.lyricsWrap),
.grid:has(.authorComment){
  display:block;
}
.grid:has(.lyrics) > *,
.grid:has(.lyricsWrap) > *,
.grid:has(.authorComment) > *{
  margin-bottom: 14px;
}

.card { background:#14142a; border:1px solid #24244a; border-radius:12px; padding:14px; }
.cover { width:100%; height:180px; object-fit:cover; border-radius:10px; border:1px solid #2b2b55; }
.row { display:flex; gap:10px; margin-top: 10px; flex-wrap:wrap; }
.btn { display:inline-block; padding:10px 12px; background:#2b2b55; border-radius:10px; }
.btn:hover { filter: brightness(1.1); }
.form label { display:block; margin: 12px 0; }
.form input, .form textarea { width:100%; padding:10px; border-radius:10px; border:1px solid #2b2b55; background:#0f0f1f; color:#fff; }
.ok { padding:10px; background:#153a1d; border:1px solid #2b7a3a; border-radius:10px; }
.err { padding:10px; background:#3a1515; border:1px solid #7a2b2b; border-radius:10px; }
.footer{
  opacity:.7;
  padding: 12px 24px 24px;
  text-align:center;
}
.list { line-height: 1.6; }
.tag { font-size:12px; opacity:.8; }
.cmsbar { display:flex; gap:10px; flex-wrap:wrap; margin: 8px 0 18px; }
.tablewrap { overflow:auto; border:1px solid #24244a; border-radius:12px; background:#14142a; }
.table { width:100%; border-collapse: collapse; min-width: 720px; }
.table th, .table td { padding: 10px 12px; border-bottom:1px solid #24244a; vertical-align: top; }
.table th { text-align:left; opacity:.9; font-weight:700; }
.actions { white-space: nowrap; }
.small { padding:8px 10px; border-radius:10px; font-size: 14px; }
.danger { background:#5a1f2a; }
.ghost { background: transparent; border:1px solid #2b2b55; }
.pill { display:inline-block; padding:4px 8px; border-radius:999px; background:#2b2b55; font-size:12px; }
.okpill { background:#2b7a3a; }
.muted { opacity:.8; }
.grid2 { display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.check { display:flex; align-items:center; gap:10px; padding: 10px 0; }
.form select { width:100%; padding:10px; border-radius:10px; border:1px solid #2b2b55; background:#0f0f1f; color:#fff; }
.lyrics{
  white-space: pre-wrap;
  background:#0f0f1f;
  border:1px solid #2b2b55;
  border-radius:10px;
  padding:10px;
  margin:10px 0 0;
  line-height:1.5;
  font-size:14px;
}
/* Lyrics: read more */
.lyricsWrap { margin-top: 10px; }
.lyrics{
  white-space: pre-wrap;
  background:#0f0f1f;
  border:1px solid #2b2b55;
  border-radius:10px;
  padding:10px;
  margin:10px 0 8px;
  line-height:1.5;
  font-size:14px;
}
.lyrics.collapsed{
  max-height: 220px;
  overflow: hidden;
  position: relative;
}
.lyrics.collapsed::after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:0;
  height:70px;
  background: linear-gradient(transparent, #0f0f1f);
}

/* Responsive YouTube embed */
.videoWrap{
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  border-radius: 12px;
  overflow: hidden;
  border:1px solid #2b2b55;
  background:#0f0f1f;
  margin: 10px 0 0;
}
.videoWrap iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}

/* Optional inline audio player */
.player{
  width: 100%;
  margin-top: 10px;
}

/* Button variants used here */
.small { padding:8px 10px; border-radius:10px; font-size: 14px; }
.ghost { background: transparent; border:1px solid #2b2b55; }

.videoWrap{
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  border:1px solid #2b2b55;
  background:#0f0f1f;
  margin: 12px 0 0;
}
.videoWrap iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}
.spotifyWrap{
  margin: 12px 0 0;
  border-radius: 12px;
  overflow: hidden;
  border:1px solid #2b2b55;
  background:#0f0f1f;
}
.lyrics.full{
  max-height: none;
}
.player{ width:100%; margin-top:10px; }
.muted{ opacity:.8; }

.videoWrap{
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  border:1px solid #2b2b55;
  background:#0f0f1f;
  margin: 12px 0 0;
}
.videoWrap iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}
.spotifyWrap{
  margin: 12px 0 0;
  border-radius: 12px;
  overflow: hidden;
  border:1px solid #2b2b55;
  background:#0f0f1f;
}
.lyrics{
  white-space: pre-wrap;
  background:#0f0f1f;
  border:1px solid #2b2b55;
  border-radius:10px;
  padding:10px;
  margin:10px 0 0;
  line-height:1.5;
  font-size:14px;
}
.lyrics.full{ max-height:none; }
.muted{ opacity:.8; }
.small { padding:8px 10px; border-radius:10px; font-size: 14px; }
.ghost { background: transparent; border:1px solid #2b2b55; }

.authorComment{
  margin: 16px 0;
  padding: 14px;
  border-left: 4px solid #b7a6ff;
  background: #121225;
  border-radius: 10px;
}
.authorComment strong{
  display:block;
  margin-bottom:6px;
  opacity:.85;
}
.authorComment p{
  margin:0;
  line-height:1.5;
  opacity:.95;
}
.mediaLink { display:block; }
.mediaThumbWrap{
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #2b2b55;
  background:#0f0f1f;
}
.mediaThumb{
  width:100%;
  height: 240px;
  object-fit: cover;
  display:block;
}
.mediaThumb.placeholder{
  height: 240px;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:.7;
  font-size:14px;
}
.mediaPill{
  position:absolute;
  top:10px;
  right:10px;
  backdrop-filter: blur(6px);
}
.wrap + .wrap {
  padding-top: 0;
}

.banner img{
  display:block;
  max-width:100%;
  height:auto;
}

/* żeby pierwszy nagłówek nie robił dziury */
.wrap > h1:first-child{
  margin-top:0;
}

/* ---------------------------------------------------------------------------------------------- */

/* ====== THEME: przeniesiony klimat ze statycznej (dopisek na koniec) ====== */

:root{
  --bg1:#07081a;
  --bg2:#0b0d22;
  --violet:#6e5aa6;
  --text:#e9e9f2;
  --muted:#b9b9d3;
  --line:rgba(255,255,255,.10);
  --line2:rgba(255,255,255,.06);
}

html,body{height:100%}
body{
  color:var(--text);

  /* tło jak w statycznej */
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(110,90,166,.35), transparent 60%),
    radial-gradient(900px 500px at 10% 30%, rgba(110,90,166,.18), transparent 60%),
    radial-gradient(900px 500px at 90% 70%, rgba(110,90,166,.16), transparent 60%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

/* Jeśli masz już jakiś wrapper na treść, to go podepnij tutaj.
   Poniżej daję 3 popularne opcje naraz. Zostaw wszystkie, nie przeszkadzają. */
main, .container, .content{
  display:flex;
  justify-content:center;
  padding:48px 18px;
}

/* “karta” w środku. Podpinam pod typowe selektory. */
main > .inner, .container > .inner, .content > .inner,
main > .wrap, .container > .wrap, .content > .wrap,
main > .page, .container > .page, .content > .page,
main > .card, .container > .card, .content > .card{
  width:min(980px, 100%);
  border-radius:18px;
  border:1px solid var(--line2);
  background:rgba(10,10,18,.72);
  box-shadow:0 20px 80px rgba(0,0,0,.55);
  padding:34px 34px 28px;
  position:relative;
}

main > .inner::before, .container > .inner::before, .content > .inner::before,
main > .wrap::before, .container > .wrap::before, .content > .wrap::before,
main > .page::before, .container > .page::before, .content > .page::before,
main > .card::before, .container > .card::before, .content > .card::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:18px;
  border:1px solid var(--line);
  pointer-events:none;
  opacity:.8;
}

/* typografia jak na statycznej */
h1{font-size:34px; line-height:1.2}
p{color:var(--muted)}

/* topbar pod klimat (podmień selektor jeśli Twój header ma inną klasę) */
header, .topbar, .navbar{
  background:rgba(7,8,26,.75);
  border-bottom:1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}

/* ===== FINAL: karta jak w wersji statycznej ===== */

body{
  color:#e9e9f2;
}

/* obszar strony */
main.wrap{
  padding:48px 18px;
}

/* karta */
.page{
  max-width:980px;
  margin:0 auto;
  padding:34px 36px 30px;
  background:rgba(10,10,18,.72);
  border-radius:18px;
  border:1px solid rgba(255,255,255,.06);
  box-shadow:0 20px 80px rgba(0,0,0,.55);
  display:block;
  position:relative;
}

/* wewnętrzna ramka */
.page::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  pointer-events:none;
}

/* banner */
.banner{
  margin:-20px -20px 26px;
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 12px 40px rgba(0,0,0,.45);
}
.banner img{
  width:100%;
  display:block;
}

/* tekst */
.page p{
  max-width: none;
  color:#b9b9d3;
}

.page h1{
  font-size:34px;
  line-height:1.2;
  margin-bottom:18px;
}

header.top{
  background:rgba(7,8,26,.75);
  border-bottom:1px solid rgba(255,255,255,.08);
  backdrop-filter:blur(8px);
}
.menu a{
  color:#cfc8ff;
  text-decoration:none;
}
.menu a:hover{
  text-decoration:underline;
}

/* wycentrowanie menu w topbarze po usunięciu brand */
header.top{
  display:flex;
  justify-content:center;
  align-items:center;
}

/* żeby nav nie miał własnych rozpychaczy */
header.top .menu{
  display:flex;
  gap:22px;
  align-items:center;
}

/* ===== Mobile fix: menu nie ucinane ===== */
header.top{
  flex-wrap: wrap;          /* pozwól zawijać wiersze */
  padding: 10px 12px;
}

header.top .menu{
  flex-wrap: wrap;          /* zawijaj linki */
  justify-content: center;  /* środek */
  row-gap: 8px;
  column-gap: 14px;
}

/* Telefony: trochę ciaśniej */
@media (max-width: 700px){
  .wrap{
    padding-left: 16px;
    padding-right: 16px;
  }
}

.wrap > *:last-child{
  margin-bottom: 0;
}

/* FIX: za duża przerwa przed stopką */
main, .container, .content{
  padding-bottom: 12px !important;
}

/* jeśli stopka jest po treści w mainie, dodatkowo: */
.page{
  margin-bottom: 12px !important;
}

/* stopka bliżej */
.footer{
  padding-top: 12px !important;
  margin-top: 0 !important;
}

/* ===== Guestbook (ładniej) ===== */

.gbook{
  display:grid;
  grid-template-columns: 420px 1fr;
  gap: 14px;
  align-items:start;
  margin-top: 10px;
}

.gbookTitle{
  margin: 0 0 12px;
  font-size: 18px;
}

.gbookNotice{
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.gbookForm{
  position: sticky;
  top: 84px; /* pod sticky topbar */
}

.gbookActions{
  align-items: center;
}

.gbookHint{
  font-size: 13px;
}

/* entries */
.gbookEntry{
  padding: 14px 14px 12px;
}

.gbookTop{
  display:flex;
  gap: 10px;
  align-items:center;
  margin-bottom: 10px;
}

.gbookAvatar{
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display:grid;
  place-items:center;
  font-weight: 800;
  letter-spacing: .3px;
  background: rgba(183,166,255,.14);
  border: 1px solid rgba(183,166,255,.28);
  color: #dcd6ff;
  flex: 0 0 auto;
}

.gbookNick{
  font-weight: 800;
  line-height: 1.1;
}

.gbookDate{
  font-size: 12px;
  margin-top: 2px;
}

.gbookContent{
  line-height: 1.6;
  opacity: .95;
}

/* mobile */
@media (max-width: 980px){
  .gbook{
    grid-template-columns: 1fr;
  }
  .gbookForm{
    position: static;
  }
}

/* ===== Guestbook: ładny wygląd POD TWOJE OBECNE KLASY ===== */

form.form{
  background:#14142a;
  border:1px solid #24244a;
  border-radius:12px;
  padding:14px;
  margin-top: 12px;
}

form.form button[type="submit"]{
  display:inline-block;
  padding:10px 12px;
  background:#2b2b55;
  border-radius:10px;
  border:0;
  color:#f2f2f7;
  cursor:pointer;
}
form.form button[type="submit"]:hover{ filter: brightness(1.1); }

/* komunikat */
.notice{
  padding:10px;
  border-radius:10px;
  border:1px solid #2b2b55;
  background:#121225;
}


.gbookWrap{
  display:grid;
  grid-template-columns: 420px 1fr;
  gap: 14px;
  align-items:start;
  margin-top: 12px;
}
@media (max-width: 980px){
  .gbookWrap{ grid-template-columns: 1fr; }
}

/* ===== FINAL GBOOK FIX (nadpisuje stare) ===== */

.gbookWrap{
  display:grid;
  grid-template-columns: 420px 1fr;
  gap: 14px;
  align-items:start;
  margin-top: 12px;
}

@media (max-width: 980px){
  .gbookWrap{ grid-template-columns: 1fr; }
}

.gbookForm{
  background:#14142a;
  border:1px solid #24244a;
  border-radius:12px;
  padding:14px;
}

.gbookList{ min-width: 0; } /* ważne przy grid + długich treściach */

.gbook-entry{
  background:#14142a;
  border:1px solid #24244a;
  border-radius:12px;
  padding:14px;
  margin: 0 0 12px;
}

.gbook-head{
  display:flex;
  gap:10px;
  align-items:center;
  margin: 0 0 10px;
}

.gbook-avatar{
  width:36px;
  height:36px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  background: rgba(183,166,255,.14);
  border: 1px solid rgba(183,166,255,.28);
  color:#dcd6ff;
  flex: 0 0 auto;
}

.gbook-meta{
  min-width: 0;
}

.gbook-nick{
  font-weight:800;
  line-height:1.1;
}

.gbook-date{
  font-size:12px;
  margin-top:2px;
  opacity:.75;
}

.gbook-body{
  line-height:1.6;
  opacity:.95;
  overflow-wrap: anywhere;
}

/* kasujemy wpływ starych selektorów opartych o <p> */
.gbook-entry p{ margin: 0; }
.gbook-entry hr{ display:none !important; }

/* ===== GBOOK: formularz na górze, wpisy pod spodem ===== */

.gbookWrap{
  display: block !important;
}

.gbookForm{
  margin-bottom: 18px;
}

/* ===== GBOOK: formularz NIE sticky ===== */
.gbookForm{
  position: static !important;
  top: auto !important;
}

/* ===== FIX: formularz nie wychodzi poza szerokość ===== */

/* 1) globalnie: padding/border wliczają się do width */
*, *::before, *::after{
  box-sizing: border-box;
}

/* 2) grid/flex czasem wymusza min-width i robi overflow */
.gbookWrap, .gbookForm, .gbookList, .page, .wrap{
  min-width: 0;
}

/* 3) formularz i pola na pewno trzymają się kontenera */
.gbookForm{
  width: 100%;
  overflow: hidden;
}

.gbookForm input,
.gbookForm textarea,
.gbookForm select{
  max-width: 100%;
}

/* 4) na wszelki wypadek, żeby nie robił się poziomy scroll */
body{
  overflow-x: hidden;
}

.grid.songsList{ display:block; }
.grid.songsList > *{ margin-bottom:14px; }

