:root {
  color-scheme: dark;
  --bg: #070814;
  --panel: #181a20;
  --panel-2: #20232b;
  --text: #f3f4f6;
  --muted: #a9afbd;
  --line: #303440;
  --accent: #f5c451;
  --accent-2: #7dd3fc;
  --danger: #fb7185;
  --neon-pink: #ff3da7;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 61, 167, 0.14), transparent 34rem),
    radial-gradient(circle at top right, rgba(125, 211, 252, 0.12), transparent 30rem),
    linear-gradient(180deg, rgba(9, 11, 28, 0.98), rgba(7, 8, 20, 1) 420px),
    var(--bg);
  color: var(--text);
}

.site-header,
main,
.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding: 34px 0 24px;
}

.brand-block {
  min-width: 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  max-width: min(760px, 100%);
  text-decoration: none;
}

.header-logo {
  display: block;
  width: min(680px, 100%);
  height: auto;
  max-height: 185px;
  object-fit: contain;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.38));
}

.eyebrow {
  margin: 12px 0 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
}

.intro {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 1.05rem;
}

.stats {
  flex: 0 0 auto;
  min-width: 180px;
  padding: 18px;
  border: 1px solid rgba(255, 61, 167, 0.28);
  border-radius: var(--radius);
  background: rgba(24, 26, 32, 0.78);
  box-shadow: var(--shadow);
  text-align: right;
}

.stats span {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
}

.stats small { color: var(--muted); }

.controls {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(160px, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(24, 26, 32, 0.76);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 10px;
  z-index: 2;
}

label span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 6px;
}

input,
select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
}

.status {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(251, 113, 133, 0.11);
  color: #fecdd3;
  border: 1px solid rgba(251, 113, 133, 0.34);
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  padding: 24px 0 56px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(32, 35, 43, 0.95), rgba(24, 26, 32, 0.95));
  box-shadow: var(--shadow);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #2a2e39, #111318);
}

.poster,
.poster-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.poster-fallback {
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
  font-size: 1.4rem;
}

.poster[hidden],
.poster-fallback[hidden] { display: none; }

.card-body { padding: 16px; }

.title-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.year {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 800;
}

.meta-line {
  margin: 10px 0 0;
  color: var(--accent-2);
  font-size: 0.9rem;
  font-weight: 700;
}

.overview {
  margin: 12px 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.details {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 10px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

dt { color: #d1d5db; font-weight: 700; }
dd { margin: 0; }

.links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(245, 196, 81, 0.42);
  border-radius: 999px;
  background: rgba(245, 196, 81, 0.08);
  color: var(--text);
  text-decoration: none;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.action-link:hover,
.action-link:focus-visible {
  background: rgba(245, 196, 81, 0.16);
  border-color: rgba(245, 196, 81, 0.72);
  transform: translateY(-1px);
}

.share-button {
  color: #07111f;
  background: linear-gradient(135deg, var(--accent), #f97316);
  border-color: transparent;
}

.share-button:hover,
.share-button:focus-visible {
  background: linear-gradient(135deg, #ffd76e, #fb923c);
  border-color: transparent;
}

.site-footer {
  padding: 0 0 36px;
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 880px) {
  .site-header {
    display: block;
    padding-top: 28px;
  }

  .header-logo {
    width: min(560px, 100%);
    max-height: 150px;
  }

  .stats {
    margin-top: 18px;
    text-align: left;
  }
}

@media (max-width: 760px) {
  .controls {
    position: static;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .header-logo {
    max-height: 112px;
  }

  .eyebrow {
    margin-top: 10px;
    font-size: 0.72rem;
  }

  .intro {
    font-size: 0.96rem;
  }
}
