:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #1e293b;
  --bg-card-strong: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --line: rgba(148, 163, 184, 0.18);
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --orange: #ea580c;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #0f172a 0%, #020617 45%, #000000 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: #ffffff;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber-light), var(--orange));
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fde68a, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #d1d5db;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  transform: translateY(-1px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.84);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.icon-button:hover {
  background: rgba(245, 158, 11, 0.88);
  transform: translateY(-1px);
}

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

.header-search {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.header-search.open {
  display: block;
}

.header-search input,
.search-box-large input,
.toolbar-search input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  outline: 0;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.92);
  border-radius: 14px;
  padding: 14px 16px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.search-box-large input:focus,
.toolbar-search input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 16px;
}

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

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 30%, rgba(245, 158, 11, 0.28), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.28)),
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.98));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  align-items: center;
  gap: 56px;
  padding: 80px 0 90px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 1px solid rgba(251, 191, 36, 0.36);
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.16);
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 18px;
  font-size: clamp(38px, 5.2vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-desc,
.page-hero p,
.detail-copy .lead {
  max-width: 720px;
  color: var(--muted-strong);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-list-detail,
.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

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

.hero-tags span,
.tag-list-detail span,
.tag-line span {
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.88);
  padding: 6px 10px;
  font-size: 12px;
}

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

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

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.32);
}

.ghost-button,
.section-more {
  color: #ffffff;
  background: rgba(30, 41, 59, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
}

.hero-poster {
  position: relative;
  display: block;
  min-height: 430px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(245, 158, 11, 0.92);
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
}

.hero-poster:hover img {
  transform: scale(1.06);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-arrow:hover {
  background: rgba(245, 158, 11, 0.88);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.site-section {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0;
}

.search-panel {
  padding: 34px 0 0;
}

.search-box-large {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
  padding: 18px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

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

.section-heading h2,
.ranking-head h2,
.content-card h2,
.side-card h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border 0.22s ease;
}

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

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

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.07);
  opacity: 0.82;
}

.card-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.card-badge {
  left: 12px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.rank-badge {
  right: 12px;
  min-width: 30px;
  text-align: center;
  background: rgba(0, 0, 0, 0.72);
}

.play-float {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(245, 158, 11, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.75);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.movie-card-body strong {
  display: -webkit-box;
  min-height: 46px;
  overflow: hidden;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-card-body strong {
  color: #fbbf24;
}

.movie-card-body em {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-line {
  color: #cbd5e1;
  font-size: 13px;
}

.tag-line {
  margin-top: auto;
}

.movie-card-compact {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  min-height: 132px;
}

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

.movie-card-compact .movie-card-body strong {
  min-height: auto;
  font-size: 16px;
}

.movie-card-compact .movie-card-body em {
  min-height: auto;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 22px;
  background: #0f172a;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile span {
  position: absolute;
  inset: auto 18px 18px 18px;
}

.category-tile strong,
.category-tile em {
  display: block;
}

.category-tile strong {
  margin-bottom: 8px;
  font-size: 22px;
}

.category-tile em {
  color: #d1d5db;
  font-size: 13px;
  font-style: normal;
}

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

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.55fr);
  gap: 30px;
  align-items: start;
}

.ranking-card,
.content-card,
.side-card,
.player-card,
.category-block {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.ranking-card {
  position: sticky;
  top: 94px;
  padding: 22px;
}

.ranking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.ranking-head a {
  color: #fbbf24;
  font-weight: 700;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 10%, rgba(245, 158, 11, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(2, 6, 23, 1));
}

.page-hero > div {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 86px 0;
}

.compact-hero > div {
  padding: 64px 0;
}

.category-overview {
  display: grid;
  gap: 28px;
}

.category-block {
  padding: 24px;
}

.category-block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
}

.category-block-title span {
  font-size: 28px;
  font-weight: 800;
}

.category-block-title em {
  color: #fbbf24;
  font-style: normal;
  font-weight: 700;
}

.category-block p {
  margin: 0 0 20px;
  color: var(--muted);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: #d1d5db;
  background: rgba(30, 41, 59, 0.92);
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
  color: #ffffff;
  border-color: rgba(251, 191, 36, 0.42);
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.toolbar-search {
  width: min(360px, 100%);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  background: #020617;
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: #cbd5e1;
  margin-bottom: 34px;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fbbf24;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

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

.detail-meta span {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 7px 11px;
  color: #e5e7eb;
}

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

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

.player-card {
  padding: 14px;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
}

.movie-player-video {
  width: 100%;
  height: 100%;
  background: #000000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.76));
  cursor: pointer;
}

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

.player-start {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.4);
  font-size: 30px;
}

.player-overlay strong {
  max-width: 80%;
  text-align: center;
  font-size: clamp(20px, 3vw, 34px);
}

.content-card,
.side-card {
  padding: 26px;
}

.content-card p,
.side-card p {
  color: #cbd5e1;
  font-size: 16px;
}

.side-card .mini-grid {
  grid-template-columns: 1fr;
}

.ranking-grid {
  display: grid;
  gap: 16px;
}

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

.site-footer {
  margin-top: 50px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #000000);
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.65fr);
  gap: 36px;
  padding: 46px 0;
}

.footer-brand p {
  max-width: 560px;
  color: var(--muted);
}

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

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

.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 30px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 14px;
}

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

  .mobile-menu-button {
    display: inline-flex;
  }

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

  .mobile-nav .nav-link {
    background: rgba(30, 41, 59, 0.78);
  }

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

  .ranking-card {
    position: static;
  }

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

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

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

  .brand-title {
    font-size: 19px;
  }

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

  .hero-content {
    gap: 26px;
    padding: 54px 0 74px;
  }

  .hero-poster {
    min-height: 280px;
    transform: none;
  }

  .hero-poster img {
    min-height: 280px;
  }

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

  .movie-grid,
  .category-grid,
  .compact-grid,
  .mini-grid,
  .ranking-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-compact {
    grid-template-columns: 122px minmax(0, 1fr);
  }

  .movie-card-compact .poster-wrap {
    min-height: 128px;
  }

  .toolbar,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar-search {
    width: 100%;
  }

  .detail-inner {
    padding-bottom: 42px;
  }

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

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