:root {
  --bg: #fffaf3;
  --panel: #ffffff;
  --text: #24130a;
  --muted: #7c6a5a;
  --line: rgba(124, 58, 18, 0.14);
  --amber: #f59e0b;
  --orange: #ea580c;
  --brown: #7c2d12;
  --shadow: 0 24px 60px rgba(124, 45, 18, 0.16);
  --soft-shadow: 0 12px 32px rgba(124, 45, 18, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 250, 243, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-logo,
.footer-logo {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--brown);
}

.site-logo::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.18);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: #5f4632;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 10px 24px rgba(234, 88, 12, 0.25);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  color: #fff;
  background: var(--orange);
}

.hero-section {
  background: linear-gradient(105deg, #78350f 0%, #c2410c 48%, #78350f 100%);
  color: #fff;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
}

.hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 20px 82px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: 42px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  margin: 0;
  color: #ffedd5;
  font-size: 18px;
}

.hero-search {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  max-width: 560px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.hero-search input {
  width: 100%;
  min-width: 0;
  padding: 12px 16px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.76);
}

.hero-search button,
.primary-link,
.secondary-link,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  white-space: nowrap;
  font-weight: 900;
  transition: 0.22s ease;
}

.hero-search button,
.primary-link {
  color: #7c2d12;
  background: #fff7ed;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.secondary-link,
.section-link {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.14);
}

.section-link {
  color: var(--orange);
  border-color: rgba(234, 88, 12, 0.18);
  background: #fff7ed;
  box-shadow: none;
}

.hero-search button:hover,
.primary-link:hover,
.secondary-link:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.hero-actions,
.hero-cats {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-cats a {
  padding: 7px 12px;
  border-radius: 999px;
  color: #fffbeb;
  background: rgba(255, 255, 255, 0.12);
  font-size: 14px;
  font-weight: 700;
}

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

.hero-card {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow);
  transform: translateY(0);
  transition: 0.28s ease;
  isolation: isolate;
}

.hero-card:nth-child(2) {
  margin-top: 36px;
}

.hero-card:nth-child(3) {
  margin-top: 72px;
}

.hero-card:hover {
  transform: translateY(-8px) scale(1.025);
}

.hero-card img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
  background: linear-gradient(145deg, #fef3c7, #fb923c);
  transition: 0.35s ease;
}

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

.hero-card-shade,
.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.84));
  z-index: 1;
}

.hero-card .hero-tag,
.hero-card strong,
.hero-card small {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
}

.hero-card .hero-tag {
  top: 18px;
  right: auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--amber);
  font-size: 12px;
  font-weight: 800;
}

.hero-card strong {
  bottom: 78px;
  font-size: 23px;
  line-height: 1.2;
}

.hero-card small {
  bottom: 22px;
  color: #e5e7eb;
  font-size: 13px;
}

.content-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 54px 20px;
}

.intro-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.intro-card,
.category-tile,
.movie-card,
.page-hero,
.detail-hero,
.player-wrap,
.detail-text {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--soft-shadow);
}

.intro-card {
  border-radius: 28px;
  padding: 28px;
}

.intro-card.accent {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.intro-card h2,
.section-heading h2,
.detail-text h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.intro-card p,
.section-heading p,
.detail-text p,
.category-tile p,
.movie-card p {
  margin: 0;
  color: var(--muted);
}

.intro-card.accent p {
  color: #fff7ed;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  transition: 0.24s ease;
}

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

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

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

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-style: normal;
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.card-body {
  padding: 16px;
}

.meta-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #9a6b45;
  font-size: 13px;
  font-weight: 800;
}

.meta-line span,
.detail-meta span {
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff7ed;
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 950;
}

