:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --cyan-400: #22d3ee;
  --amber-400: #f59e0b;
  --white: #ffffff;
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.12);
  --shadow-deep: 0 25px 60px rgba(15, 23, 42, 0.22);
  --radius-lg: 24px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: #111827;
  background: linear-gradient(180deg, var(--slate-50), var(--slate-100));
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800), var(--slate-900));
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.22);
}

.nav-inner {
  width: min(1280px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--emerald-400), var(--cyan-400));
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.36);
}

.brand-text,
.footer-logo {
  font-size: 22px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--emerald-400), var(--cyan-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 9px 12px;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background: var(--emerald-600);
}

.nav-search,
.mobile-search,
.hero-search,
.page-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-search input,
.hero-search input,
.page-search input,
.filter-tools input,
.filter-tools select {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.25);
  outline: none;
  border-radius: 999px;
  padding: 11px 16px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.nav-search input {
  width: 190px;
  color: var(--white);
  background: var(--slate-700);
}

.nav-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.page-search input:focus,
.filter-tools input:focus,
.filter-tools select:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.nav-search button,
.mobile-search button,
.hero-search button,
.page-search button {
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--emerald-600);
  padding: 11px 16px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-links {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.mobile-search input {
  flex: 1;
  color: var(--white);
  background: var(--slate-700);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-position: center;
  background-size: cover;
  transition: opacity 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.2)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.1));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100% - 1280px) / 2));
  bottom: 120px;
  width: min(680px, calc(100% - 48px));
  z-index: 2;
}

.hero-kicker,
.eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--emerald-400);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.hero-kicker span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.85);
  color: var(--white);
  letter-spacing: 0;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 26px;
  max-width: 640px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.75;
}

.hero-actions,
.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.primary-btn,
.ghost-btn,
.ghost-dark-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: var(--white);
  background: var(--emerald-600);
  padding: 13px 22px;
  box-shadow: 0 12px 26px rgba(5, 150, 105, 0.32);
}

.primary-btn:hover,
.ghost-btn:hover,
.ghost-dark-btn:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 12px 18px;
  backdrop-filter: blur(10px);
}

.ghost-dark-btn {
  color: var(--slate-900);
  background: var(--white);
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 12px 18px;
}

.hero-poster-card {
  position: absolute;
  right: max(24px, calc((100% - 1280px) / 2));
  bottom: 110px;
  z-index: 2;
  width: min(320px, 28vw);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-deep);
  backdrop-filter: blur(14px);
}

.hero-poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-poster-card span {
  display: block;
  padding: 14px 16px;
  font-weight: 800;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.62);
  font-size: 36px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 3;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--emerald-400);
}

.hero-quick {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 4;
  width: min(1120px, calc(100% - 32px));
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: 14px;
  align-items: center;
  border-radius: 24px 24px 0 0;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.hero-search input {
  flex: 1;
  color: var(--white);
  background: rgba(15, 23, 42, 0.92);
}

.hero-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.hero-category-links a {
  padding: 9px 13px;
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.16);
}

.content-section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--slate-600);
}

.section-heading > a,
.text-link {
  color: var(--emerald-600);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.movie-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 20px;
  overflow-x: auto;
  padding: 2px 2px 16px;
  scroll-snap-type: x proximity;
}

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-deep);
}

.movie-thumb {
  position: relative;
  display: block;
  height: 250px;
  overflow: hidden;
  background: var(--slate-800);
}

.movie-row .movie-thumb {
  height: 220px;
}

.movie-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .movie-thumb img {
  transform: scale(1.08);
}

.movie-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 58%);
  transition: opacity 0.25s ease;
}

.movie-card:hover .movie-thumb::after {
  opacity: 1;
}

.movie-badge,
.movie-duration {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.movie-badge {
  top: 10px;
  right: 10px;
  padding: 6px 10px;
  background: var(--emerald-600);
}

.movie-duration {
  left: 10px;
  bottom: 10px;
  padding: 5px 9px;
  background: rgba(2, 6, 23, 0.66);
}

.movie-card-body {
  padding: 16px;
}

.movie-card h3 {
  margin: 0 0 10px;
  min-height: 46px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--emerald-600);
}

.movie-meta,
.rank-meta,
.detail-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--slate-600);
  font-size: 14px;
}

.movie-meta span:first-child,
.rank-meta strong {
  color: var(--amber-400);
}

.movie-line {
  margin: 12px 0 0;
  color: var(--slate-600);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #047857;
  background: #d1fae5;
  font-size: 12px;
  font-weight: 700;
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.rank-list {
  display: grid;
  gap: 18px;
}

.rank-item {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 18px;
  padding: 14px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.rank-cover {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--slate-800);
}

.rank-cover img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.rank-cover span {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--emerald-600);
  font-weight: 900;
}

