:root {
  --fog-50: #f8f9fa;
  --fog-100: #f1f3f5;
  --fog-200: #e9ecef;
  --fog-300: #dee2e6;
  --fog-500: #868e96;
  --fog-600: #6c757d;
  --fog-700: #495057;
  --fog-800: #343a40;
  --fog-900: #212529;
  --steel-50: #f0f7ff;
  --steel-100: #d9ebff;
  --steel-500: #4b83b8;
  --steel-600: #2f6f9f;
  --steel-700: #265c84;
  --steel-800: #214e70;
  --moss-50: #f1f8f4;
  --moss-100: #dceee3;
  --moss-500: #5f9f75;
  --moss-600: #4c8761;
  --moss-700: #3f7152;
  --accent-400: #f8c471;
  --accent-500: #f5a623;
  --white: #ffffff;
  --shadow-sm: 0 8px 24px rgba(33, 37, 41, 0.08);
  --shadow-md: 0 18px 42px rgba(33, 37, 41, 0.14);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--fog-900);
  background: var(--fog-50);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  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.94);
  border-bottom: 1px solid var(--fog-200);
  box-shadow: 0 2px 18px rgba(33, 37, 41, 0.06);
  backdrop-filter: blur(14px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--steel-600), var(--moss-600));
  box-shadow: 0 10px 25px rgba(47, 111, 159, 0.24);
  font-weight: 700;
}

.brand-name {
  color: var(--fog-900);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.04em;
}

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

.desktop-nav a,
.nav-dropdown > button {
  transition: color 0.2s ease;
}

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

.nav-dropdown {
  position: relative;
}

.nav-dropdown > button {
  padding: 0;
  border: 0;
  color: var(--fog-700);
  background: transparent;
  cursor: pointer;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 18px);
  left: -16px;
  display: grid;
  grid-template-columns: 1fr;
  min-width: 180px;
  padding: 10px;
  border: 1px solid var(--fog-200);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  padding: 10px 12px;
  border-radius: 10px;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: var(--fog-100);
}

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

.header-search input,
.mobile-search input,
.filter-control,
.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid var(--fog-300);
  border-radius: 12px;
  background: var(--white);
  color: var(--fog-900);
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 230px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-control:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--steel-500);
  box-shadow: 0 0 0 4px rgba(75, 131, 184, 0.14);
}

.header-search button,
.mobile-search button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  color: var(--white);
  background: linear-gradient(135deg, var(--steel-600), var(--steel-800));
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(47, 111, 159, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(47, 111, 159, 0.28);
}

.btn-secondary {
  color: var(--fog-900);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 26px rgba(255, 255, 255, 0.18);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--fog-100);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--fog-800);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

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

.mobile-menu-inner {
  padding: 16px 0 22px;
}

.mobile-menu nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.mobile-menu nav a {
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--fog-100);
  color: var(--fog-700);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg,
.hero-backdrop {
  position: absolute;
  inset: 0;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transform: scale(1.03);
}

.hero-backdrop {
  background:
    radial-gradient(circle at 72% 16%, rgba(248, 196, 113, 0.22), transparent 32%),
    linear-gradient(90deg, rgba(33, 37, 41, 0.98), rgba(33, 37, 41, 0.68) 48%, rgba(33, 37, 41, 0.32)),
    linear-gradient(0deg, rgba(33, 37, 41, 1), rgba(33, 37, 41, 0.16));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: end;
  padding: 88px 0 74px;
  color: var(--white);
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--accent-400);
  font-weight: 700;
}

.hero h1 {
  max-width: 820px;
  margin: 0 0 20px;
  font-size: clamp(42px, 6vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.hero p {
  max-width: 760px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
}

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

.hero-panel {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(18px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.24);
}

.hero-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.hero-panel ol {
  margin: 0 0 20px;
  padding-left: 22px;
}

.hero-panel li {
  margin: 10px 0;
  color: rgba(255, 255, 255, 0.84);
}

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

.hero-dot {
  width: 26px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
}

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

.section {
  padding: 72px 0;
}

.section-white {
  background: var(--white);
}

.section-dark {
  color: var(--white);
  background: var(--fog-900);
}

.section-soft {
  background: linear-gradient(180deg, var(--fog-50), var(--white));
}

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

.section-header h2,
.page-heading h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.055em;
}

.section-header p,
.page-heading p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--fog-600);
  line-height: 1.75;
}

.section-dark .section-header p {
  color: rgba(255, 255, 255, 0.7);
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--fog-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 111, 159, 0.3);
  box-shadow: var(--shadow-md);
}

.cover-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 18%, rgba(248, 196, 113, 0.28), transparent 26%),
    linear-gradient(135deg, var(--steel-700), var(--moss-600));
}

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

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

.cover-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.04) 60%);
}

.cover-title {
  position: absolute;
  z-index: 2;
  left: 16px;
  right: 16px;
  bottom: 14px;
  color: var(--white);
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.image-missing .cover-title {
  top: 50%;
  bottom: auto;
  text-align: center;
  transform: translateY(-50%);
}

.rank-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--fog-900);
  background: var(--accent-400);
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

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

