:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --amber: #f59e0b;
  --orange: #ea580c;
  --blue: #3b82f6;
  --green: #22c55e;
  --radius: 22px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(245, 158, 11, 0.16), transparent 28rem),
    radial-gradient(circle at 80% 15%, rgba(59, 130, 246, 0.12), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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: rgba(2, 6, 23, 0.76);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fbbf24, #fb923c, #60a5fa);
  -webkit-background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.45);
  font-size: 14px;
}

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

.nav-link,
.mobile-nav a,
.footer-links a,
.filter-links a,
.side-links a,
.category-strip a {
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 650;
}

.nav-link:hover,
.mobile-nav a:hover,
.footer-links a:hover,
.filter-links a:hover,
.side-links a:hover {
  color: #fbbf24;
}

.nav-link:hover {
  background: rgba(245, 158, 11, 0.12);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.7);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  padding: 0 22px 18px;
  border-top: 1px solid var(--line);
}

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

.mobile-nav a {
  display: block;
  padding: 12px 0;
}

.mobile-nav-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.mobile-nav-tags a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
}

.hero-carousel {
  position: relative;
  height: 72vh;
  min-height: 540px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.05) contrast(1.02);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 90px 22px 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

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

.hero-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  font-size: 12px;
  font-weight: 750;
  padding: 5px 10px;
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 720px;
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 26px 0 30px;
  color: #cbd5e1;
}

.hero-meta span:first-child {
  color: #fbbf24;
  font-weight: 800;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.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.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  min-height: 48px;
  padding: 0 28px;
  color: #fff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 18px 34px rgba(245, 158, 11, 0.25);
}

.primary-btn:hover,
.primary-small:hover,
.text-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(245, 158, 11, 0.35);
}

.ghost-btn {
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.5);
  color: #fff;
  backdrop-filter: blur(12px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.36);
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 18px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.search-band,
.content-section,
.category-strip,
.page-main,
.detail-main,
.site-footer {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 22px;
  padding-right: 22px;
}

.search-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 480px);
  gap: 24px;
  align-items: center;
  margin-top: -54px;
  position: relative;
  z-index: 7;
  padding-top: 28px;
  padding-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-band h2,
.page-hero h1,
.section-head h2,
.player-section h2,
.detail-content h2,
.side-panel h2,
.site-footer h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.search-band h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.search-band p,
.page-hero p,
.side-panel p,
.category-card p,
.site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

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

.home-search input,
.filter-panel input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  padding: 0 18px;
  background: rgba(2, 6, 23, 0.72);
  color: #fff;
}

.home-search button,
.primary-small,
.text-link {
  min-height: 48px;
  border: 0;
  padding: 0 20px;
  color: #fff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  cursor: pointer;
}

.primary-small {
  white-space: nowrap;
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 26px;
}

.category-strip a,
.filter-links a,
.side-links a {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.6);
}

.category-strip a:hover,
.filter-links a:hover,
.side-links a:hover {
  border-color: rgba(245, 158, 11, 0.5);
  transform: translateY(-2px);
}

.content-section {
  padding-top: 72px;
}

.no-top-padding {
  padding-top: 24px;
}

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

.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.section-head a {
  color: #fbbf24;
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.64);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.32);
}

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

.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-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 62%);
  opacity: 0.7;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.92);
  color: #fff;
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.duration-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  padding: 4px 7px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.66);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 15px;
}

.card-title {
  display: block;
  color: #fff;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-title:hover {
  color: #fbbf24;
}

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

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: #94a3b8;
  font-size: 13px;
}

.card-meta span:first-child {
  color: #fbbf24;
  font-weight: 800;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.rank-list,
.rank-page-list {
  display: grid;
  gap: 14px;
}

.rank-page-list {
  padding: 22px;
}

.rank-row {
  display: grid;
  grid-template-columns: 112px 54px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.64);
}

.rank-cover {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
}

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

.rank-index {
  font-size: 26px;
  font-weight: 950;
  color: #fbbf24;
}

.rank-info a {
  font-weight: 900;
  color: #fff;
}

.rank-info p {
  margin: 6px 0;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-info div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #94a3b8;
  font-size: 13px;
}

.side-panel,
.filter-panel,
.page-hero,
.player-section,
.detail-content,
.category-card,
.site-footer {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.66);
  box-shadow: var(--shadow);
}

.side-panel {
  align-self: start;
  padding: 24px;
  position: sticky;
  top: 92px;
}

.side-links,
.filter-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-main,
.detail-main {
  padding-top: 30px;
  padding-bottom: 70px;
}

.page-hero {
  padding: 46px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(59, 130, 246, 0.08)),
    rgba(15, 23, 42, 0.72);
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a {
  color: #fbbf24;
}

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

.category-card {
  overflow: hidden;
}

.category-cover {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  aspect-ratio: 16 / 8;
  overflow: hidden;
  background: #0f172a;
}

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

.category-card div:last-child {
  padding: 22px;
}

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

.category-card h2 a:hover {
  color: #fbbf24;
}

.filter-panel {
  margin-top: 22px;
  padding: 18px;
  align-items: center;
}

.sticky-filter {
  position: sticky;
  top: 84px;
  z-index: 20;
  backdrop-filter: blur(18px);
}

.detail-hero {
  padding: 30px 22px 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
  align-items: center;
}

.detail-poster {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #0f172a;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.detail-info h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.lead-text {
  max-width: 800px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.75;
}

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

.detail-meta-grid div,
.info-list div {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.68);
}

.detail-meta-grid span,
.info-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.detail-meta-grid strong,
.info-list strong {
  color: #fff;
}

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

.player-section h2 {
  margin-bottom: 18px;
}

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.45));
  cursor: pointer;
}

.player-start span {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  font-size: 34px;
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.38);
}

.player-start.is-hidden {
  display: none;
}

.detail-content {
  max-width: 1280px;
  margin: 28px auto 0;
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.detail-content article {
  grid-column: 1;
}

.detail-content article p {
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 16px;
}

.detail-content aside {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.info-list {
  grid-template-columns: 1fr;
}

.page-turn {
  display: grid;
  gap: 10px;
}

.page-turn a {
  color: #fbbf24;
  line-height: 1.5;
}

.related-section {
  padding-top: 40px;
}

.site-footer {
  margin-top: 58px;
  margin-bottom: 26px;
  padding-top: 32px;
  padding-bottom: 22px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.footer-logo {
  margin-bottom: 14px;
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: #64748b;
  font-size: 14px;
}

.is-filtered-out {
  display: none !important;
}

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

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

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

  .side-panel,
  .detail-content aside {
    position: static;
    grid-column: auto;
    grid-row: auto;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-arrow {
    display: none;
  }

  .search-band,
  .home-search,
  .filter-panel,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .home-search,
  .filter-panel {
    flex-direction: column;
  }

  .detail-grid {
    gap: 22px;
  }

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

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

  .rank-row {
    grid-template-columns: 92px 42px minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .nav-shell,
  .search-band,
  .content-section,
  .category-strip,
  .page-main,
  .detail-main,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .all-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body p,
  .card-tags {
    display: none;
  }

  .page-hero,
  .player-section,
  .detail-content {
    padding: 20px;
  }

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

  .rank-row {
    grid-template-columns: 1fr;
  }

  .rank-cover {
    width: 100%;
  }
}