.rank-content h3 {
  margin: 4px 0 10px;
  font-size: 20px;
}

.rank-content p {
  margin: 0 0 12px;
  color: var(--slate-600);
  line-height: 1.7;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.category-tile {
  position: relative;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: var(--radius-md);
  color: var(--white);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.45s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.18));
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile span,
.category-tile strong {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile strong {
  margin-top: 8px;
  color: var(--emerald-400);
}

.page-hero,
.detail-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 32px auto 0;
}

.compact-hero {
  border-radius: var(--radius-lg);
  color: var(--white);
  background:
    radial-gradient(circle at 12% 18%, rgba(34, 211, 238, 0.28), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(52, 211, 153, 0.28), transparent 32%),
    linear-gradient(135deg, var(--slate-900), var(--slate-800));
  padding: clamp(34px, 6vw, 72px);
  box-shadow: var(--shadow-deep);
}

.compact-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.08;
}

.compact-hero p {
  max-width: 720px;
  margin: 0;
  color: #dbeafe;
  line-height: 1.8;
  font-size: 18px;
}

.page-hero-actions {
  margin-top: 24px;
}

.category-overview-grid {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.category-collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  overflow: hidden;
  border-radius: 18px;
}

.category-collage img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.category-overview-body h2 {
  margin: 4px 0 10px;
  font-size: 28px;
}

.category-overview-body p {
  margin: 0 0 16px;
  color: var(--slate-600);
  line-height: 1.8;
}

.category-overview-body ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  gap: 8px;
}

.category-overview-body li a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--slate-700);
}

.filter-heading {
  align-items: center;
}

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

.filter-tools input,
.filter-tools select,
.page-search input {
  background: var(--white);
  color: var(--slate-900);
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 32px;
  padding: 28px;
  border-radius: var(--radius-lg);
  color: var(--white);
  background:
    radial-gradient(circle at 15% 10%, rgba(16, 185, 129, 0.22), transparent 32%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
  box-shadow: var(--shadow-deep);
}

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow-deep);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--emerald-400);
}

.detail-intro h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.detail-intro p {
  margin: 0 0 24px;
  max-width: 780px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta-grid span {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
}

.detail-tags span {
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.22);
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  box-shadow: var(--shadow-deep);
}

.movie-player video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.24));
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.player-start {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--emerald-600);
  font-size: 30px;
  box-shadow: 0 16px 36px rgba(5, 150, 105, 0.42);
  cursor: pointer;
}

.player-overlay strong {
  font-size: 22px;
  text-align: center;
}

.detail-copy {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.detail-copy article {
  padding: 26px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.detail-copy h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-copy p {
  margin: 0;
  color: var(--slate-700);
  line-height: 1.9;
  font-size: 17px;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: var(--slate-50);
}

.info-list dt {
  color: var(--slate-600);
  font-weight: 800;
}

.info-list dd {
  margin: 0;
}

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: var(--slate-950);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-inner p {
  max-width: 520px;
  margin: 12px 0 0;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: start;
}

.footer-links a {
  color: #d1fae5;
  font-weight: 700;
}

[data-filter-hidden="true"] {
  display: none !important;
}

.search-empty {
  grid-column: 1 / -1;
  padding: 28px;
  border-radius: 18px;
  color: var(--slate-600);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

@media (max-width: 1100px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-poster-card {
    display: none;
  }

  .hero-content {
    width: min(820px, calc(100% - 48px));
  }

  .category-overview-card,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 360px;
  }
}

@media (max-width: 860px) {
  .nav-links,
  .nav-search {
    display: none;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    bottom: 170px;
  }

  .hero-quick {
    grid-template-columns: 1fr;
  }

  .hero-category-links {
    justify-content: flex-start;
  }

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

  .section-heading,
  .footer-inner {
    align-items: start;
    flex-direction: column;
  }

  .rank-item {
    grid-template-columns: 96px 1fr;
  }

  .rank-cover img {
    height: 128px;
  }
}

@media (max-width: 560px) {
  .content-section,
  .page-hero,
  .detail-hero,
  .footer-inner,
  .nav-inner,
  .mobile-panel {
    width: min(100% - 24px, 1280px);
  }

  .hero {
    height: auto;
    min-height: 650px;
  }

  .hero-content {
    left: 18px;
    bottom: 200px;
    width: calc(100% - 36px);
  }

  .hero-control {
    display: none;
  }

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

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

  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-row {
    grid-auto-columns: minmax(230px, 82vw);
  }

  .movie-thumb {
    height: 230px;
  }

  .category-collage {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-collage img {
    height: 120px;
  }

  .rank-item {
    grid-template-columns: 1fr;
  }

  .rank-cover img {
    height: 220px;
  }

  .info-list {
    grid-template-columns: 1fr;
  }
}
