:root {
  --fog-50: #f8f9fa;
  --fog-100: #f1f3f5;
  --fog-200: #e9ecef;
  --fog-300: #dee2e6;
  --fog-400: #ced4da;
  --fog-500: #adb5bd;
  --fog-600: #868e96;
  --fog-700: #495057;
  --fog-800: #343a40;
  --fog-900: #212529;
  --steel-50: #f0f4f8;
  --steel-100: #d9e2ec;
  --steel-300: #9fb3c8;
  --steel-400: #829ab1;
  --steel-500: #627d98;
  --steel-600: #486581;
  --steel-700: #334e68;
  --steel-800: #243b53;
  --moss-50: #f0f4f0;
  --moss-600: #3d663d;
  --moss-800: #233923;
  --accent-400: #fb923c;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(33, 37, 41, 0.10);
  --shadow-lg: 0 24px 60px rgba(33, 37, 41, 0.18);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--fog-900);
  background: var(--fog-50);
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--fog-200);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fog-900);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.brand-mark {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--steel-600), var(--moss-600));
  font-size: 16px;
  box-shadow: var(--shadow-md);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--fog-700);
  font-weight: 500;
}

.desktop-nav a,
.nav-dropdown button {
  color: var(--fog-700);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.nav-dropdown button:hover {
  color: var(--steel-600);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 180px;
  padding: 8px;
  border: 1px solid var(--fog-200);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-panel a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
}

.nav-dropdown-panel a:hover {
  background: var(--fog-50);
}

.header-search {
  display: flex;
  width: min(340px, 26vw);
  overflow: hidden;
  border: 1px solid var(--fog-300);
  border-radius: 14px;
  background: var(--white);
}

.header-search input,
.mobile-search input,
.large-search input,
.filter-bar input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--fog-900);
}

.header-search input {
  padding: 10px 14px;
}

.header-search button {
  padding: 0 14px;
  border: 0;
  background: var(--steel-600);
  color: var(--white);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  background: var(--fog-100);
  color: var(--fog-900);
  border-radius: 10px;
  padding: 8px 11px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--fog-200);
  padding: 16px;
  background: var(--white);
}

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

.mobile-search {
  display: flex;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--fog-300);
  border-radius: 12px;
}

.mobile-search input {
  padding: 10px 12px;
}

.mobile-search button {
  border: 0;
  background: var(--steel-600);
  color: var(--white);
  padding: 0 14px;
}

.mobile-panel nav {
  display: grid;
  gap: 6px;
}

.mobile-panel nav a {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--fog-700);
}

.mobile-panel nav a:hover {
  background: var(--fog-100);
}

.hero-slider {
  position: relative;
  height: 76vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--fog-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.44;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(251, 146, 60, 0.22), transparent 32%),
    linear-gradient(to top, rgba(33, 37, 41, 0.98), rgba(33, 37, 41, 0.58), rgba(33, 37, 41, 0.14));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding-bottom: 90px;
}

.hero-copy {
  max-width: 760px;
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  color: var(--accent-400);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.eyebrow.dark {
  color: var(--steel-600);
}

.hero-copy h1,
.sub-hero h1,
.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-copy p {
  margin: 0 0 28px;
  max-width: 720px;
  color: var(--fog-200);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--fog-100);
  backdrop-filter: blur(8px);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--steel-600), var(--steel-800));
}

.btn-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.btn-ghost.light {
  color: var(--fog-900);
  background: rgba(255, 255, 255, 0.82);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

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

.hero-dots button.is-active {
  background: var(--white);
}

.intro-search {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 440px);
  gap: 32px;
  align-items: center;
  padding: 56px 0 24px;
}

.intro-search h2,
.section-head h2,
.player-section h2,
.content-card h2 {
  margin: 0;
  color: var(--fog-900);
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.intro-search p,
.sub-hero p,
.category-tile p,
.footer-main p,
.content-card p {
  color: var(--fog-600);
}

.large-search,
.filter-bar {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--fog-200);
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.large-search input,
.filter-bar input {
  padding: 0 12px;
}

.page-section {
  padding: 72px 0;
}

.pale-section {
  background: linear-gradient(to bottom, var(--fog-50), var(--white));
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.section-more {
  color: var(--steel-600);
  font-weight: 700;
}

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

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

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

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

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

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

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--steel-600), var(--moss-800));
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .card-cover img {
  transform: scale(1.05);
}

.card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-shade {
  opacity: 1;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 15px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--fog-500);
  font-size: 12px;
}

.card-meta span:first-child {
  color: var(--steel-600);
  font-weight: 700;
}

.movie-card h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--fog-900);
  font-size: 17px;
  line-height: 1.42;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

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

