:root {
  --bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --panel: #ffffff;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --accent: #f97316;
  --accent-deep: #ea580c;
  --accent-soft: #fff7ed;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.96);
  color: #fff;
  box-shadow: 0 18px 30px rgba(2, 6, 23, 0.22);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #fbbf24);
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.38);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
}

.nav-link,
.nav-search-button,
.mobile-link {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-search-button:hover,
.mobile-link:hover {
  color: var(--accent);
}

.nav-search-button,
.mobile-menu-button {
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.mobile-menu-button {
  display: none;
  font-size: 24px;
}

.header-search,
.mobile-nav {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.header-search.is-open,
.mobile-nav.is-open {
  display: block;
}

.search-form {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0;
  display: flex;
  gap: 12px;
}

.search-form input,
.page-filter input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-form input {
  background: var(--dark-soft);
  color: #fff;
  border-color: rgba(148, 163, 184, 0.35);
}

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

.search-form button,
.hero-cta,
.section-link,
.page-filter button,
.play-cover button {
  border: 0;
  border-radius: 14px;
  padding: 12px 22px;
  color: #fff;
  background: var(--accent);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 24px rgba(249, 115, 22, 0.25);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.search-form button:hover,
.hero-cta:hover,
.section-link:hover,
.page-filter button:hover,
.play-cover button:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 18px 28px rgba(234, 88, 12, 0.28);
}

.mobile-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 0 18px;
}

.mobile-link {
  display: block;
  padding: 10px 0;
  color: #e2e8f0;
}

.hero-carousel {
  position: relative;
  height: min(720px, 70vh);
  min-height: 520px;
  overflow: hidden;
  background: var(--dark);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.94), rgba(0,0,0,0.54), rgba(0,0,0,0.05));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  padding: 0 0 58px;
  color: #fff;
}

.hero-badge,
.eyebrow,
.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  color: #fff;
  background: var(--accent);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.hero-badge {
  margin-bottom: 16px;
  padding: 8px 14px;
}

.hero-content h1,
.hero-content h2 {
  max-width: 780px;
  margin: 0 0 16px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: clamp(18px, 2.3vw, 23px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.hero-secondary {
  border-radius: 14px;
  padding: 12px 22px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 700;
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-secondary:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.is-active {
  width: 30px;
  background: var(--accent);
}

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

.content-section {
  margin-bottom: 64px;
}

.content-section.tint {
  margin-left: calc((min(1180px, calc(100vw - 32px)) - 100vw) / 2 + 16px);
  margin-right: calc((min(1180px, calc(100vw - 32px)) - 100vw) / 2 + 16px);
  padding: 56px max(16px, calc((100vw - 1180px) / 2));
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

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

.eyebrow {
  margin-bottom: 10px;
  padding: 6px 12px;
  background: rgba(249, 115, 22, 0.12);
  color: var(--accent-deep);
}

.section-heading h2,
.page-heading h1,
.detail-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.section-heading p,
.page-heading p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 17px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--dark-soft);
}

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

.movie-card:hover .poster-wrap img,
.compact-card:hover img,
.rank-card:hover img {
  transform: scale(1.07);
}

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

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 25px;
  margin-bottom: 10px;
}

.card-tags span,
.detail-tags span,
.category-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: #9a3412;
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h2 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.3;
  font-weight: 850;
}

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

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

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

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

.movie-card-large {
  position: relative;
  min-height: 300px;
  color: #fff;
}

.movie-card-large .poster-wrap {
  height: 100%;
  min-height: 300px;
  aspect-ratio: auto;
}

.movie-card-overlay {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0));
}

.movie-card-overlay strong {
  font-size: 25px;
  line-height: 1.2;
}

.movie-card-overlay em {
  color: #e2e8f0;
  font-size: 14px;
  font-style: normal;
  line-height: 1.55;
}

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

.compact-card,
.rank-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 16px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card:hover,
.rank-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.compact-card img,
.rank-card img {
  width: 94px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.compact-card strong,
.rank-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 16px;
  line-height: 1.35;
}

.compact-card small,
.rank-card small {
  color: var(--muted);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 12px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
}

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

.category-card {
  display: block;
  min-height: 170px;
  border: 1px solid rgba(249, 115, 22, 0.14);
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(135deg, #fff, #fff7ed);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 21px;
}

.category-card span {
  color: var(--muted);
  line-height: 1.65;
}

.page-filter {
  display: flex;
  gap: 12px;
  margin: 0 0 28px;
}

.no-results {
  display: none;
  border-radius: 18px;
  padding: 28px;
  color: var(--muted);
  background: #fff;
  text-align: center;
}

.no-results.is-visible {
  display: block;
}

.breadcrumb {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--accent-deep);
}

.player-shell {
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 28px 60px rgba(2, 6, 23, 0.32);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.25);
  cursor: pointer;
}

.play-cover img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: saturate(1.1);
}

.play-cover button {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  font-size: 18px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.detail-panel,
.side-panel {
  border-radius: 22px;
  padding: 28px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
}

.detail-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 850;
}

.detail-panel p {
  color: #334155;
  line-height: 1.9;
  margin: 0 0 18px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0 0;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 24px;
}

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  font-size: 13px;
}

.pagination-like {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 26px;
}

.pagination-like a {
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.pagination-like a:hover {
  color: var(--accent-deep);
}

@media (max-width: 980px) {
  .desktop-nav {
    display: none;
  }

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

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

  .detail-layout {
    display: block;
  }

  .side-panel {
    margin-top: 24px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    height: 58px;
  }

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

  .hero-carousel {
    min-height: 560px;
    height: 75vh;
  }

  .hero-content {
    padding-bottom: 74px;
  }

  .hero-arrow {
    top: auto;
    bottom: 20px;
  }

  .hero-prev {
    left: 16px;
  }

  .hero-next {
    right: 16px;
  }

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

  .section-heading,
  .page-heading,
  .page-filter,
  .search-form {
    display: block;
  }

  .search-form input,
  .page-filter input {
    margin-bottom: 10px;
  }

  .main-wrap {
    padding-top: 34px;
  }

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