:root {
  --orange: #f97316;
  --amber: #f59e0b;
  --yellow: #facc15;
  --red: #ef4444;
  --ink: #111827;
  --muted: #6b7280;
  --line: #f1f5f9;
  --soft: #fff7ed;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(124, 45, 18, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, var(--orange), var(--amber), var(--yellow));
  color: #ffffff;
  box-shadow: 0 12px 36px rgba(154, 52, 18, 0.24);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--orange);
  background: #ffffff;
  border-radius: 50%;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(255, 255, 255, 0.25);
}

.brand-text strong,
.footer-logo {
  display: block;
  font-size: 23px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.brand-text small {
  display: block;
  color: #fff7ed;
  font-size: 12px;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #fff7ed;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  width: min(330px, 30vw);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  color: var(--ink);
  background: transparent;
}

.header-search button {
  border: 0;
  color: var(--orange);
  background: transparent;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  font-size: 26px;
  cursor: pointer;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  color: #ffffff;
  overflow: hidden;
  background: linear-gradient(135deg, #c2410c, #f97316 42%, #facc15);
}

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

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

.hero-slide::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(26px) saturate(1.35);
  transform: scale(1.12);
  opacity: 0.34;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 10%, rgba(255, 255, 255, 0.24), transparent 34%),
    linear-gradient(90deg, rgba(124, 45, 18, 0.86), rgba(245, 158, 11, 0.72), rgba(250, 204, 21, 0.64));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 56px;
  min-height: 640px;
  padding: 80px 0;
}

.hero-copy {
  max-width: 760px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.section-kicker {
  color: var(--orange);
  background: #ffedd5;
  border-color: #fed7aa;
}

.hero-copy h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 8vw, 78px);
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 950;
}

.hero-subtitle {
  max-width: 720px;
  margin: 0 0 24px;
  color: #fff7ed;
  font-size: clamp(18px, 2.4vw, 25px);
}

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

