:root {
  --bg: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --orange: #f97316;
  --red: #ef4444;
  --dark: #0f172a;
  --card: #ffffff;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  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;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #1d4ed8, #0891b2);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo {
  font-size: 24px;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32), 0 10px 22px rgba(8, 145, 178, 0.35);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 600;
}

.desktop-nav a,
.nav-dropdown button {
  color: rgba(255, 255, 255, 0.92);
  background: transparent;
  border: 0;
  padding: 8px 0;
}

.desktop-nav a:hover,
.nav-dropdown button:hover {
  color: #cffafe;
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 220px;
  padding: 10px;
  display: grid;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  border-radius: 16px;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  color: #1f2937;
  padding: 10px 12px;
  border-radius: 10px;
}

.dropdown-panel a:hover {
  color: #0369a1;
  background: #eff6ff;
}

.nav-search {
  width: min(360px, 30vw);
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.nav-search input,
.mobile-nav input,
.wide-search input,
.filter-box input {
  width: 100%;
  border: 0;
  outline: none;
}

.nav-search input {
  min-width: 0;
  padding: 10px 14px;
  color: #ffffff;
  background: transparent;
}

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

.nav-search button,
.mobile-nav button,
.wide-search button {
  border: 0;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  cursor: pointer;
  white-space: nowrap;
}

.mobile-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 9px 12px;
}

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

.mobile-nav.open {
  display: grid;
  gap: 10px;
}

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-nav form {
  display: flex;
  gap: 8px;
}

.mobile-nav input {
  color: #ffffff;
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 500px;
  overflow: hidden;
  background: #111827;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.75), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.16));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
}

.hero-kicker,
.page-hero span,
.type-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.hero-kicker {
  margin-bottom: 18px;
  padding: 9px 18px;
  background: linear-gradient(90deg, var(--orange), var(--red));
}

.hero-content h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.05;
  font-weight: 900;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.7;
}

.hero-meta,
.detail-meta,
.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

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

.hero-tags {
  margin: 18px 0 28px;
}

.hero-tags span,
.tag-row span,
.detail-tags a {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  color: #0369a1;
  background: #e0f2fe;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.hero-actions,
.section-heading,
.filter-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.25s ease;
}

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.28);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.btn:hover,
.movie-card:hover,
.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
}

.hero-dots {
  position: absolute;
  z-index: 5;
  right: max(32px, calc((100vw - 1280px) / 2 + 32px));
  bottom: 36px;
  display: flex;
  gap: 10px;
}

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

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

.content-section,
.page-shell,
.detail-shell,
.detail-content,
.player-section,
.ranking-page-section,
.search-results-section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 64px 0;
}

.intro-search-section {
  padding: 32px 0 0;
}

.intro-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: center;
  padding: 30px;
  border-radius: 28px;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #0891b2);
  box-shadow: var(--shadow);
}

.intro-panel h2,
.section-heading h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-weight: 900;
  line-height: 1.15;
}

.intro-panel h2,
.section-heading h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.intro-panel p,
.section-heading p,
.page-hero p,
.detail-one-line {
  color: var(--muted);
  line-height: 1.75;
}

.intro-panel p {
  color: #dbeafe;
}

.wide-search {
  display: flex;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.wide-search input {
  padding: 14px 18px;
  border-radius: 999px;
  color: #ffffff;
  background: transparent;
}

.wide-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.standalone-search {
  max-width: 680px;
  margin-top: 24px;
}

.section-heading {
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-link {
  color: #0369a1;
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--soft-shadow);
  transition: 0.25s ease;
}

.movie-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
}

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

.movie-card:hover .poster-wrap img,
.category-card:hover img,
.category-overview-card:hover img {
  transform: scale(1.08);
}

.year-badge,
.type-badge,
.play-float {
  position: absolute;
  z-index: 2;
}

.year-badge {
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  border-radius: 9px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
}

.type-badge {
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--orange), var(--red));
}

.play-float {
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 46px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.35);
  transition: opacity 0.25s ease;
}

.movie-card:hover .play-float {
  opacity: 1;
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 9px;
  min-height: 54px;
  color: #111827;
  font-size: 19px;
  line-height: 1.4;
  font-weight: 850;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  margin: 0 0 14px;
  min-height: 48px;
  color: #64748b;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-section {
  width: 100%;
  max-width: none;
  padding: 64px max(16px, calc((100vw - 1280px) / 2));
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

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

.category-card,
.category-overview-card {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  transition: 0.25s ease;
}

.category-card a,
.category-overview-card a {
  display: grid;
  grid-template-columns: 170px 1fr;
  min-height: 190px;
}

.category-card img,
.category-overview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s ease;
}

.category-card div,
.category-overview-card div {
  padding: 20px;
}

.category-card h3,
.category-overview-card h2 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 22px;
}

