*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --text: #1f2937;
  --muted: #64748b;
  --line: #e5e7eb;
  --brand: #f97316;
  --brand-strong: #ea580c;
  --brand-dark: #9a3412;
  --dark: #0f172a;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.96), rgba(194, 65, 12, 0.96));
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(154, 52, 18, 0.22);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.logo-text {
  max-width: 310px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  padding: 10px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #ffffff;
  border-radius: 999px;
}

main {
  min-height: 70vh;
}

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

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 20%, rgba(249, 115, 22, 0.42), transparent 38%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.58) 46%, rgba(0, 0, 0, 0.12) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.84), transparent 58%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100% - 1180px) / 2));
  right: 32px;
  bottom: 72px;
  max-width: 760px;
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 12px;
  color: #fed7aa;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  text-shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
}

.hero-summary {
  margin: 22px 0 0;
  max-width: 660px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 2vw, 1.22rem);
}

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

.hero-tags {
  margin-top: 20px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-tags span {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

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

.primary-btn,
.ghost-btn,
.primary-small,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn,
.primary-small {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.3);
}

.primary-btn {
  padding: 13px 22px;
}

.primary-small {
  padding: 9px 14px;
  font-size: 0.9rem;
}

.ghost-btn {
  padding: 13px 20px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.primary-btn:hover,
.ghost-btn:hover,
.primary-small:hover,
.text-link:hover {
  transform: translateY(-2px);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.home-search-wrap,
.content-section,
.page-hero,
.detail-hero,
.detail-copy,
.breadcrumb,
.player-section {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.home-search-wrap {
  margin-top: -42px;
  position: relative;
  z-index: 4;
}

.home-search-card,
.search-panel,
.category-overview-card,
.detail-copy,
.player-section {
  background: var(--surface);
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.78);
}

.home-search-card {
  padding: 28px;
}

.home-search-card h2,
.section-title h2,
.category-overview-card h2,
.page-hero h1,
.detail-info h1,
.player-section h2,
.detail-copy h2 {
  margin: 0;
  line-height: 1.18;
}

.home-search-card p,
.section-title p,
.category-overview-card p,
.page-hero p,
.detail-one-line,
.detail-copy p {
  color: var(--muted);
}

.search-panel {
  margin-top: 18px;
  padding: 18px;
}

.search-label {
  display: block;
  margin-bottom: 10px;
  color: var(--dark);
  font-weight: 800;
}

.search-box {
  display: flex;
  gap: 10px;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  outline: none;
  color: var(--text);
  background: #ffffff;
  transition: border 0.25s ease, box-shadow 0.25s ease;
}

.search-box input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.search-box button,
.filter-pill {
  border: 0;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.search-box button {
  min-width: 80px;
  padding: 0 18px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.filter-pill {
  padding: 8px 12px;
}

.filter-pill:hover,
.filter-pill.active,
.search-box button:hover {
  background: var(--brand);
  color: #ffffff;
}

.content-section {
  margin-top: 54px;
}

.section-title,
.category-overview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-title h2 {
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

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

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

.movie-card {
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.84);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.16);
}

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

.poster-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.1);
}

.poster-gradient {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  opacity: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.18), transparent);
  transition: opacity 0.32s ease;
}

.movie-card:hover .poster-gradient {
  opacity: 1;
}

.poster-gradient p {
  margin: 0;
  font-size: 0.9rem;
}

.poster-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 7px;
}

.poster-badges span,
.hot-badge {
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 900;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.7);
}

.poster-badges .hot-badge {
  background: #dc2626;
}

.play-chip {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--brand);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: scale(1);
}

.card-body {
  padding: 16px;
}

.card-body h2 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.25s ease;
}

.movie-card:hover .card-body h2 {
  color: var(--brand-strong);
}

.card-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag-row span {
  padding: 4px 8px;
  background: var(--surface-soft);
  color: var(--brand-dark);
}

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

