:root {
  --brand: #f97316;
  --brand-dark: #ea580c;
  --brand-soft: #fff7ed;
  --accent: #ef4444;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --page: #f8fafc;
  --panel: #ffffff;
  --dark: #111827;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand {
  color: var(--brand-dark);
  font-size: 24px;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: #374151;
  border: 0;
  background: transparent;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--brand-dark);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 180px;
  padding: 10px;
  display: grid;
  gap: 4px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

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

.dropdown-menu a {
  padding: 8px 10px;
  color: #374151;
  border-radius: 10px;
}

.dropdown-menu a:hover {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

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

.top-search input,
.mobile-search input,
.large-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  border-radius: 999px;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  width: 230px;
  padding: 10px 16px;
}

.top-search input:focus,
.mobile-search input:focus,
.large-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.top-search button,
.mobile-search button,
.large-search button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
}

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

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

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-panel nav a {
  padding: 10px;
  text-align: center;
  background: var(--brand-soft);
  border-radius: 12px;
  color: var(--brand-dark);
  font-weight: 700;
}

.hero-slider {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #0f172a;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(249, 115, 22, 0.42), transparent 34%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.22) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
  padding: 96px 0 88px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--brand);
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.26);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 700px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

.hero-tags,
.detail-meta,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 16px 28px rgba(239, 68, 68, 0.28);
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
}

.btn-link {
  color: #ffffff;
  padding-inline: 8px;
}

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

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

.hero-dot.is-active {
  background: #ffffff;
}

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

.section-wrap {
  padding: 56px 0;
}

.home-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.home-intro h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  margin: 12px 0 0;
  color: var(--ink);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.home-intro h2,
.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
}

.home-intro p,
.page-hero p {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.section-more {
  color: var(--brand-dark);
  font-weight: 850;
  white-space: nowrap;
}

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

.section-heading.compact {
  align-items: flex-start;
}

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

.category-tile,
.category-overview-card,
.text-card,
.filter-panel,
.ranking-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.category-tile {
  min-height: 150px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.category-tile::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -38px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(239, 68, 68, 0.12));
}

.category-tile span,
.category-title-link {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
}

.category-tile p,
.category-overview-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.layout-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.filter-panel {
  margin-bottom: 24px;
  padding: 18px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
}

.filter-grid label {
  display: grid;
  gap: 7px;
  color: #374151;
  font-weight: 800;
  font-size: 13px;
}

.filter-panel input,
.filter-panel select {
  min-height: 42px;
  padding: 0 14px;
  color: var(--ink);
}

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.15;
  overflow: hidden;
  background: linear-gradient(135deg, #1f2937, #fb923c);
}

.poster-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.2s ease;
}

.movie-card:hover .poster-image {
  transform: scale(1.05);
}

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.78));
}

.poster-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 900;
}

.poster-year {
  right: 12px;
  bottom: 12px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.76);
  padding: 5px 10px;
  font-size: 12px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.26);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: block;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
}

.card-title:hover {
  color: var(--brand-dark);
}

.card-meta,
.card-desc {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  min-height: 42px;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-color: rgba(249, 115, 22, 0.16);
}

.tag-row.large span {
  font-size: 14px;
}

.ranking-card {
  position: sticky;
  top: 96px;
  padding: 22px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: 14px;
  background: #f9fafb;
}

.rank-row:hover {
  background: var(--brand-soft);
}

.rank-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #ffffff;
  background: var(--brand);
  border-radius: 999px;
  font-weight: 900;
}

.rank-row strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

.rank-row em {
  display: block;
  grid-column: 2;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.empty-state {
  display: none;
  margin: 22px 0 0;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

.page-main {
  padding-bottom: 24px;
}

.page-hero {
  margin-top: 36px;
  padding: 46px;
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 16%, rgba(251, 146, 60, 0.35), transparent 34%),
    linear-gradient(135deg, #111827, #1f2937 54%, #7c2d12);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.page-hero h1 {
  color: #ffffff;
  font-size: clamp(34px, 5vw, 58px);
}

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

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

.breadcrumb a:hover {
  color: #ffffff;
}

.category-overview-card {
  padding: 22px;
}

.mini-links {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.mini-links a {
  color: var(--brand-dark);
  font-weight: 750;
}

.large-search {
  max-width: 720px;
  margin-top: 28px;
}

.large-search input {
  min-height: 54px;
  padding: 0 20px;
}

.large-search button {
  min-height: 54px;
  padding-inline: 26px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin-top: 36px;
  padding: 34px;
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 14%, rgba(249, 115, 22, 0.34), transparent 34%),
    linear-gradient(135deg, #111827, #1f2937 58%, #7c2d12);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 3 / 4.2;
  background: linear-gradient(135deg, #1f2937, #fb923c);
  border-radius: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.26);
}

.detail-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-copy .breadcrumb {
  margin-bottom: 16px;
}

.detail-copy h1 {
  color: #ffffff;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.02;
}

.detail-one-line {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.detail-meta {
  margin-top: 22px;
}

.detail-copy .btn {
  margin-top: 30px;
}

.player-section {
  padding-bottom: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #020617;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #020617;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.play-button {
  position: relative;
  z-index: 2;
  width: 92px;
  height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-radius: 999px;
  box-shadow: 0 24px 48px rgba(239, 68, 68, 0.32);
  cursor: pointer;
}

.play-button span {
  margin-left: 5px;
  font-size: 32px;
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding-top: 28px;
}

.text-card {
  padding: 28px;
}

.text-card h2 {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.text-card p {
  margin: 0;
  color: #4b5563;
  font-size: 16px;
}

@media (max-width: 1080px) {
  .top-search {
    display: none;
  }

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

  .layout-with-sidebar {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    position: static;
  }
}

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-slider,
  .hero-content {
    min-height: 560px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: clamp(36px, 12vw, 58px);
  }

  .home-intro,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .detail-cover {
    width: min(320px, 100%);
  }

  .detail-text {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .header-inner {
    min-height: 64px;
  }

  .brand {
    font-size: 20px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

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

  .hero-slider,
  .hero-content {
    min-height: 620px;
  }

  .hero-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .section-wrap {
    padding: 38px 0;
  }

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

  .card-body {
    padding: 13px;
  }

  .card-title {
    font-size: 16px;
  }

  .card-desc {
    display: none;
  }

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

  .page-hero,
  .detail-hero {
    padding: 26px;
    border-radius: 24px;
  }

  .large-search {
    align-items: stretch;
    flex-direction: column;
  }

  .player-shell {
    border-radius: 20px;
  }

  .play-button {
    width: 72px;
    height: 72px;
  }
}
