:root {
  --primary: #0f5f8f;
  --primary-dark: #083d5f;
  --accent: #f59e0b;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --border: #e5e7eb;
  --soft: #eef6fb;
  --danger-soft: #fff7ed;
  --shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 45px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
}

/* =========================
   Header / Navigation
   ========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.topbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 14px;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  flex-wrap: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1 1 auto;
  max-width: 310px;
  color: var(--text);
  font-weight: 900;
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  color: var(--primary-dark);
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 12px;
  flex: 0 0 auto;
}

.brand span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 1 auto;
}

.main-nav a,
.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  font-weight: 800;
  text-decoration: none;
  font-size: 14px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  padding: 9px 11px;
  border-radius: 999px;
  line-height: 1.2;
  white-space: nowrap;
}

.main-nav a:hover,
.dropdown-toggle:hover {
  background: var(--soft);
  color: var(--primary-dark);
  text-decoration: none;
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 245px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 10px;
  box-shadow: var(--shadow-lg);
}

.dropdown-menu a {
  display: block;
  width: 100%;
  justify-content: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  white-space: normal;
}

.dropdown-menu a:hover {
  background: #f0f9ff;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  display: block;
}

.nav-toggle {
  display: none;
  flex: 0 0 auto;
  margin-left: auto;
  border: 0;
  background: var(--primary);
  color: #fff;
  border-radius: 11px;
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(15, 95, 143, 0.22);
}

.nav-toggle:hover {
  background: var(--primary-dark);
}

/* =========================
   Hero / Common Layout
   ========================= */

.hero {
  background:
    radial-gradient(circle at top left, rgba(15,95,143,.18), transparent 34%),
    linear-gradient(135deg, #fff 0%, #eef6fb 100%);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 18px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.05;
  margin: 12px 0 14px;
  letter-spacing: -1.5px;
}

.hero p {
  color: #475569;
  font-size: 18px;
  margin: 0 0 22px;
}

.eyebrow {
  display: inline-flex;
  background: #fff;
  color: var(--primary-dark);
  border: 1px solid #cfe8f5;
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 700;
  font-size: 13px;
}

.poster,
.profile-photo,
.hero-photo {
  width: 100%;
  max-height: 390px;
  object-fit: contain;
  background: #fff;
  border-radius: 26px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 8px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
}

.btn:hover {
  text-decoration: none;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.btn.secondary {
  background: #fff;
  color: var(--primary-dark);
  border-color: #cfe8f5;
}

.btn.secondary:hover {
  background: var(--soft);
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
}

article,
aside {
  min-width: 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 22px;
}

.card h2 {
  margin: 0 0 14px;
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -.4px;
}

.card h3 {
  margin-top: 0;
}

.section-text {
  color: #334155;
  font-size: 16px;
}

.safe-box {
  background: var(--danger-soft);
  border-color: #fed7aa;
  color: #7c2d12;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.meta {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
}

.meta span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.meta strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  background: #f8fafc;
  border: 1px solid var(--border);
  color: #334155;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 700;
}

.chip:hover {
  background: var(--soft);
  text-decoration: none;
}

.movie-grid {
  display: grid;
  gap: 12px;
}

.movie-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 13px;
  color: var(--text);
}

.movie-card:hover {
  background: var(--soft);
  text-decoration: none;
}

.movie-count {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex: 0 0 auto;
}

.movie-card small {
  display: block;
  color: var(--muted);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 16px;
}

.related-item,
.related-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  color: var(--text);
  box-shadow: 0 8px 20px rgba(15,23,42,.06);
}

.related-item:hover,
.related-card:hover {
  transform: translateY(-2px);
  transition: .2s ease;
  text-decoration: none;
}

.related-item img,
.related-card img,
.related-poster {
  width: 100%;
  height: 210px;
  object-fit: contain;
  background: #f8fafc;
  display: block;
}

.related-item span,
.related-card h3,
.related-card p {
  padding-left: 12px;
  padding-right: 12px;
}

.related-card h3 {
  font-size: 16px;
  margin: 12px 0 4px;
}

.related-card p,
.related-item small {
  font-size: 13px;
  color: var(--muted);
}

.related-card p {
  margin: 0 0 14px;
}

aside .card {
  padding: 20px;
}

aside ul {
  padding-left: 18px;
  margin-bottom: 0;
}

aside li {
  margin: 8px 0;
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-btn {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--border);
  font-weight: 800;
  color: #334155;
}

.share-btn:hover {
  background: var(--soft);
  text-decoration: none;
}

/* =========================
   Footer
   ========================= */

.site-footer,
.footer {
  background: #0f172a;
  color: #cbd5e1;
  margin-top: 30px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 18px;
  display: grid;
  grid-template-columns: 1.5fr .85fr .9fr .9fr;
  gap: 24px;
  align-items: start;
}

.footer-col h3,
.footer-inner strong {
  color: #fff;
  margin: 0 0 10px;
}

.footer-col p,
.footer-inner p {
  margin: 0 0 10px;
  color: #cbd5e1;
}

.footer-col a,
.footer-links a {
  display: block;
  color: #e2e8f0;
  font-weight: 700;
  margin: 7px 0;
}

.footer-col a:hover,
.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 18px 24px;
  color: #94a3b8;
  font-size: 14px;
}

/* =========================
   Utilities
   ========================= */

.text-muted {
  color: var(--muted);
}

.center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 980px) {
  .main-nav {
    gap: 4px;
  }

  .main-nav a,
  .dropdown-toggle {
    font-size: 13px;
    padding: 8px 8px;
  }
}

@media (max-width: 850px) {
  .site-header {
    overflow: visible;
  }

  .topbar {
    min-height: 64px;
    padding: 10px 12px;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
  }

  .brand {
    max-width: calc(100% - 56px);
    font-size: 16px;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .nav-toggle {
    display: inline-flex !important;
    position: static !important;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 10px;
    right: 10px;
    width: auto;
    max-height: calc(100vh - 82px);
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    box-shadow: var(--shadow-lg);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a,
  .dropdown-toggle {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 12px 13px;
    border-radius: 14px;
    text-align: left;
    font-size: 15px;
  }

  .main-nav a:hover,
  .dropdown-toggle:hover {
    background: #f0f9ff;
  }

  .nav-dropdown:hover .dropdown-menu,
  .nav-dropdown:focus-within .dropdown-menu {
    display: none;
  }

  .nav-dropdown.open .dropdown-menu {
    display: block;
  }

  .dropdown-menu {
    position: static;
    min-width: 100%;
    box-shadow: none;
    border: 0;
    background: #f8fafc;
    border-radius: 16px;
    padding: 8px;
    margin-top: 4px;
  }

  .dropdown-menu a {
    padding: 10px 14px;
    justify-content: flex-start;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 28px;
  }

  .poster,
  .profile-photo,
  .hero-photo {
    max-width: 320px;
    margin: 0 auto;
  }

  .wrap {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .topbar {
    min-height: 60px;
  }

  .brand {
    max-width: calc(100% - 50px);
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .brand span {
    font-size: 15px;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .main-nav {
    top: 60px;
    left: 8px;
    right: 8px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 16px;
  }

  .card {
    padding: 18px;
    border-radius: 18px;
  }

  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related-item img,
  .related-card img,
  .related-poster {
    height: 170px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}
