:root {
  --bg: #f7f7f8;
  --paper: #ffffff;
  --ink: #171717;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --orange: #ea580c;
  --orange-dark: #c2410c;
  --amber: #f59e0b;
  --brown: #7c2d12;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fff7ed 0, var(--bg) 330px, #f8fafc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

img {
  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: 80;
  color: #fff;
  background: linear-gradient(90deg, #9a3412, #ea580c, #f59e0b);
  box-shadow: 0 12px 30px rgba(154, 52, 18, 0.25);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

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

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 700;
}

.desktop-nav a,
.mobile-nav a {
  opacity: 0.92;
  transition: 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: #ffedd5;
  opacity: 1;
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 16px 18px;
  background: rgba(124, 45, 18, 0.96);
}

.mobile-nav a {
  padding: 10px 14px;
  border-radius: 12px;
}

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

.hero-slider {
  position: relative;
  height: min(640px, 80vh);
  min-height: 500px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.15);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.46) 48%, rgba(0, 0, 0, 0.08)), linear-gradient(0deg, #000 0, rgba(0, 0, 0, 0.15) 48%, rgba(0, 0, 0, 0.3) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 0 72px;
  color: #fff;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 16px;
  max-width: 780px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 950;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 26px;
  color: #f3f4f6;
  font-size: 18px;
}

.hero-pills,
.detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.hero-pills span,
.detail-pills span {
  border-radius: 999px;
  padding: 7px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.17);
  backdrop-filter: blur(8px);
}

.hero-actions,
.section-actions,
.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  padding: 0 20px;
  font-weight: 850;
  cursor: pointer;
  transition: 0.22s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 14px 30px rgba(234, 88, 12, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(234, 88, 12, 0.42);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.btn-light {
  color: var(--orange-dark);
  background: #fff7ed;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--amber);
}

.main-space {
  padding: 44px 0 70px;
}

.section {
  margin-top: 44px;
}

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

.section-head h1,
.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.18;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

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

.movie-card,
.category-card,
.detail-panel,
.search-panel,
.rank-list,
.info-card {
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.movie-card {
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fed7aa, #7c2d12);
}

.movie-card-large .poster-link {
  aspect-ratio: 16 / 11;
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 4px 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.58);
  font-size: 13px;
  font-weight: 800;
}

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

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--orange-dark);
  font-size: 13px;
  font-weight: 800;
}

.movie-card h2,
.movie-card h3 {
  margin: 8px 0 8px;
  font-size: 19px;
  line-height: 1.25;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  border-radius: 999px;
  padding: 3px 8px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 12px;
}

.category-card {
  position: relative;
  padding: 22px;
  min-height: 210px;
  background: linear-gradient(135deg, #fff, #fff7ed);
  transition: 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.category-card strong {
  color: var(--orange-dark);
}

.category-samples {
  display: grid;
  gap: 5px;
  color: #374151;
  font-size: 14px;
}

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

.horizontal-scroll .movie-card {
  scroll-snap-align: start;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 70px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 104px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  transition: 0.2s ease;
}

.rank-item:hover {
  background: #fff7ed;
}

.rank-no {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  font-weight: 950;
}

.rank-item img {
  width: 70px;
  height: 70px;
  border-radius: 16px;
  object-fit: cover;
}

.rank-info {
  display: grid;
  gap: 4px;
}

.rank-info strong {
  font-size: 17px;
}

.rank-info em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.filter-bar,
.search-box {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.filter-bar input,
.search-box input,
.filter-bar select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  background: #fff;
  outline: 0;
}

.filter-bar input,
.search-box input {
  flex: 1 1 260px;
}

.detail-hero {
  position: relative;
  padding: 38px 0 54px;
  color: #fff;
  background: #020617;
  overflow: hidden;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.48)), var(--detail-bg);
  background-size: cover;
  background-position: center;
  filter: blur(0px) saturate(1.15);
  transform: scale(1.02);
}

.detail-hero > .container {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #fed7aa;
  font-size: 14px;
}

.detail-title {
  max-width: 900px;
  margin: 0 0 16px;
  font-size: clamp(34px, 5.5vw, 62px);
  line-height: 1.08;
}

.detail-intro {
  max-width: 780px;
  margin: 0 0 20px;
  color: #f3f4f6;
  font-size: 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 26px;
  align-items: start;
}

.detail-panel {
  padding: 24px;
}

.detail-panel h2,
.info-card h2 {
  margin: 0 0 14px;
  font-size: 25px;
}

.detail-panel p {
  margin: 0 0 18px;
  color: #374151;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

.play-layer.is-hidden {
  display: none;
}

.play-layer span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 20px 50px rgba(234, 88, 12, 0.42);
  font-size: 36px;
  padding-left: 5px;
}

.side-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.info-card {
  padding: 20px;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px;
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
  font-weight: 700;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 24px;
}

.search-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.search-card div {
  padding: 14px;
}

.search-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.search-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(90deg, #111827, #1f2937, #111827);
}

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

.footer-brand {
  color: #fff;
  font-size: 22px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 18px;
}

.site-footer p {
  max-width: 420px;
  margin: 14px 0 0;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a:hover {
  color: #fed7aa;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 16px;
  text-align: center;
  font-size: 14px;
}

.empty-state {
  padding: 34px;
  border-radius: 22px;
  color: var(--muted);
  background: #fff;
  text-align: center;
}

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

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

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

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

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

  .hero-control {
    display: none;
  }

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

  .movie-grid,
  .category-grid,
  .rank-list,
  .search-results,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    gap: 18px;
  }
}

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

  .brand {
    font-size: 19px;
  }

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

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

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

  .rank-item {
    grid-template-columns: 42px 58px 1fr;
    gap: 10px;
    padding: 12px;
  }

  .rank-item img {
    width: 58px;
    height: 58px;
  }
}