.movie-card h3 a:hover {
  color: var(--orange);
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

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

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

.tag-row.large span {
  padding: 6px 11px;
  font-size: 13px;
}

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

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

.category-tile {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 26px;
  padding: 22px;
  transition: 0.24s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(234, 88, 12, 0.35);
  box-shadow: var(--shadow);
}

.category-tile strong {
  font-size: 24px;
  font-weight: 950;
  color: var(--brown);
}

.category-tile div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.category-tile div span {
  max-width: 100%;
  overflow: hidden;
  padding: 4px 8px;
  border-radius: 999px;
  color: #9a3412;
  background: #fff7ed;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-strip {
  padding-top: 20px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(124, 45, 18, 0.08);
  transition: 0.22s ease;
}

.mini-card:hover {
  transform: translateX(4px);
  border-color: rgba(234, 88, 12, 0.32);
}

.mini-card img {
  width: 78px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(145deg, #fed7aa, #fb923c);
}

.mini-card strong,
.mini-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card strong {
  font-size: 17px;
  font-weight: 950;
}

.mini-card small {
  color: var(--muted);
}

.page-hero {
  max-width: 1180px;
  margin: 28px auto 0;
  border-radius: 32px;
  color: #fff;
  background: linear-gradient(120deg, #78350f, #ea580c);
}

.compact-hero {
  padding: 54px 34px;
}

.compact-hero h1 {
  font-size: clamp(32px, 5vw, 56px);
}

.filter-bar {
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px;
  gap: 12px;
}

.filter-bar.search-wide {
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(234, 88, 12, 0.18);
  border-radius: 16px;
  padding: 13px 15px;
  color: var(--text);
  background: #fff;
  outline: 0;
  box-shadow: 0 8px 24px rgba(124, 45, 18, 0.07);
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.12);
}

.movie-card.is-hidden {
  display: none;
}

.detail-hero {
  max-width: 1180px;
  margin: 28px auto 0;
  border-radius: 34px;
  padding: 24px;
  background: linear-gradient(120deg, #78350f, #c2410c 52%, #fff7ed 52%, #fffaf3);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #ffedd5;
  font-weight: 800;
}

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

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

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  object-fit: cover;
  background: linear-gradient(145deg, #fed7aa, #fb923c);
  box-shadow: var(--shadow);
}

.detail-info {
  color: var(--text);
}

.detail-info .eyebrow {
  color: #7c2d12;
  background: #ffedd5;
}

.detail-info h1 {
  color: #24130a;
}

.detail-one-line {
  max-width: 760px;
  color: #614832;
}

.detail-meta {
  margin-top: 18px;
}

.detail-info .primary-link {
  margin-top: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.player-section {
  padding-top: 34px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #111827;
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.38);
  cursor: pointer;
  transition: 0.22s ease;
}

.player-cover:hover {
  background: rgba(0, 0, 0, 0.26);
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 5px;
  color: #7c2d12;
  background: #fff7ed;
  font-size: 34px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

.player-cover strong {
  max-width: min(720px, 86%);
  overflow: hidden;
  font-size: clamp(22px, 4vw, 36px);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-text {
  border-radius: 30px;
}

.detail-text h2 + p {
  margin-bottom: 28px;
}

.related-grid .movie-card.compact p {
  min-height: 0;
}

.site-footer {
  margin-top: 36px;
  border-top: 1px solid var(--line);
  background: #fff7ed;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--orange);
  font-weight: 800;
}

@media (max-width: 1024px) {
  .hero-inner,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .hero-card:nth-child(2),
  .hero-card:nth-child(3) {
    margin-top: 0;
  }

  .detail-hero {
    background: linear-gradient(120deg, #78350f, #c2410c);
  }

  .detail-info,
  .detail-info h1 {
    color: #fff;
  }

  .detail-one-line {
    color: #ffedd5;
  }
}

@media (max-width: 760px) {
  .header-inner {
    align-items: flex-start;
    flex-wrap: wrap;
  }

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

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav.open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    border-radius: 14px;
  }

  .hero-inner {
    padding: 48px 16px 56px;
  }

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

  .hero-search,
  .hero-actions,
  .rank-list,
  .intro-strip,
  .filter-bar,
  .filter-bar.search-wide {
    grid-template-columns: 1fr;
  }

  .hero-search {
    border-radius: 22px;
  }

  .hero-feature-grid,
  .movie-grid,
  .category-grid,
  .category-grid.wide {
    grid-template-columns: 1fr;
  }

  .content-section {
    padding: 38px 16px;
  }

  .compact-hero,
  .detail-hero {
    margin: 18px 16px 0;
    padding: 30px 20px;
    border-radius: 26px;
  }

  .detail-layout {
    gap: 22px;
  }

  .detail-poster img {
    max-width: 280px;
    margin: 0 auto;
  }

  .footer-inner {
    align-items: flex-start;
  }
}
