:root {
  --bg: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --card: #ffffff;
  --line: #e5e7eb;
  --brand: #f97316;
  --brand-2: #ef4444;
  --brand-3: #ec4899;
  --shadow: 0 18px 45px rgba(15, 23, 42, .12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(249, 115, 22, .10), transparent 34rem), var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand-3));
  box-shadow: 0 16px 30px rgba(239, 68, 68, .22);
}

.nav-shell {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, .20);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}

.brand-text {
  white-space: nowrap;
  font-size: 20px;
}

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

.nav-link {
  font-size: 14px;
  opacity: .92;
  transition: opacity .2s ease, transform .2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  opacity: 1;
  transform: translateY(-1px);
}

.nav-search {
  display: flex;
  align-items: center;
  width: 240px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.nav-search input,
.mobile-nav input,
.filter-panel input,
.filter-panel select {
  border: 0;
  outline: 0;
  font: inherit;
}

.nav-search input {
  min-width: 0;
  width: 100%;
  color: #fff;
  background: transparent;
  padding: 10px 4px 10px 16px;
}

.nav-search input::placeholder,
.mobile-nav input::placeholder {
  color: rgba(255, 255, 255, .78);
}

.nav-search button {
  color: #fff;
  border: 0;
  background: transparent;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 20px;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  color: #fff;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, .16);
  padding: 9px 12px;
  font-size: 20px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid rgba(255, 255, 255, .18);
}

.mobile-nav.is-open {
  display: grid;
  gap: 10px;
}

.mobile-nav a,
.mobile-nav form {
  display: block;
  color: #fff;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .10);
}

.mobile-nav form {
  display: flex;
  gap: 10px;
}

.mobile-nav input {
  min-width: 0;
  flex: 1;
  color: #fff;
  background: transparent;
}

.mobile-nav button {
  color: #fff;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .18);
  padding: 8px 12px;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity .7s ease, transform 1.1s ease;
  transform: scale(1.03);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-content {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  color: #fff;
  padding: 120px 0 90px;
}

.hero-kicker,
.section-kicker,
.detail-kicker,
.page-hero span {
  display: inline-flex;
  width: fit-content;
  color: var(--brand);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 780px;
  margin: 14px 0 18px;
  font-size: clamp(42px, 8vw, 84px);
  line-height: .96;
  letter-spacing: -.06em;
}

.hero-content p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, .88);
  font-size: 18px;
  line-height: 1.85;
}

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

.hero-tags {
  margin: 24px 0 30px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  border-radius: 999px;
  background: rgba(249, 115, 22, .12);
  color: #ea580c;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 12px;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, .16);
  backdrop-filter: blur(10px);
}

.hero-actions,
.detail-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

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

.primary-btn {
  min-height: 48px;
  padding: 0 24px;
  color: #fff;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  box-shadow: 0 16px 28px rgba(249, 115, 22, .26);
}

.ghost-btn {
  min-height: 48px;
  padding: 0 22px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(10px);
}

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

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .48);
  cursor: pointer;
  transition: width .2s ease, background .2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #fff;
}

.content-section,
.page-main {
  padding-top: 52px;
}

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

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

.section-head h2 {
  margin: 8px 0 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.section-link,
.text-btn {
  color: #ea580c;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(248px, 1fr);
  gap: 22px;
  overflow-x: auto;
  padding: 4px 2px 20px;
  scroll-snap-type: x mandatory;
}

.scroll-row .movie-card {
  min-width: 260px;
  scroll-snap-align: start;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
  transition: transform .25s ease, box-shadow .25s ease;
}

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(145deg, #111827, #374151);
}

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

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

.card-rating,
.card-year {
  position: absolute;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 9px;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(8px);
}

.card-rating {
  left: 12px;
}

.card-year {
  right: 12px;
}

.movie-body {
  padding: 18px;
}

.movie-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.3;
}

.movie-body p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.tag-row {
  margin-bottom: 14px;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

.category-section {
  padding: 42px;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(255, 237, 213, .85), rgba(252, 231, 243, .85));
}

.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: end;
  overflow: hidden;
  border-radius: 24px;
  padding: 20px;
  color: #fff;
  box-shadow: 0 16px 30px rgba(15, 23, 42, .16);
  isolation: isolate;
}

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

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, .84));
}

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

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

.category-tile em {
  margin-top: 8px;
  color: rgba(255, 255, 255, .84);
  font-size: 13px;
  line-height: 1.5;
  font-style: normal;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: start;
}

.year-grid {
  display: grid;
  gap: 18px;
}

.year-panel,
.ranking-card,
.filter-panel,
.detail-text,
.table-wrap,
.category-overview-card,
.page-hero,
.detail-hero,
.player-section {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .90);
  box-shadow: 0 12px 36px rgba(15, 23, 42, .08);
}

.year-panel {
  padding: 20px;
}

.year-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.year-title strong {
  font-size: 28px;
  color: #ea580c;
}

.year-title span {
  color: var(--muted);
  font-weight: 800;
}

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