.hero-tags span,
.detail-meta span,
.tag-row span {
  padding: 7px 11px;
  color: #9a3412;
  background: #fff7ed;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

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

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

.primary-button {
  min-height: 48px;
  padding: 0 24px;
  color: var(--orange);
  background: #ffffff;
  box-shadow: 0 15px 35px rgba(124, 45, 18, 0.2);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.primary-button.full {
  width: 100%;
}

.ghost-button {
  min-height: 48px;
  padding: 0 24px;
  color: #ffffff;
  background: rgba(154, 52, 18, 0.54);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.hero-poster {
  position: relative;
  display: block;
  border: 10px solid rgba(255, 255, 255, 0.18);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 25px 70px rgba(67, 20, 7, 0.42);
  transform: rotate(2.5deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #fb923c, #facc15);
}

.hero-poster span {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 8px 12px;
  color: #92400e;
  background: #ffffff;
  border-radius: 999px;
  font-weight: 900;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  color: #ffffff;
  background: rgba(124, 45, 18, 0.32);
  border-radius: 50%;
  font-size: 40px;
  cursor: pointer;
  transform: translateY(-50%);
}

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

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

.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  z-index: 4;
  display: flex;
  justify-content: center;
  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: 36px;
  background: #ffffff;
}

.search-band,
.content-section {
  padding: 72px 0;
}

.search-band {
  background: #ffffff;
}

.search-band-inner,
.section-heading,
.split-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.search-band h2,
.section-heading h2,
.ranking-card h2,
.page-hero h1,
.detail-card h2 {
  margin: 10px 0 8px;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.search-band p,
.section-heading p,
.page-hero p,
.detail-card p,
.category-tile p,
.category-overview-card p,
.site-footer p {
  margin: 0;
  color: var(--muted);
}

.inline-search,
.filter-panel {
  display: flex;
  gap: 12px;
  width: min(100%, 520px);
}

.inline-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 2px solid #fed7aa;
  border-radius: 999px;
  padding: 0 18px;
  outline: 0;
  background: #ffffff;
}

.filter-panel select {
  width: 190px;
  color: var(--ink);
}

.soft-bg {
  background: linear-gradient(180deg, #fff7ed, #ffffff);
}

.section-heading {
  margin-bottom: 28px;
}

.section-more,
.text-link {
  color: var(--orange);
}

.section-more {
  min-height: 42px;
  padding: 0 18px;
  background: #ffedd5;
}

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

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

.movie-card {
  background: var(--card);
  border: 1px solid #ffedd5;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(124, 45, 18, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fed7aa, #fde68a);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  color: #92400e;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

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

.movie-meta {
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
}

.movie-card h3 {
  min-height: 54px;
  margin: 6px 0;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 900;
}

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

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.rating {
  color: #d97706;
  font-weight: 900;
}

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

.category-tile,
.category-overview-card,
.ranking-card,
.detail-card,
.player-card,
.side-card {
  background: #ffffff;
  border: 1px solid #ffedd5;
  border-radius: var(--radius);
  box-shadow: 0 14px 30px rgba(124, 45, 18, 0.07);
}

.category-tile {
  min-height: 160px;
  padding: 22px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.category-tile span {
  display: block;
  margin-bottom: 10px;
  color: var(--orange);
  font-size: 22px;
  font-weight: 950;
}

.split-grid {
  align-items: flex-start;
}

.split-grid > div {
  flex: 1;
  min-width: 0;
}

.ranking-card {
  position: sticky;
  top: 100px;
  width: 340px;
  padding: 24px;
}

.ranking-list,
.side-ranking {
  list-style: none;
  padding: 0;
  margin: 18px 0 24px;
}

.ranking-list li + li,
.side-ranking li + li {
  border-top: 1px solid #ffedd5;
}

.ranking-list a,
.side-ranking a {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}

.rank-no,
.side-ranking span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  border-radius: 50%;
  font-weight: 900;
}

.ranking-list strong,
.side-ranking strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-list em {
  color: #d97706;
  font-style: normal;
  font-weight: 900;
}

.page-hero,
.detail-hero {
  position: relative;
  color: #ffffff;
  background: linear-gradient(135deg, #c2410c, #f97316, #facc15);
  overflow: hidden;
}

.page-hero {
  padding: 86px 0;
}

.small-hero p,
.category-hero p {
  max-width: 760px;
  color: #fff7ed;
  font-size: 18px;
}

.page-search {
  margin-top: 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  color: #fff7ed;
  font-weight: 700;
}

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

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

.category-overview-card {
  display: block;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-overview-card > div:last-child {
  padding: 22px;
}

.category-cover-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 130px;
  background: #ffedd5;
}

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

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

.ranking-row {
  display: grid;
  grid-template-columns: 74px 92px 1fr 100px;
  align-items: center;
  gap: 18px;
  padding: 14px;
}

.rank-index {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  border-radius: 18px;
  font-size: 22px;
  font-weight: 950;
}

.rank-thumb img {
  width: 92px;
  height: 122px;
  border-radius: 16px;
  object-fit: cover;
  background: #ffedd5;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.2;
}

.rank-info p {
  min-height: auto;
  margin-bottom: 10px;
}

.rank-score {
  text-align: right;
}

.rank-score strong,
.rank-score span {
  display: block;
}

.rank-score strong {
  color: #d97706;
  font-size: 20px;
}

.detail-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: var(--detail-image);
  background-size: cover;
  background-position: center;
  filter: blur(24px) saturate(1.2);
  transform: scale(1.1);
  opacity: 0.42;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(124, 45, 18, 0.92), rgba(245, 158, 11, 0.74));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 52px 0 64px;
}

.detail-intro {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  width: 220px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 8px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: 0 22px 60px rgba(67, 20, 7, 0.36);
  background: #ffedd5;
}

.detail-intro h1 {
  margin: 16px 0 14px;
  font-size: clamp(36px, 7vw, 70px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.detail-intro p {
  max-width: 780px;
  color: #fff7ed;
  font-size: 20px;
}

.detail-section {
  padding-top: 44px;
}

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

.detail-main {
  display: grid;
  gap: 22px;
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: var(--radius);
  overflow: hidden;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.66));
  cursor: pointer;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  padding-left: 5px;
  color: var(--orange);
  background: #ffffff;
  border-radius: 50%;
  font-size: 30px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.player-overlay strong {
  font-size: 20px;
  letter-spacing: 0.08em;
}

.detail-card {
  padding: 26px;
}

.detail-card p {
  font-size: 17px;
}

.detail-sidebar {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 20px;
}

.side-card {
  padding: 22px;
}

.info-list {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  margin: 18px 0 0;
}

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

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

.site-footer {
  padding: 56px 0;
  color: #f9fafb;
  background: linear-gradient(135deg, #111827, #1f2937, #431407);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
}

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

.site-footer p {
  color: #d1d5db;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #fed7aa;
}

.hidden-by-filter {
  display: none !important;
}

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

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

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

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

  .hero-poster {
    display: none;
  }

  .split-grid,
  .search-band-inner {
    display: grid;
  }

  .ranking-card,
  .detail-sidebar {
    position: static;
    width: 100%;
  }

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

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

  .brand-text small {
    display: none;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    padding: 12px;
    background: rgba(154, 52, 18, 0.96);
    border-radius: 20px;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: grid;
  }

  .mobile-menu-button {
    display: block;
  }

  .hero-carousel,
  .hero-content {
    min-height: 590px;
  }

  .hero-content {
    padding: 70px 0 90px;
  }

  .hero-control {
    display: none;
  }

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

  .movie-card h3 {
    min-height: 48px;
    font-size: 16px;
  }

  .movie-card p {
    min-height: 42px;
    font-size: 13px;
  }

  .section-heading,
  .filter-panel,
  .inline-search {
    display: grid;
    width: 100%;
  }

  .filter-panel select {
    width: 100%;
  }

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

  .detail-poster {
    width: 180px;
  }

  .ranking-row {
    grid-template-columns: 52px 74px 1fr;
  }

  .rank-score {
    grid-column: 2 / 4;
    text-align: left;
  }

  .rank-thumb img {
    width: 74px;
    height: 98px;
  }

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

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

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

  .hero-copy h1 {
    font-size: 42px;
  }

  .page-hero {
    padding: 58px 0;
  }

  .detail-card,
  .side-card {
    padding: 20px;
  }
}
