:root {
  --orange: #f97316;
  --red: #ef4444;
  --pink: #ec4899;
  --yellow: #facc15;
  --purple: #7c3aed;
  --dark: #111827;
  --muted: #6b7280;
  --soft: #f9fafb;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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: 50;
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red), var(--pink));
  box-shadow: 0 16px 40px rgba(239, 68, 68, 0.26);
}

.header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--red);
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

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

.desktop-nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 15px;
}

.desktop-nav a,
.mobile-panel a {
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: #fef08a;
  opacity: 1;
}

.header-search {
  position: relative;
  width: 240px;
}

.header-search input,
.mobile-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  padding: 10px 42px 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  transition: width 0.25s ease, background 0.25s ease;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.header-search button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  color: #fff;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px 18px;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-search {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--red);
  background: #fff;
  font-weight: 700;
}

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

.hero {
  background: radial-gradient(circle at top left, rgba(250, 204, 21, 0.38), transparent 28%), #111827;
}

.hero-stage {
  position: relative;
  height: 660px;
  overflow: hidden;
}

.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.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.62), rgba(17, 24, 39, 0.16)),
    linear-gradient(0deg, rgba(17, 24, 39, 0.96), transparent 42%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 82px;
  width: min(720px, calc(100vw - 48px));
  color: #fff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--yellow);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 800;
}

.hero-content p {
  margin: 0 0 20px;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.hero-tags,
.movie-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span,
.movie-tags span,
.tag-cloud a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 13px;
  backdrop-filter: blur(8px);
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 16px 30px rgba(239, 68, 68, 0.35);
}

.ghost-btn {
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

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

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 98px;
  display: flex;
  gap: 12px;
}

.hero-controls button,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-controls button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 30px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-controls button:hover {
  background: rgba(249, 115, 22, 0.85);
  transform: translateY(-2px);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 30px;
  background: #fff;
}

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px;
}

.section-overlap {
  margin-top: -54px;
  position: relative;
  z-index: 2;
}

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

.section-heading h2,
.page-hero h1,
.detail-intro h1 {
  margin: 0;
  color: var(--dark);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
}

.section-heading a {
  color: var(--orange);
  font-weight: 800;
}

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

.category-tile,
.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border-radius: var(--radius-xl);
  background: #111827;
  color: #fff;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.category-tile img,
.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.45s ease, opacity 0.45s ease;
  z-index: -2;
}

.category-tile::after,
.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.14));
  z-index: -1;
}

.category-tile:hover img,
.category-card:hover img {
  transform: scale(1.08);
  opacity: 0.78;
}

.category-tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
}

.category-tile span,
.category-card h2 {
  font-size: 24px;
  font-weight: 900;
}

.category-tile strong {
  color: var(--yellow);
  font-size: 15px;
}

.category-tile em {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
  font-size: 14px;
}

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

.movie-card {
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(249, 115, 22, 0.22);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #fb923c, #ec4899);
}

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

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

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  transform: translate(-50%, -50%) scale(0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(249, 115, 22, 0.92);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.category-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(249, 115, 22, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  min-height: 50px;
  margin: 0 0 10px;
  color: var(--dark);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-line {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.compact-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: #6b7280;
  font-size: 13px;
}

.movie-tags {
  margin-top: 13px;
}

.movie-tags span {
  color: #9a3412;
  background: #ffedd5;
}

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

.ranking-panel,
.content-card,
.side-card,
.search-panel {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow);
}

.ranking-panel {
  position: sticky;
  top: 92px;
}

.panel-title {
  margin-bottom: 18px;
  font-size: 24px;
  font-weight: 900;
}

.compact-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.compact-card:last-child {
  border-bottom: 0;
}

.compact-cover {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #fb923c, #ec4899);
}

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

.compact-card h3 {
  margin: 0 0 7px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 900;
}

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

.compact-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.rank-number {
  color: var(--red);
  font-weight: 900;
}

.stats-band,
.page-hero {
  border-radius: 34px;
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red), var(--pink));
  box-shadow: var(--shadow);
}

.stats-band {
  text-align: center;
  margin-bottom: 56px;
}

.stats-band h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
}

