:root {
  --orange: #f97316;
  --amber: #f59e0b;
  --yellow: #facc15;
  --dark: #15100a;
  --muted: #6b7280;
  --line: #f1e7db;
  --card: #ffffff;
  --bg: #fff7ed;
  --shadow: 0 18px 45px rgba(92, 42, 0, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--dark);
  background: linear-gradient(180deg, #fff7ed 0%, #fff 38%, #fffaf4 100%);
}

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--orange), var(--amber), var(--yellow));
  box-shadow: 0 12px 28px rgba(245, 120, 22, 0.28);
}

.header-inner {
  max-width: 1240px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 900;
  font-size: 24px;
  white-space: nowrap;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.95);
  color: var(--orange);
  box-shadow: 0 8px 22px rgba(90, 31, 0, 0.18);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #fff;
  font-weight: 700;
}

.main-nav a,
.footer-links a,
.section-link {
  transition: transform 0.2s ease, opacity 0.2s ease, color 0.2s ease;
}

.main-nav a:hover,
.footer-links a:hover,
.section-link:hover {
  opacity: 0.82;
  transform: translateY(-1px);
}

.header-search {
  margin-left: auto;
  max-width: 410px;
  flex: 1;
  display: flex;
  gap: 8px;
}

.header-search input,
.large-search input,
.inline-filter input {
  width: 100%;
  border: 2px solid rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  padding: 12px 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.92);
  color: var(--dark);
  font-size: 15px;
}

.header-search button,
.large-search button,
.inline-filter button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: #fff;
  color: var(--orange);
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #130b05;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 46px;
  align-items: center;
  padding: 78px max(24px, calc((100vw - 1240px) / 2)) 72px;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 68% 40%, rgba(249, 115, 22, 0.24), transparent 38%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.62));
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 740px;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #fed7aa;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.hero-content h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

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

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 900;
}

.primary-btn {
  background: linear-gradient(90deg, var(--orange), var(--amber));
  color: #fff;
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.28);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.hero-poster {
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  transform: rotate(1deg);
  background: linear-gradient(135deg, #fed7aa, #fb923c);
  aspect-ratio: 2 / 3;
}

.hero-poster img,
.poster-link img,
.ranking-cover img,
.detail-poster img {
  height: 100%;
  object-fit: cover;
}

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

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

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

.quick-search-panel,
.section-wrap,
.ranking-strip,
.page-hero,
.detail-hero,
.breadcrumb,
.site-footer .footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}

.quick-search-panel {
  margin-top: -46px;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 560px);
  gap: 24px;
  align-items: center;
  padding-top: 28px;
  padding-bottom: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.quick-search-panel h2,
.section-heading h2,
.ranking-intro h2,
.detail-info h1,
.text-panel h2 {
  margin: 0;
}

.large-search,
.inline-filter {
  display: flex;
  gap: 10px;
}

.large-search button,
.inline-filter button {
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--amber));
}

.section-wrap {
  padding-top: 56px;
  padding-bottom: 10px;
}

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

.section-heading h2 {
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.section-heading.light h2,
.section-heading.light .eyebrow {
  color: #fff;
}

.section-link {
  color: var(--orange);
  font-weight: 900;
}

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

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

.category-card {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.18), transparent 38%),
    #fff;
  box-shadow: 0 12px 30px rgba(92, 42, 0, 0.08);
}

.category-card h3 {
  margin: 28px 0 8px;
  font-size: 22px;
}

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

.category-count {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 11px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 12px 32px rgba(92, 42, 0, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 44px rgba(92, 42, 0, 0.14);
}

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

.poster-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.68);
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta,
.detail-meta,
.rank-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-body h3 {
  min-height: 54px;
  margin: 8px 0;
  font-size: 19px;
  line-height: 1.4;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tag-row span {
  border-radius: 999px;
  padding: 5px 9px;
  color: #c2410c;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 800;
}

.ranking-strip {
  margin-top: 58px;
  padding-top: 36px;
  padding-bottom: 36px;
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 30px;
  border-radius: 34px;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 30%),
    linear-gradient(135deg, #431407, #ea580c 55%, #f59e0b);
  box-shadow: var(--shadow);
}

.ranking-intro p {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.8;
}

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

.ranking-list.mini a {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  padding: 13px 16px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.ranking-list.mini strong,
.rank-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #9a3412;
  background: #fff7ed;
}

.ranking-list.mini em {
  color: #fed7aa;
  font-style: normal;
  font-size: 13px;
}

.page-hero {
  margin-top: 36px;
  padding-top: 52px;
  padding-bottom: 52px;
  border-radius: 34px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.24), transparent 28%),
    linear-gradient(135deg, #431407, #f97316 62%, #facc15);
  box-shadow: var(--shadow);
}

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

.category-hero,
.search-hero,
.ranking-hero {
  display: grid;
  gap: 16px;
}

.inline-filter {
  max-width: 720px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--orange);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin-top: 24px;
  padding-top: 28px;
  padding-bottom: 28px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #fed7aa, #f97316);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.lead {
  margin: 18px 0;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta span,
.rank-stats span {
  border-radius: 999px;
  padding: 7px 11px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 800;
}

.player-section {
  max-width: 1240px;
  margin: 24px auto 0;
  padding: 26px 22px 34px;
  border-radius: 34px;
  background: linear-gradient(135deg, #1c0a02, #7c2d12 60%, #f97316);
  box-shadow: var(--shadow);
}

.play-source {
  color: #fed7aa;
  font-weight: 900;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 999px;
  padding: 16px 28px;
  color: #fff;
  background: rgba(249, 115, 22, 0.94);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

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

.detail-content {
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 22px;
}

.text-panel {
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(92, 42, 0, 0.07);
}

.text-panel p {
  color: #4b5563;
  line-height: 2;
  font-size: 16px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 54px 118px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.ranking-cover {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #fed7aa, #f97316);
}

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

.ranking-info p {
  color: var(--muted);
  line-height: 1.7;
}

.site-footer {
  margin-top: 70px;
  color: #fff;
  background: #1c0a02;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 34px;
  padding-bottom: 34px;
}

.footer-inner p {
  color: rgba(255, 255, 255, 0.68);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  font-weight: 800;
}

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

  .hero-slide {
    grid-template-columns: 1fr 260px;
  }
}

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .header-search {
    order: 3;
    min-width: 100%;
  }

  .main-nav {
    margin-left: auto;
  }

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

  .hero-slide,
  .quick-search-panel,
  .ranking-strip,
  .detail-hero,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    width: min(260px, 70vw);
    margin: 0 auto;
  }

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

  .section-heading,
  .footer-inner {
    align-items: start;
    flex-direction: column;
  }

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

@media (max-width: 560px) {
  .logo-text {
    font-size: 20px;
  }

  .main-nav {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
  }

  .hero-slide {
    padding-top: 54px;
  }

  .large-search,
  .inline-filter,
  .header-search {
    flex-direction: column;
  }

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

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

  .ranking-info h2 {
    font-size: 18px;
  }
}