.ranking-card {
  position: sticky;
  top: 92px;
  padding: 24px;
}

.ranking-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.ranking-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: #fff;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  font-weight: 900;
}

.ranking-head h2 {
  margin: 0;
  font-size: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background .2s ease, transform .2s ease;
}

.rank-item:hover {
  background: #fff7ed;
  transform: translateX(3px);
}

.rank-num {
  width: 26px;
  color: #ea580c;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.rank-info {
  display: grid;
  min-width: 0;
}

.rank-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  margin-top: 4px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.breadcrumb a {
  color: #ea580c;
  font-weight: 800;
}

.page-hero {
  margin-bottom: 28px;
  padding: clamp(28px, 5vw, 52px);
  background: linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(255, 237, 213, .86));
}

.page-hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1;
  letter-spacing: -.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 17px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 160px 160px;
  gap: 12px;
  margin-bottom: 28px;
  padding: 18px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  color: #111827;
  background: #f8fafc;
  padding: 0 14px;
  box-shadow: inset 0 0 0 1px #e5e7eb;
}

.category-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
}

.empty-state {
  display: none;
  margin: 32px 0;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

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

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
}

.category-cover {
  overflow: hidden;
  border-radius: 20px;
  background: #111827;
}

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

.category-overview-card h2 {
  margin: 8px 0 10px;
  font-size: 26px;
}

.category-overview-card p {
  color: var(--muted);
  line-height: 1.7;
}

.sample-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.sample-row span {
  border-radius: 999px;
  color: #7c2d12;
  background: #ffedd5;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
}

.podium-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 28px;
}

.podium-card {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-radius: 28px;
  color: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  isolation: isolate;
  box-shadow: var(--shadow);
}

.podium-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.podium-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, .92));
}

.podium-card span {
  width: fit-content;
  border-radius: 999px;
  background: rgba(249, 115, 22, .95);
  padding: 7px 12px;
  font-weight: 900;
}

.podium-card h2 {
  margin: 14px 0 8px;
  font-size: 30px;
}

.podium-card p {
  margin: 0;
  color: rgba(255, 255, 255, .84);
  line-height: 1.6;
}

.table-wrap {
  overflow-x: auto;
  padding: 10px;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.ranking-table th,
.ranking-table td {
  text-align: left;
  border-bottom: 1px solid #eef2f7;
  padding: 14px;
}

.ranking-table th {
  color: var(--muted);
  font-size: 13px;
}

.table-rank {
  color: #ea580c;
  font-weight: 900;
}

.table-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.table-title img {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  background: #111827;
}

.detail-hero {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  padding: clamp(22px, 5vw, 38px);
  margin-bottom: 28px;
  background: linear-gradient(135deg, #fff, #fff7ed);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow);
  background: #111827;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
}

.detail-info h1 {
  margin: 14px 0 16px;
  font-size: clamp(36px, 7vw, 66px);
  line-height: 1;
  letter-spacing: -.06em;
}

.detail-info p {
  max-width: 780px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags {
  margin: 22px 0;
}

.detail-stats {
  margin-bottom: 26px;
}

.detail-stats span {
  border-radius: 16px;
  color: #0f172a;
  background: #f8fafc;
  font-weight: 900;
  padding: 12px 16px;
  box-shadow: inset 0 0 0 1px #e5e7eb;
}

.player-section {
  padding: 18px;
  margin-bottom: 28px;
  background: #0f172a;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #fff;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(15, 23, 42, .25), rgba(15, 23, 42, .82));
  transition: opacity .2s ease, visibility .2s ease;
}

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

.play-icon {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 20px 40px rgba(249, 115, 22, .34);
  font-size: 32px;
  padding-left: 4px;
}

.player-overlay strong {
  max-width: min(760px, 86%);
  font-size: clamp(22px, 5vw, 44px);
  line-height: 1.1;
}

.detail-text {
  padding: clamp(24px, 5vw, 42px);
  margin-bottom: 14px;
}

.detail-text h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.detail-text p {
  color: #475569;
  font-size: 17px;
  line-height: 2;
  margin: 0 0 28px;
}

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
  padding: 50px 0;
}

.site-footer h3 {
  color: #fff;
  margin: 0 0 14px;
}

.site-footer p,
.site-footer li {
  color: #94a3b8;
  line-height: 1.8;
}

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

.site-footer a:hover {
  color: #fb923c;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: #94a3b8;
  padding: 18px;
}

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

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

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

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

  .ranking-card {
    position: static;
  }

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

@media (max-width: 820px) {
  .hero-carousel {
    min-height: 560px;
  }

  .hero-content {
    padding-top: 88px;
  }

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

  .category-section {
    padding: 24px;
  }

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

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

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

  .brand-text {
    font-size: 18px;
  }

  .hero-carousel {
    min-height: 520px;
  }

  .movie-grid,
  .category-grid,
  .podium-grid,
  .category-overview-grid,
  .footer-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .podium-card {
    min-height: 340px;
  }

  .detail-poster {
    max-width: none;
  }
}
