:root {
  --primary: #e14f11;
  --primary-light: #f0691b;
  --primary-soft: #fef6ee;
  --secondary: #50675e;
  --accent: #eeac07;
  --warm-50: #faf8f5;
  --warm-100: #f2ede4;
  --warm-200: #e4d8c7;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #ece5dc;
  --card: #ffffff;
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, .08);
  --shadow-medium: 0 10px 30px rgba(0, 0, 0, .12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, var(--warm-50) 48%, var(--warm-100) 100%);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
}

.header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  color: var(--primary);
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  box-shadow: 0 8px 20px rgba(225, 79, 17, .25);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-weight: 700;
  color: #4b5563;
}

.desktop-nav a,
.mobile-nav a {
  position: relative;
  transition: color .2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--primary);
}

.desktop-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 3px;
  border-radius: 999px;
  background: var(--primary);
}

.nav-toggle {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: var(--primary-soft);
  color: var(--primary);
  cursor: pointer;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
  gap: 10px;
  flex-direction: column;
  font-weight: 700;
}

.mobile-nav.is-open {
  display: flex;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .9s ease;
}

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

.hero-slide img {
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .86) 0%, rgba(0, 0, 0, .56) 42%, rgba(0, 0, 0, .18) 100%), linear-gradient(0deg, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .05) 48%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 76px;
  width: min(1180px, calc(100% - 48px));
  transform: translateX(-50%);
  color: #fff;
}

.hero-content h1 {
  max-width: 760px;
  margin: 10px 0 16px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -.04em;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffd89e;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
}

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

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

.hero-meta span,
.detail-meta span {
  padding: 8px 12px;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px);
}

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

.btn,
.filter-panel button,
.home-search button,
.small-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  padding: 13px 20px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover,
.filter-panel button:hover,
.home-search button:hover,
.small-play:hover {
  transform: translateY(-2px);
}

.btn.primary,
.filter-panel button,
.home-search button,
.small-play {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  box-shadow: 0 12px 26px rgba(225, 79, 17, .26);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, .18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24);
  backdrop-filter: blur(8px);
}

.btn.ghost.dark {
  color: var(--primary);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn.small {
  padding: 10px 16px;
  color: #fff;
  background: var(--primary);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

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

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

.section-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.section-block.warm,
.home-search-section {
  background: rgba(242, 237, 228, .58);
}

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

.section-head h2,
.category-preview-head h2,
.search-card h2,
.content-panel h2 {
  margin: 6px 0 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.2;
  letter-spacing: -.03em;
}

.text-link {
  color: var(--primary);
  font-weight: 900;
}

.search-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(300px, 560px);
  gap: 24px;
  align-items: center;
  padding-top: 42px;
  padding-bottom: 42px;
}

.home-search {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.home-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.home-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(240, 105, 27, .12);
}

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

.category-tile {
  min-height: 142px;
  padding: 22px;
  border: 1px solid rgba(225, 79, 17, .12);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff 0%, var(--primary-soft) 100%);
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease;
}

.category-tile:hover,
.movie-card:hover,
.rank-item:hover,
.category-preview:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.category-tile span {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 900;
  color: var(--primary);
}

.category-tile small {
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #1f2937;
}

.poster-link img {
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
}

.card-badge,
.play-chip {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.card-badge {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(4px);
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 8px 11px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  box-shadow: 0 8px 20px rgba(0, 0, 0, .26);
}

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

.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-body h3 a:hover {
  color: var(--primary);
}

.movie-card p,
.rank-body p,
.category-preview p,
.page-hero p,
.footer-inner p {
  color: var(--muted);
}

.movie-card p {
  min-height: 52px;
  margin: 0 0 12px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-line {
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.meta-line span + span::before {
  content: "·";
  margin-right: 8px;
  color: #c4b8a8;
}

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

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  background: var(--primary-soft);
}

.large-tags span {
  padding: 8px 12px;
  font-size: 13px;
}

.page-main {
  min-height: 60vh;
}

.page-hero {
  color: #fff;
  background: radial-gradient(circle at top left, rgba(240, 105, 27, .65), transparent 32%), linear-gradient(135deg, #111827 0%, #2b1b13 54%, #4b1d0c 100%);
}

.slim-hero .section-inner {
  padding-top: 74px;
  padding-bottom: 70px;
}

.slim-hero h1 {
  max-width: 860px;
  margin: 12px 0 14px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.slim-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, .78);
  font-size: 18px;
}

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

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px 160px auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  font-weight: 900;
  color: #374151;
}

.filter-panel label span {
  font-size: 13px;
  color: var(--muted);
}

.category-preview-list {
  padding-top: 56px;
  padding-bottom: 56px;
  display: grid;
  gap: 24px;
}

.category-preview {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease;
}

.rank-number {
  color: var(--primary);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.rank-poster {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

.rank-poster img {
  height: 100%;
  object-fit: cover;
}

.rank-body h3 {
  margin: 0 0 5px;
  font-size: 20px;
}

.rank-body p {
  margin: 0 0 8px;
}

.compact-rank-list .rank-item:nth-child(n+7) {
  display: none;
}

.detail-hero {
  background: radial-gradient(circle at top right, rgba(238, 172, 7, .24), transparent 30%), linear-gradient(135deg, #111827 0%, #2d1a12 58%, #51200f 100%);
  color: #fff;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 64px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, .34);
  background: #111827;
}

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

.detail-info h1 {
  margin: 8px 0 16px;
  max-width: 850px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.06;
  letter-spacing: -.05em;
}

.detail-lead {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, .82);
  font-size: 19px;
}

.player-block {
  background: #111827;
}

.player-block .section-head h2 {
  color: #fff;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  background: radial-gradient(circle, rgba(240, 105, 27, .38), rgba(0, 0, 0, .52) 54%, rgba(0, 0, 0, .76) 100%);
  cursor: pointer;
}

.player-cover[hidden] {
  display: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  box-shadow: 0 18px 38px rgba(225, 79, 17, .36);
}

.content-panel {
  max-width: 960px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.content-panel h2 {
  margin-top: 34px;
}

.content-panel p {
  color: #374151;
  font-size: 18px;
}

.site-footer {
  border-top: 1px solid var(--warm-200);
  background: linear-gradient(180deg, var(--warm-50), var(--warm-100));
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
}

.footer-inner p {
  margin: 8px 0 0;
}

[hidden] {
  display: none !important;
}

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

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

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

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

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    bottom: 70px;
  }

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

  .hero-control {
    display: none;
  }

  .section-head,
  .category-preview-head,
  .search-card {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .home-search {
    width: 100%;
    flex-direction: column;
  }

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

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

  .rank-item {
    grid-template-columns: 44px 76px minmax(0, 1fr);
  }

  .small-play {
    grid-column: 2 / 4;
  }

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

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

@media (max-width: 520px) {
  .header-inner,
  .section-inner,
  .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-content {
    width: calc(100% - 32px);
  }

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

  .rank-item {
    grid-template-columns: 42px 70px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-body p,
  .rank-body .tag-row {
    display: none;
  }
}
