:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #fb923c;
  --accent-strong: #f97316;
  --gold: #fbbf24;
  --radius: 22px;
  --shadow: 0 24px 80px 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 20% 0%, rgba(251, 146, 60, 0.14), transparent 30%),
    radial-gradient(circle at 90% 15%, rgba(245, 158, 11, 0.10), transparent 28%),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  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;
  width: 100%;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 42px rgba(0, 0, 0, 0.26);
}

.nav-wrap {
  width: min(1280px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-strong), var(--gold));
  color: #111827;
  box-shadow: 0 0 34px rgba(251, 146, 60, 0.42);
}

.brand-text {
  font-size: 1.22rem;
  background: linear-gradient(90deg, #fdba74, #fef3c7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  position: relative;
  color: var(--soft);
  font-size: 0.95rem;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fed7aa;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.mobile-toggle {
  width: 42px;
  height: 42px;
  display: none;
  place-items: center;
  gap: 5px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.86);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
}

.mobile-menu {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.96);
}

.mobile-menu.active {
  display: grid;
  gap: 10px;
}

.mobile-link {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--soft);
  font-weight: 700;
}

.mobile-link.active,
.mobile-link:hover {
  background: rgba(251, 146, 60, 0.12);
  color: #fed7aa;
}

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

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

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

.hero-slide img {
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.93) 0%, rgba(15, 23, 42, 0.62) 48%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 45%, rgba(2, 6, 23, 0.35) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100% - 1280px) / 2 + 24px));
  bottom: 12%;
  width: min(760px, calc(100% - 48px));
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.36));
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  color: #fdba74;
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.055em;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.56);
}

.hero-meta {
  margin: 16px 0 0;
  color: #fde68a;
  font-weight: 800;
}

.hero-desc,
.lead-text {
  margin: 16px 0 0;
  color: #e2e8f0;
  font-size: 1.05rem;
  line-height: 1.8;
}

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

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

.primary-btn,
.quick-search button {
  border: 0;
  color: #111827;
  background: linear-gradient(90deg, var(--accent-strong), var(--gold));
  box-shadow: 0 14px 36px rgba(251, 146, 60, 0.32);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text);
  background: rgba(15, 23, 42, 0.55);
}

.primary-btn:hover,
.ghost-btn:hover,
.quick-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(251, 146, 60, 0.42);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100% - 1280px) / 2 + 24px));
  bottom: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.hero-dot.active {
  width: 36px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.quick-panel,
.page-main,
.content-section,
.rank-section {
  width: min(1280px, calc(100% - 32px));
  margin-inline: auto;
}

.quick-panel {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
  margin-top: -54px;
  position: relative;
  z-index: 5;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.80));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.quick-panel h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1,
.story-panel h2,
.related-panel h2 {
  margin: 0;
  font-weight: 950;
  letter-spacing: -0.035em;
}

.quick-panel h2,
.page-hero h1,
.detail-copy h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.05;
}

.quick-panel p,
.page-hero p {
  color: var(--soft);
  line-height: 1.85;
}

.quick-search {
  display: flex;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
}

.quick-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 0 16px;
}

.content-section,
.rank-section,
.category-overview,
.catalog-panel,
.rank-page-list,
.detail-layout,
.player-section {
  margin-top: 70px;
}

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

.section-heading h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.section-more {
  color: #fdba74;
  font-weight: 900;
}

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

.category-card {
  min-height: 180px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(251, 146, 60, 0.16), rgba(15, 23, 42, 0.82)),
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.15), transparent 34%);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.20);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 146, 60, 0.55);
}

.category-card span {
  display: block;
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 950;
}

