:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --orange: #ea580c;
  --red: #ef4444;
  --pink: #ec4899;
  --amber: #f59e0b;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.nav-shell {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--red), var(--pink));
  box-shadow: 0 12px 28px rgba(234, 88, 12, 0.32);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #334155;
  font-weight: 700;
  font-size: 15px;
}

.nav-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: var(--orange);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: #0f172a;
  background: #f1f5f9;
  font-size: 22px;
}

.mobile-panel {
  display: none;
  padding: 12px 24px 22px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.mobile-panel.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-panel a {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 800;
}

.hero-carousel {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444, #ec4899);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

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

.hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.86), rgba(124, 45, 18, 0.72), rgba(236, 72, 153, 0.36));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 660px;
  margin: 0 auto;
  padding: 96px 24px 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.eyebrow.dark {
  color: #c2410c;
  background: #ffedd5;
  border-color: #fed7aa;
}

.hero-content h1 {
  max-width: 840px;
  margin: 0;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.07em;
  text-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.hero-content p {
  max-width: 760px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
  line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.tag-row span {
  color: #9a3412;
  background: #ffedd5;
}

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

.primary-btn,
.ghost-btn,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.home-search button {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 16px 32px rgba(234, 88, 12, 0.35);
}

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

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(10px);
  font-size: 38px;
  line-height: 1;
  transform: translateY(-50%);
}

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

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

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 34px;
  background: #fff;
}

.quick-search,
.section-wrap,
.page-hero,
.breadcrumb,
.detail-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.quick-search {
  margin-top: -58px;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 26px;
  align-items: center;
  padding-top: 26px;
  padding-bottom: 26px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.quick-search h2,
.section-head h2,
.page-hero h1,
.related-panel h2,
.content-card h2 {
  margin: 0;
  color: #0f172a;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.quick-search h2 {
  font-size: 32px;
}

.quick-search p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.home-search,
.filter-bar {
  display: flex;
  gap: 12px;
}

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

.home-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #fb923c;
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.16);
}

.section-wrap {
  padding-top: 76px;
  padding-bottom: 18px;
}

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

.section-head.compact {
  align-items: center;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-head a {
  color: var(--orange);
  font-weight: 900;
}

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

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

.category-tile {
  min-height: 150px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444 58%, #ec4899);
  box-shadow: 0 20px 40px rgba(239, 68, 68, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(239, 68, 68, 0.26);
}

.category-tile strong {
  font-size: 24px;
  font-weight: 950;
}

.category-tile span {
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.6;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-card figure {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #ffedd5, #fecdd3);
  overflow: hidden;
}

.movie-card figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.movie-card figcaption {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.68);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 16px;
}

.card-body h2 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 950;
}

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

.card-meta {
  color: #c2410c !important;
  font-weight: 800;
}

.tag-row {
  margin-top: 12px;
}

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

.ranking-panel,
.related-panel,
.content-card,
.player-card,
.filter-card {
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.ranking-panel {
  padding: 24px;
  position: sticky;
  top: 94px;
}

.rank-list {
  display: grid;
  gap: 12px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 40px 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: #fff7ed;
  transform: translateX(4px);
}

.rank-num {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  font-weight: 950;
}

.rank-item img {
  width: 64px;
  height: 84px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-text strong,
.rank-text em {
  display: block;
}

.rank-text strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.35;
}

.rank-text em {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  padding-top: 74px;
  padding-bottom: 58px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444 56%, #ec4899);
  border-radius: 0 0 38px 38px;
}

.page-hero h1 {
  color: #fff;
  max-width: 860px;
  font-size: clamp(40px, 7vw, 76px);
}

.page-hero p {
  max-width: 780px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
  line-height: 1.8;
}

.filter-card {
  padding: 24px;
  margin-top: 32px;
}

.filter-bar {
  margin-bottom: 24px;
}

.wide-filter {
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(150px, 190px));
  display: grid;
}

.empty-state {
  display: none;
  margin: 28px 0 8px;
  padding: 22px;
  color: var(--muted);
  text-align: center;
  background: #f8fafc;
  border-radius: 18px;
  font-weight: 800;
}

.empty-state.show {
  display: block;
}

.breadcrumb {
  padding-top: 24px;
  padding-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--orange);
  font-weight: 900;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding-top: 32px;
  padding-bottom: 48px;
}

.detail-poster {
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-info h1 {
  max-width: 860px;
  margin: 0;
  color: #0f172a;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.detail-line {
  max-width: 880px;
  margin: 18px 0 0;
  color: #334155;
  font-size: 20px;
  line-height: 1.75;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #7c2d12;
  background: #ffedd5;
  font-weight: 900;
  font-size: 13px;
}

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

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

.player-card,
.content-card,
.related-panel {
  padding: 24px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: #020617;
}

.video-shell video,
.play-cover,
.play-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-shell video {
  z-index: 1;
  object-fit: contain;
}

.play-cover {
  z-index: 3;
  cursor: pointer;
  background: #020617;
}

.play-cover.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.play-cover img {
  object-fit: cover;
  opacity: 0.62;
  filter: saturate(1.12);
}

.play-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(249, 115, 22, 0.32), rgba(15, 23, 42, 0.78));
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 20px 48px rgba(239, 68, 68, 0.34);
  font-size: 38px;
  transform: translate(-50%, -50%);
}

.content-card h2,
.related-panel h2 {
  margin-bottom: 16px;
  font-size: 26px;
}

.content-card p {
  margin: 0 0 24px;
  color: #334155;
  font-size: 17px;
  line-height: 1.95;
}

.related-panel {
  position: sticky;
  top: 94px;
}

.related-list {
  display: grid;
  gap: 14px;
}

.compact-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  border-radius: 18px;
}

.compact-card figure {
  aspect-ratio: 3 / 4;
}

.compact-card .card-body {
  padding: 12px;
}

.compact-card .card-body h2 {
  font-size: 15px;
}

.compact-card .card-body p:not(.card-meta),
.compact-card .tag-row,
.compact-card figcaption {
  display: none;
}

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

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 42px;
}

.footer-brand {
  color: #fff;
}

.site-footer p {
  max-width: 560px;
  margin: 14px 0 0;
  color: #94a3b8;
  line-height: 1.75;
}

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

.site-footer a:not(.footer-brand) {
  display: block;
  margin-top: 9px;
  color: #cbd5e1;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  text-align: center;
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

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

  .split-layout,
  .detail-layout,
  .quick-search {
    grid-template-columns: 1fr;
  }

  .ranking-panel,
  .related-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    height: 62px;
    padding: 0 16px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

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

  .hero-content {
    padding: 74px 18px 90px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .hero-control {
    display: none;
  }

  .quick-search,
  .section-wrap,
  .page-hero,
  .breadcrumb,
  .detail-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .quick-search {
    margin-top: -34px;
    border-radius: 22px;
  }

  .home-search,
  .filter-bar,
  .wide-filter {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .category-grid,
  .category-grid.large,
  .movie-grid,
  .small-grid,
  .rank-list.wide {
    grid-template-columns: 1fr;
  }

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

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

  .detail-line {
    font-size: 17px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    padding: 42px 16px;
  }
}