.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--fog-600);
  font-size: 13px;
}

.movie-meta-row span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--fog-100);
}

.movie-card h3 {
  margin: 0 0 10px;
  color: var(--fog-900);
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

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

.movie-card p {
  min-height: 46px;
  margin: 0 0 14px;
  color: var(--fog-600);
  line-height: 1.65;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--steel-700);
  background: var(--steel-50);
  font-size: 12px;
  font-weight: 650;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.movie-card-horizontal .cover-wrap {
  height: 100%;
  min-height: 150px;
  aspect-ratio: auto;
}

.category-card,
.stat-card,
.info-card {
  border: 1px solid var(--fog-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  padding: 24px;
  color: var(--white);
  background: linear-gradient(135deg, var(--steel-600), var(--steel-800));
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 10%, rgba(248, 196, 113, 0.25), transparent 34%);
}

.category-card > * {
  position: relative;
  z-index: 2;
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.78);
}

.category-count {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 700;
}

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 78% 12%, rgba(248, 196, 113, 0.24), transparent 28%),
    linear-gradient(135deg, var(--steel-600), var(--steel-800));
  padding: 58px 0 64px;
}

.page-heading p {
  color: rgba(255, 255, 255, 0.78);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

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

.chevron {
  color: rgba(255, 255, 255, 0.44);
}

.filter-panel,
.search-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--fog-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.result-count {
  margin: -10px 0 24px;
  color: var(--fog-600);
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 64px 148px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--fog-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.ranking-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  color: var(--fog-900);
  background: var(--accent-400);
  font-size: 20px;
  font-weight: 800;
}

.ranking-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--steel-700), var(--moss-600));
}

.ranking-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-main h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.ranking-main p {
  margin: 0;
  color: var(--fog-600);
  line-height: 1.65;
}

.detail-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 76% 10%, rgba(248, 196, 113, 0.22), transparent 32%),
    linear-gradient(135deg, var(--fog-900), var(--steel-800));
  padding: 44px 0 54px;
}

.detail-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 36px;
  align-items: end;
}

.detail-title p {
  max-width: 820px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.75;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.86);
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--steel-700), var(--moss-600));
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
}

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

.player-section {
  padding: 42px 0 0;
  background: var(--fog-900);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.34);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.42));
  cursor: pointer;
}

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

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--steel-700);
  font-size: 34px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.detail-body {
  padding: 54px 0 76px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
  align-items: start;
}

.info-card {
  padding: 28px;
  margin-bottom: 22px;
}

.info-card h2 {
  margin: 0 0 16px;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.info-card p {
  margin: 0;
  color: var(--fog-700);
  line-height: 1.85;
}

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

.info-list div {
  padding: 14px;
  border-radius: 14px;
  background: var(--fog-100);
}

.info-list strong {
  display: block;
  margin-bottom: 4px;
  color: var(--fog-500);
  font-size: 13px;
}

.sidebar {
  position: sticky;
  top: 96px;
}

.sidebar h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.sidebar .movie-card-horizontal {
  grid-template-columns: 104px minmax(0, 1fr);
}

.sidebar .movie-card-horizontal .cover-wrap {
  min-height: 112px;
}

.sidebar .movie-card-body {
  padding: 12px;
}

.sidebar .movie-card h3 {
  font-size: 16px;
}

.sidebar .movie-card p,
.sidebar .tag-list {
  display: none;
}

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

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

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

.footer-about p {
  max-width: 560px;
  color: var(--fog-400);
  line-height: 1.8;
}

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

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

.site-footer li {
  margin: 10px 0;
}

.site-footer a:hover {
  color: var(--accent-400);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--fog-500);
}

.empty-state {
  display: none;
  padding: 48px;
  border: 1px dashed var(--fog-300);
  border-radius: var(--radius);
  color: var(--fog-600);
  text-align: center;
  background: var(--white);
}

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

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

  .nav-toggle {
    display: block;
  }

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

  .hero-panel,
  .detail-poster {
    display: none;
  }

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

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

  .hero {
    min-height: 590px;
  }

  .hero-content {
    padding: 80px 0 70px;
  }

  .section {
    padding: 54px 0;
  }

  .section-header {
    display: block;
  }

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

  .filter-panel,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .ranking-row {
    grid-template-columns: 48px 96px minmax(0, 1fr);
  }

  .ranking-row .btn {
    grid-column: 2 / 4;
  }

  .movie-card-horizontal {
    grid-template-columns: 124px minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .brand-name {
    font-size: 19px;
  }

  .mobile-menu nav {
    grid-template-columns: 1fr;
  }

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

  .hero-actions {
    display: grid;
  }

  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal,
  .sidebar .movie-card-horizontal {
    grid-template-columns: 112px minmax(0, 1fr);
  }

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

  .footer-bottom {
    display: block;
  }
}