.stats-band p {
  max-width: 760px;
  margin: 0 auto 24px;
  opacity: 0.9;
}

.stats-band div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.stats-band span {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.page-hero {
  max-width: 1280px;
  margin: 36px auto 0;
  padding: 64px 34px;
}

.page-hero h1,
.page-hero p {
  color: #fff;
}

.page-hero p {
  max-width: 720px;
  margin: 16px 0 0;
  opacity: 0.9;
  font-size: 18px;
}

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

.category-card {
  display: flex;
  align-items: flex-end;
  min-height: 260px;
  padding: 24px;
}

.category-card span {
  color: var(--yellow);
  font-weight: 800;
}

.category-card h2 {
  margin: 8px 0;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}

.filter-bar,
.search-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
}

.filter-bar input,
.search-controls input,
.search-controls select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  outline: none;
  background: #fff;
}

.filter-bar input,
.search-controls input {
  flex: 1 1 260px;
}

.quick-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-filter button,
.search-controls button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, var(--orange), var(--red));
  padding: 0 16px;
  cursor: pointer;
  font-weight: 800;
}

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

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

.movie-card-large .movie-poster {
  aspect-ratio: 4 / 5;
}

.detail-hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  color: #fff;
  background: #111827;
}

.detail-bg,
.detail-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-bg {
  object-fit: cover;
  filter: blur(2px) saturate(1.05);
  opacity: 0.55;
}

.detail-mask {
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.68), rgba(17, 24, 39, 0.28)),
    linear-gradient(0deg, rgba(17, 24, 39, 1), transparent 45%);
}

.detail-hero-inner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 58px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  margin-bottom: 34px;
}

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

.detail-intro {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 32px;
  align-items: end;
}

.detail-cover {
  width: 260px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.detail-intro h1 {
  color: #fff;
  font-size: clamp(34px, 5vw, 58px);
}

.detail-intro p {
  max-width: 760px;
  margin: 16px 0 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.detail-meta {
  color: rgba(255, 255, 255, 0.78);
}

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

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
}

.video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(249, 115, 22, 0.92);
  padding: 14px 24px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-box.is-playing .big-play {
  opacity: 0;
  pointer-events: none;
}

.player-status {
  position: absolute;
  left: 14px;
  bottom: 12px;
  margin: 0;
  border-radius: 999px;
  padding: 6px 12px;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(17, 24, 39, 0.72);
  font-size: 12px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 900;
}

.content-card p {
  margin: 0;
  color: #374151;
  font-size: 17px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  font-weight: 700;
}

.tag-cloud a {
  color: #9a3412;
  background: #ffedd5;
}

.search-result-count {
  margin: 6px 0 22px;
  color: var(--muted);
  font-weight: 700;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
  margin-top: 40px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px 30px;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 34px;
}

.footer-logo {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 12px;
}

.footer-main p {
  margin: 0;
  max-width: 500px;
}

.footer-main h3 {
  margin: 0 0 14px;
  color: #fff;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a:hover {
  color: var(--orange);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  font-size: 14px;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .desktop-nav {
    gap: 14px;
    font-size: 14px;
  }

  .header-search {
    width: 190px;
  }

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

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

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

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

  .hero-stage {
    height: 590px;
  }

  .hero-controls {
    display: none;
  }

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

  .detail-intro {
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
  }

  .detail-cover {
    width: 150px;
  }

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

@media (max-width: 560px) {
  .header-inner {
    height: 62px;
    padding: 0 16px;
  }

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

  .hero-stage {
    height: 620px;
  }

  .hero-content {
    bottom: 74px;
  }

  .hero-content p,
  .detail-intro p,
  .page-hero p {
    font-size: 16px;
  }

  .section {
    padding: 36px 16px;
  }

  .page-hero {
    margin: 20px 16px 0;
    padding: 42px 22px;
    border-radius: 24px;
  }

  .category-grid,
  .category-page-grid,
  .movie-grid,
  .featured-three,
  .ranking-list {
    grid-template-columns: 1fr;
  }

  .detail-intro {
    display: block;
  }

  .detail-cover {
    width: 160px;
    margin-bottom: 22px;
  }

  .detail-hero-inner {
    padding: 28px 16px 44px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
