* {
  box-sizing: border-box;
}

:root {
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #ffffff;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --accent: #f97316;
  --accent-dark: #ea580c;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.26);
}

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.36);
}

.brand-text {
  font-size: 21px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 15px;
  font-weight: 650;
}

.main-nav a {
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.main-nav a:hover {
  color: #fb923c;
  opacity: 1;
}

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

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #0f172a;
}

.hero-track {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 420px);
  align-items: center;
  gap: 48px;
  padding: 78px max(24px, calc((100vw - 1180px) / 2)) 88px;
  color: #fff;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.82) 46%, rgba(15, 23, 42, 0.62) 100%), var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.15);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 180px;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.8), transparent);
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  padding: 7px 14px;
  border: 1px solid rgba(251, 146, 60, 0.45);
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(251, 146, 60, 0.14);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 22px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.72;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.quick-search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.quick-search-form button {
  color: #fff;
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.34);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.quick-search-form button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  justify-self: end;
  width: min(100%, 390px);
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.48);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

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

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

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

.section-head > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #fff7ed;
  box-shadow: var(--soft-shadow);
}

.section-head h2 {
  margin: 0;
  color: #1e293b;
  font-size: clamp(26px, 3vw, 36px);
}

.section-more,
.text-link {
  color: var(--accent-dark);
  font-weight: 800;
}

.quick-search {
  padding-top: 38px;
  padding-bottom: 38px;
}

.quick-search-card {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 480px);
  align-items: center;
  gap: 24px;
  padding: 28px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

.quick-search-card p {
  margin: 0;
  color: var(--muted);
}

.quick-search-form {
  display: flex;
  gap: 12px;
}

.quick-search-form input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.quick-search-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

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

.category-tile {
  min-height: 176px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-6px) scale(1.01);
  background: linear-gradient(135deg, #f97316 0%, #c2410c 100%);
  box-shadow: 0 20px 44px rgba(249, 115, 22, 0.24);
}

.category-tile span {
  font-size: 34px;
}

.category-tile strong {
  font-size: 20px;
}

.category-tile em {
  color: rgba(255, 255, 255, 0.76);
  font-style: normal;
  font-size: 13px;
  line-height: 1.55;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--soft-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.featured-grid .poster-link,
.rank-list-grid .poster-link {
  aspect-ratio: 16 / 11;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.62));
}

.card-badge,
.card-score,
.rank-index {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-badge {
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(249, 115, 22, 0.94);
}

.card-score {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(10px);
}

.rank-index {
  left: 12px;
  top: 12px;
  width: 40px;
  height: 40px;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
  box-shadow: 0 12px 26px rgba(249, 115, 22, 0.32);
}

.rank-index + .poster-link .card-badge {
  display: none;
}

.card-body {
  padding: 18px;
}

.card-body h2 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h2 a {
  transition: color 0.2s ease;
}

.movie-card:hover .card-body h2 a {
  color: var(--accent-dark);
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
}

.card-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.dark-section {
  background: linear-gradient(90deg, #1e293b 0%, #0f172a 100%);
}

.dark-section .section-head h2,
.dark-section .section-more {
  color: #fff;
}

.dark-section .section-icon {
  background: rgba(255, 255, 255, 0.1);
}

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

.rank-grid .movie-card {
  display: grid;
  grid-template-columns: 210px 1fr;
}

.rank-grid .poster-link {
  aspect-ratio: auto;
  height: 100%;
}

.page-hero {
  color: #fff;
  background: radial-gradient(circle at 18% 20%, rgba(249, 115, 22, 0.34), transparent 34%), linear-gradient(90deg, #1e293b 0%, #0f172a 100%);
}

.page-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 78px 0 72px;
  text-align: center;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 60px);
}

.page-hero p {
  max-width: 740px;
  margin: 0 auto;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.75;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.filter-panel label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

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

.category-overview-card {
  overflow: hidden;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.category-cover {
  display: block;
  padding: 16px 16px 0;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  overflow: hidden;
  border-radius: 20px;
  background: #0f172a;
}

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

.category-overview-body {
  padding: 22px;
}

.category-icon {
  font-size: 34px;
}

.category-overview-body h2 {
  margin: 8px 0 10px;
  font-size: 24px;
}

.category-overview-body p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.65;
}

.empty-state {
  padding: 54px 20px;
  border-radius: 24px;
  color: #64748b;
  background: #fff;
  text-align: center;
  box-shadow: var(--soft-shadow);
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--accent-dark);
  font-weight: 750;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  gap: 24px;
  align-items: stretch;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #020617;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.58));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
  box-shadow: 0 18px 42px rgba(249, 115, 22, 0.4);
  font-size: 34px;
}

.detail-info-card {
  padding: 30px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  box-shadow: var(--shadow);
}

.detail-label {
  display: inline-flex;
  margin-bottom: 16px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.16);
  font-size: 13px;
  font-weight: 800;
}

.detail-info-card h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

.detail-one-line {
  margin: 0 0 22px;
  color: #cbd5e1;
  line-height: 1.72;
}

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

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 750;
}

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

.content-card {
  padding: 28px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 25px;
}

.content-card p {
  margin: 0;
  color: #475569;
  font-size: 16px;
  line-height: 1.86;
}

.site-footer {
  margin-top: 42px;
  color: #cbd5e1;
  background: #0f172a;
}

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

.footer-logo {
  color: #fff;
}

.footer-brand p {
  max-width: 440px;
  color: #94a3b8;
  line-height: 1.75;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.footer-links a {
  color: #cbd5e1;
  font-size: 14px;
  transition: color 0.2s ease;
}

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

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

[hidden] {
  display: none !important;
}

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

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

  .hero-poster {
    display: none;
  }

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

  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .header-inner {
    width: min(100% - 24px, 1180px);
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: #0f172a;
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
  }

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

  .main-nav a {
    padding: 13px 14px;
    border-radius: 12px;
  }

  .main-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .hero,
  .hero-track {
    min-height: 560px;
  }

  .hero-slide {
    padding: 56px 20px 82px;
  }

  .quick-search-card,
  .detail-content,
  .footer-inner,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .quick-search-form {
    flex-direction: column;
  }

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

  .rank-grid .movie-card {
    display: block;
  }

  .rank-grid .poster-link {
    aspect-ratio: 16 / 10;
  }
}

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

  .section-wrap {
    width: min(100% - 24px, 1180px);
    padding: 46px 0;
  }

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

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

  .hero p {
    font-size: 17px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .category-grid,
  .movie-grid,
  .featured-grid,
  .compact-grid,
  .rank-grid,
  .rank-list-grid {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .category-preview img {
    height: 100px;
  }

  .detail-info-card,
  .content-card {
    padding: 22px;
  }

  .play-circle {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
}
