/* ============ Film na wieczór — styles ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0c14;
  --bg-2: #10131f;
  --panel: #161a28;
  --line: #262c40;
  --text: #eef0f7;
  --dim: #9aa3bd;
  --gold: #e8b954;
  --red: #e63950;
  --radius: 18px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background:
    radial-gradient(900px 400px at 85% -10%, #e8b95412, transparent 60%),
    radial-gradient(700px 400px at 0% 15%, #e6395010, transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
  min-height: 100vh;
}

.demo-bar {
  background: #e8b954;
  color: #241c05;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 16px;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: clamp(16px, 3.5vw, 40px); }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.logo { font-size: 1.3rem; text-decoration: none; color: var(--text); }
.logo b { font-weight: 900; letter-spacing: -0.02em; }
.search { flex: 1; display: flex; min-width: 220px; max-width: 480px; margin-left: auto; }
.search input {
  flex: 1;
  font-family: inherit; font-size: 0.98rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-right: none;
  color: var(--text);
  border-radius: 12px 0 0 12px;
  padding: 11px 16px;
}
.search input:focus { outline: none; border-color: var(--gold); }
.search button {
  font-size: 1rem;
  background: var(--gold); border: none;
  border-radius: 0 12px 12px 0;
  padding: 0 18px; cursor: pointer;
  transition: opacity 0.15s ease;
}
.search button:hover { opacity: 0.88; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: clamp(26px, 6vh, 60px) 0 clamp(10px, 3vh, 26px); }
.hero h1 {
  font-size: clamp(1.9rem, 5.6vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.hero h1 em { font-style: normal; color: var(--gold); }
.subtitle { margin: 14px auto 0; max-width: 600px; color: var(--dim); font-size: clamp(0.96rem, 2.3vw, 1.1rem); line-height: 1.6; }
.subtitle strong { color: var(--text); }

/* ---------- grid ---------- */
.section { margin-top: clamp(20px, 4vh, 40px); }
.section h2 { font-size: clamp(1.2rem, 3vw, 1.6rem); font-weight: 700; margin-bottom: 18px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: clamp(10px, 2vw, 18px);
}
.card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  aspect-ratio: 2 / 3;
  display: block;
  text-decoration: none;
  color: var(--text);
}
.card:hover { transform: translateY(-6px) scale(1.02); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55); z-index: 2; }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .noposter {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(160deg, #232946, #10131f);
  padding: 14px; text-align: center;
}
.card .noposter span { font-size: 2rem; }
.card .noposter b { font-size: 0.95rem; line-height: 1.3; }
.card .badge {
  position: absolute; top: 8px; right: 8px;
  background: rgba(10, 12, 20, 0.82);
  border: 1px solid var(--line);
  color: var(--gold);
  font-weight: 700; font-size: 0.8rem;
  padding: 4px 9px; border-radius: 999px;
  backdrop-filter: blur(4px);
}
.card .caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(6, 8, 14, 0.95), transparent);
  padding: 26px 12px 10px;
  font-size: 0.88rem; font-weight: 600; line-height: 1.3;
}
.card .caption small { color: var(--dim); font-weight: 500; }

/* skeleton */
.card.skel { pointer-events: none; }
.card.skel::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.06) 50%, transparent 70%);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.grid-empty { color: var(--dim); text-align: center; padding: 30px 0; }

/* ---------- about ---------- */
.about { margin-top: clamp(46px, 8vh, 80px); }
.about h2 { text-align: center; font-size: clamp(1.3rem, 3.4vw, 1.8rem); font-weight: 800; margin-bottom: 22px; }
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.about-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; gap: 12px; align-items: flex-start;
}
.about-card span { font-size: 1.6rem; }
.about-card p { color: var(--dim); font-size: 0.92rem; line-height: 1.6; }
.about-card strong { color: var(--text); }

/* ---------- footer ---------- */
.footer {
  margin-top: clamp(46px, 8vh, 80px);
  text-align: center;
  color: var(--dim); font-size: 0.85rem; line-height: 1.8;
  padding-bottom: 30px;
}
.footer a { color: var(--gold); }
.footer .muted { color: #5b6480; }

/* ---------- detail overlay ---------- */
.detail-overlay[hidden] { display: none; }
.detail-overlay {
  position: fixed; inset: 0;
  background: rgba(4, 6, 12, 0.78);
  backdrop-filter: blur(6px);
  z-index: 40;
  display: flex; align-items: flex-start; justify-content: center;
  padding: clamp(12px, 4vh, 48px) clamp(12px, 3vw, 24px);
  overflow-y: auto;
}
.detail-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  max-width: 820px; width: 100%;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: pop 0.25s cubic-bezier(0.22, 1.2, 0.36, 1);
}
@keyframes pop { from { transform: translateY(16px); opacity: 0; } }
.d-close {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: var(--text);
  width: 38px; height: 38px; border-radius: 50%;
  font-size: 1rem; cursor: pointer;
  z-index: 2;
  transition: background 0.15s ease;
}
.d-close:hover { background: rgba(255, 255, 255, 0.16); }
.d-body { display: grid; grid-template-columns: 240px 1fr; gap: 22px; padding: clamp(18px, 3vw, 28px); }
@media (max-width: 640px) { .d-body { grid-template-columns: 1fr; } .d-poster { max-width: 220px; margin: 0 auto; } }
.d-poster { border-radius: 14px; overflow: hidden; aspect-ratio: 2/3; background: #232946; }
.d-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.d-poster .noposter { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.d-info h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); font-weight: 800; line-height: 1.2; padding-right: 40px; }
.d-meta { color: var(--dim); margin-top: 6px; font-size: 0.92rem; }
.d-rating { margin-top: 10px; font-weight: 700; color: var(--gold); }
.d-overview { margin-top: 14px; color: #c7cde0; line-height: 1.65; font-size: 0.96rem; }
.d-people { margin-top: 12px; color: var(--dim); font-size: 0.88rem; line-height: 1.6; }
.d-people b { color: var(--text); font-weight: 600; }
.d-watch { margin-top: 16px; }
.d-watch h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); margin-bottom: 8px; }
.watch-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.watch-chip {
  background: rgba(232, 185, 84, 0.12);
  border: 1px solid rgba(232, 185, 84, 0.4);
  color: var(--gold);
  font-size: 0.84rem; font-weight: 600;
  padding: 5px 12px; border-radius: 999px;
}
.watch-chip.dim { background: rgba(255, 255, 255, 0.06); border-color: var(--line); color: var(--dim); }
.watch-none { color: var(--dim); font-size: 0.9rem; }
.watch-link { display: inline-block; margin-top: 8px; color: var(--gold); font-size: 0.85rem; }

/* ==== dodatki SEO/a11y ==== */
.noscript-note { background: #fff3cd; color: #5a4500; padding: 12px 16px; border-radius: 10px; margin: 16px auto; max-width: 720px; font-size: 0.95rem; }
.more-tools { margin-top: 14px; font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; }
.more-tools a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.more-tools a:hover { opacity: 0.75; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto !important; }
}