.category-tile {
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border-radius: 22px;
  color: #ffffff;
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.25), transparent 32%),
    linear-gradient(135deg, #fb923c, #c2410c);
  box-shadow: 0 16px 32px rgba(194, 65, 12, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(194, 65, 12, 0.28);
}

.category-tile strong {
  font-size: 1.18rem;
}

.category-tile span {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
}

.rank-section {
  background: linear-gradient(135deg, #111827, #7c2d12);
  border-radius: 28px;
  padding: 30px;
  color: #ffffff;
  box-shadow: var(--shadow);
}

.rank-section .section-title p,
.rank-section .text-link {
  color: rgba(255, 255, 255, 0.75);
}

.rank-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
}

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

.rank-item a {
  display: grid;
  grid-template-columns: 44px 58px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.25s ease, transform 0.25s ease;
}

.rank-item a:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.rank-num {
  font-size: 1.2rem;
  font-weight: 900;
  color: #fed7aa;
}

.rank-item img {
  width: 58px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-copy {
  min-width: 0;
}

.rank-copy strong,
.rank-copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy em {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.8rem;
  font-style: normal;
}

.page-hero {
  margin-top: 34px;
  border-radius: 30px;
  padding: clamp(34px, 6vw, 72px);
  color: #ffffff;
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.24), transparent 34%),
    linear-gradient(135deg, #ea580c, #111827);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 4rem);
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.05rem;
}

.overview-stack {
  width: min(1180px, calc(100% - 32px));
  margin: 42px auto 0;
  display: grid;
  gap: 28px;
}

.category-overview-card {
  padding: 24px;
}

.category-overview-card .mini-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.detail-hero {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 32px;
  align-items: center;
  padding: 30px;
  border-radius: 30px;
  color: #ffffff;
  background:
    radial-gradient(circle at 78% 24%, rgba(249, 115, 22, 0.38), transparent 30%),
    linear-gradient(135deg, #111827, #431407);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.detail-info h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 780px;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.82);
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0;
}

.detail-meta div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
}

.detail-meta dt {
  color: #fed7aa;
  font-size: 0.82rem;
  font-weight: 800;
}

.detail-meta dd {
  margin: 4px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-tags {
  margin-bottom: 28px;
}

.player-section {
  margin-top: 42px;
  padding: 26px;
}

.player-section h2 {
  margin-bottom: 18px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
}

.player-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.22));
}

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

.big-play {
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.32);
  font-size: 2rem;
}

.corner-play {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #ffffff;
  background: rgba(249, 115, 22, 0.92);
  font-weight: 900;
  cursor: pointer;
}

.player-cover.is-hidden + .corner-play {
  opacity: 0.9;
}

.detail-copy {
  margin-top: 36px;
  padding: 28px;
}

.detail-copy h2 + p {
  margin-top: 12px;
}

.related-section {
  margin-bottom: 20px;
}

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #111827, #020617);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1.05rem;
}

.footer-grid p {
  color: #94a3b8;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: #cbd5e1;
  transition: color 0.25s ease;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 18px 16px 24px;
  text-align: center;
  color: #94a3b8;
}

.no-match {
  grid-column: 1 / -1;
  padding: 26px;
  border-radius: 20px;
  text-align: center;
  background: #ffffff;
  color: var(--muted);
  border: 1px solid var(--line);
}

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

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

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

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

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

  .logo-text {
    max-width: 220px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 18px;
    background: rgba(154, 52, 18, 0.98);
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    padding: 12px 14px;
  }

  .hero-carousel {
    height: 620px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 84px;
  }

  .hero-actions,
  .search-box,
  .section-title,
  .category-overview-head {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box button {
    min-height: 46px;
  }

  .movie-grid,
  .mini-grid,
  .category-grid,
  .rank-list,
  .extended-rank,
  .category-overview-card .mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-section {
    padding: 20px;
  }

  .rank-item a {
    grid-template-columns: 34px 52px 1fr;
  }

  .detail-hero {
    grid-template-columns: 1fr;
    padding: 20px;
  }

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

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

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

@media (max-width: 500px) {
  .movie-grid,
  .mini-grid,
  .category-grid,
  .category-overview-card .mini-grid {
    grid-template-columns: 1fr;
  }

  .home-search-card,
  .search-panel,
  .category-overview-card,
  .detail-copy,
  .player-section {
    border-radius: 18px;
    padding: 18px;
  }

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

  .hero-tags span,
  .tag-row span {
    font-size: 0.76rem;
  }
}