.category-card p {
  color: var(--soft);
  line-height: 1.75;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.66);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 146, 60, 0.70);
  background: rgba(30, 41, 59, 0.84);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.96);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 58%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.poster-play {
  position: absolute;
  left: 14px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-shade,
.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.card-body strong {
  overflow: hidden;
  color: var(--text);
  font-size: 1rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-meta,
.card-desc,
.rank-info em,
.rank-card em,
.rank-card small {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
  font-style: normal;
}

.card-desc {
  display: -webkit-box;
  min-height: 2.7em;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(251, 146, 60, 0.24);
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(251, 146, 60, 0.10);
  font-size: 0.74rem;
  font-weight: 800;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 48px 72px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover,
.rank-card:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 146, 60, 0.55);
}

.rank-row img {
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-num {
  color: #fdba74;
  font-size: 1.25rem;
  font-weight: 950;
}

.rank-info {
  display: grid;
  gap: 6px;
}

.rank-info strong {
  color: var(--text);
}

.rank-play {
  color: #fef3c7;
  font-weight: 900;
}

.page-main {
  padding: 54px 0 80px;
}

.page-hero {
  padding: 44px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(251, 146, 60, 0.18), transparent 36%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.64));
  box-shadow: var(--shadow);
}

.small-hero p {
  max-width: 840px;
}

.catalog-tools {
  display: grid;
  grid-template-columns: 1fr 180px 220px;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
}

.catalog-tools label {
  display: grid;
  gap: 8px;
  color: #fdba74;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.catalog-tools input,
.catalog-tools select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
  padding: 0 14px;
}

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

.empty-state {
  display: none;
  margin: 32px 0 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--soft);
  text-align: center;
  background: rgba(15, 23, 42, 0.64);
}

.catalog-panel.is-empty .empty-state {
  display: block;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 56px 96px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.70);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-card img {
  height: 126px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-card span:last-child {
  display: grid;
  gap: 8px;
}

.rank-card strong {
  font-size: 1.18rem;
}

.detail-main {
  width: min(1280px, calc(100% - 32px));
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 34px;
  align-items: center;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 16% 8%, rgba(251, 146, 60, 0.20), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.65));
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.video-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: var(--text);
  background: radial-gradient(circle at center, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.68));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.big-play {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  box-shadow: 0 0 46px rgba(251, 146, 60, 0.45);
  font-size: 2rem;
}

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

.story-panel,
.related-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
}

.story-panel h2,
.related-panel h2 {
  margin-bottom: 18px;
  font-size: 1.5rem;
}

.story-panel p {
  margin: 0 0 26px;
  color: #dbeafe;
  line-height: 2;
}

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

.movie-card.compact {
  display: grid;
  grid-template-columns: 92px 1fr;
  min-height: 136px;
}

.movie-card.compact .poster-frame {
  aspect-ratio: auto;
  height: 100%;
}

.movie-card.compact .card-desc,
.movie-card.compact .card-tags {
  display: none;
}

.category-overview {
  width: min(1280px, calc(100% - 32px));
  margin-inline: auto;
}

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

.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.98));
}

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  margin-bottom: 12px;
  color: #fed7aa;
  font-size: 1.4rem;
  font-weight: 950;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 1rem;
}

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

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

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

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

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

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

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

  .mobile-toggle {
    display: grid;
  }

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

  .hero-content {
    left: 16px;
    right: 16px;
    bottom: 76px;
    width: auto;
    padding: 22px;
  }

  .hero-dots {
    left: 24px;
    right: auto;
  }

  .quick-panel,
  .detail-hero,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .catalog-tools {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 680px) {
  .nav-wrap,
  .quick-panel,
  .page-main,
  .content-section,
  .rank-section,
  .category-overview,
  .footer-grid,
  .footer-bottom,
  .mobile-menu {
    width: min(100% - 24px, 1280px);
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: clamp(2.1rem, 13vw, 3.5rem);
  }

  .quick-panel,
  .page-hero,
  .detail-hero,
  .story-panel,
  .related-panel {
    padding: 20px;
    border-radius: 24px;
  }

  .quick-search {
    align-items: stretch;
    flex-direction: column;
    border-radius: 22px;
  }

  .quick-search input,
  .quick-search button {
    min-height: 46px;
  }

  .movie-grid,
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

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

  .rank-play {
    display: none;
  }

  .rank-row img {
    height: 86px;
  }

  .rank-card {
    grid-template-columns: 42px 76px 1fr;
    gap: 12px;
  }

  .rank-card img {
    height: 102px;
  }

  .movie-card.compact {
    grid-template-columns: 78px 1fr;
  }
}