.category-card p,
.category-overview-card p {
  margin: 0 0 14px;
  color: #64748b;
  line-height: 1.7;
}

.category-card ul,
.category-overview-card ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 5px;
  list-style: none;
  color: #0369a1;
  font-weight: 650;
}

.ranking-section {
  padding-top: 68px;
}

.ranking-list,
.ranking-page-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.ranking-list li,
.ranking-row {
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.ranking-list a,
.ranking-row a {
  display: grid;
  align-items: center;
  gap: 14px;
  padding: 14px;
}

.ranking-list a {
  grid-template-columns: 48px 86px 1fr;
}

.ranking-list img,
.ranking-row img {
  width: 86px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.ranking-list strong,
.ranking-row h2 {
  display: block;
  color: #0f172a;
  font-size: 18px;
}

.ranking-list em,
.row-meta {
  display: block;
  color: #64748b;
  font-style: normal;
}

.page-shell {
  padding: 42px 0 72px;
}

.page-hero {
  position: relative;
  margin-bottom: 42px;
  padding: 52px;
  overflow: hidden;
  border-radius: 32px;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #06b6d4);
  box-shadow: var(--shadow);
}

.page-hero span {
  margin-bottom: 14px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.18);
}

.page-hero h1 {
  max-width: 820px;
  margin-bottom: 16px;
  font-size: clamp(34px, 4vw, 56px);
}

.page-hero p {
  max-width: 840px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

.page-card-section {
  width: 100%;
  padding: 0;
}

.filter-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #64748b;
  background: #ffffff;
}

.filter-box input {
  width: 220px;
  padding: 10px 12px;
  border-radius: 999px;
  background: #f8fafc;
}

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

.ranking-page-section,
.search-results-section {
  padding: 0 0 72px;
}

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

.ranking-row a {
  grid-template-columns: 58px 120px 1fr;
}

.ranking-row img {
  width: 120px;
  height: 78px;
}

.rank-num.big {
  width: 46px;
  height: 46px;
}

.ranking-row h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.ranking-row p {
  margin: 0 0 10px;
  color: #64748b;
  line-height: 1.65;
}

.detail-page {
  background: #f8fafc;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  color: #ffffff;
  background: #0f172a;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.3)), linear-gradient(0deg, #0f172a, transparent 55%);
}

.detail-shell {
  position: relative;
  z-index: 2;
  padding: 42px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 34px;
  color: #cbd5e1;
}

.breadcrumb a {
  color: #67e8f9;
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 42px;
  align-items: center;
}

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

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

.detail-info h1 {
  max-width: 820px;
  font-size: clamp(40px, 6vw, 72px);
}

.detail-one-line {
  max-width: 840px;
  margin: 20px 0;
  color: #e2e8f0;
  font-size: 20px;
}

.detail-meta {
  margin-bottom: 18px;
}

.detail-tags {
  margin-bottom: 28px;
}

.player-section {
  margin-top: -72px;
  position: relative;
  z-index: 5;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(8, 145, 178, 0.22), rgba(0, 0, 0, 0.44));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 38px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.38);
}

.movie-player.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 42px 0 0;
}

.detail-content article {
  padding: 28px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.detail-content h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-content p {
  margin: 0;
  color: #475569;
  line-height: 1.9;
}

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

.compact-card .card-body h3 {
  min-height: auto;
  font-size: 17px;
}

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

.search-hero .wide-search input {
  color: #ffffff;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #1f2937, #111827);
}

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

.footer-logo {
  color: #ffffff;
  font-size: 24px;
  margin-bottom: 14px;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: #ffffff;
}

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px;
  text-align: center;
  color: #94a3b8;
}

.hidden-by-filter {
  display: none !important;
}

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

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

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

  .intro-panel,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: 240px 1fr;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    width: min(100% - 24px, 1280px);
    height: 64px;
  }

  .logo {
    font-size: 20px;
  }

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

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 92px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .btn,
  .wide-search button {
    width: 100%;
  }

  .hero-dots {
    right: 20px;
    bottom: 28px;
  }

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

  .category-card a,
  .category-overview-card a,
  .ranking-row a,
  .ranking-list a,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .category-card img,
  .category-overview-card img {
    height: 210px;
  }

  .section-heading,
  .filter-heading,
  .intro-panel,
  .wide-search {
    align-items: stretch;
    flex-direction: column;
  }

  .wide-search {
    border-radius: 24px;
  }

  .wide-search input {
    color: #ffffff;
  }

  .filter-box {
    width: 100%;
  }

  .filter-box input {
    width: 100%;
  }

  .page-hero {
    padding: 32px;
    border-radius: 24px;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-shell {
    padding-bottom: 110px;
  }

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

  .player-section {
    margin-top: -80px;
  }
}