.movie-card p {
  display: -webkit-box;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--fog-600);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-tags {
  margin-top: auto;
}

.card-tags span {
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--fog-700);
  background: var(--fog-100);
  font-size: 12px;
}

.card-horizontal .card-link {
  flex-direction: row;
}

.card-horizontal .card-cover {
  width: 220px;
  min-height: 230px;
  aspect-ratio: auto;
  flex-shrink: 0;
}

.card-horizontal h3 {
  min-height: auto;
  font-size: 20px;
}

.horizontal-list {
  display: grid;
  gap: 16px;
}

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

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

.category-tile {
  position: relative;
  min-height: 170px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 18px;
  padding: 22px;
  color: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

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

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

.category-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(72, 101, 129, 0.94), rgba(35, 57, 35, 0.86));
}

.category-tile > div:last-child {
  position: relative;
}

.category-tile h3 {
  margin: 0 0 6px;
  font-size: 23px;
}

.category-tile p {
  margin: 0;
  color: var(--fog-100);
  font-size: 14px;
}

.sub-hero {
  padding: 88px 0;
  color: var(--white);
  background:
    radial-gradient(circle at 20% 0%, rgba(251, 146, 60, 0.18), transparent 32%),
    linear-gradient(135deg, var(--fog-900), var(--steel-800));
}

.sub-hero h1 {
  margin: 0 0 14px;
}

.sub-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--fog-200);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--white);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: var(--fog-900);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  filter: blur(3px);
  transform: scale(1.04);
}

.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(33, 37, 41, 0.96), rgba(36, 59, 83, 0.78));
}

.detail-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 46px;
  align-items: center;
  min-height: 620px;
  padding: 70px 0;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

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

.detail-copy .breadcrumb {
  color: rgba(255, 255, 255, 0.72);
}

.detail-one-line {
  max-width: 760px;
  margin: 0 0 24px;
  color: var(--fog-200);
  font-size: 21px;
}

.player-section {
  padding: 64px 0 32px;
}

.player-section h2 {
  margin-bottom: 22px;
}

.player-card {
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow-lg);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.20));
  cursor: pointer;
  z-index: 2;
}

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

.play-icon {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  border-radius: 50%;
  color: var(--fog-900);
  background: var(--white);
  font-size: 30px;
  box-shadow: var(--shadow-lg);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 32px 0 16px;
}

.content-card {
  padding: 28px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.content-card h2 {
  margin-bottom: 14px;
  font-size: 26px;
}

.content-card p {
  margin: 0;
  font-size: 16px;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  min-width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: rgba(33, 37, 41, 0.86);
  font-weight: 800;
  backdrop-filter: blur(6px);
}

.filter-bar {
  margin-bottom: 24px;
  max-width: 520px;
}

.filter-bar input {
  min-height: 44px;
}

.empty-state {
  display: none;
  margin-top: 28px;
  padding: 24px;
  border-radius: 18px;
  color: var(--fog-600);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  margin-top: 72px;
  color: var(--fog-300);
  background: var(--fog-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding: 56px 0;
}

.footer-brand {
  color: var(--fog-100);
}

.footer-main p {
  max-width: 520px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--fog-100);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a:hover {
  color: var(--steel-300);
}

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: var(--fog-500);
}

@media (max-width: 1100px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .movie-grid,
  .compact-grid,
  .library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 20px;
  }

  .hero-slider {
    min-height: 560px;
    height: 74vh;
  }

  .hero-content {
    padding-bottom: 70px;
  }

  .hero-copy h1,
  .sub-hero h1,
  .detail-copy h1 {
    font-size: 38px;
  }

  .hero-tags span,
  .detail-tags span {
    font-size: 13px;
  }

  .intro-search,
  .detail-hero-grid,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero-grid {
    min-height: auto;
    padding: 44px 0;
    gap: 24px;
  }

  .detail-poster {
    max-width: 280px;
  }

  .movie-grid,
  .feature-grid,
  .compact-grid,
  .library-grid,
  .category-grid,
  .large-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .movie-card h3 {
    min-height: 44px;
    font-size: 15px;
  }

  .movie-card p,
  .card-tags {
    display: none;
  }

  .card-horizontal .card-link {
    flex-direction: column;
  }

  .card-horizontal .card-cover {
    width: 100%;
    min-height: 0;
    aspect-ratio: 3 / 4;
  }

  .category-tile {
    min-height: 150px;
    padding: 16px;
  }

  .category-tile p {
    display: none;
  }

  .large-search {
    flex-direction: column;
  }

  .large-search input {
    min-height: 44px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .feature-grid,
  .compact-grid,
  .library-grid,
  .category-grid,
  .large-category-grid {
    grid-template-columns: 1fr;
  }
}
