* {
  box-sizing: border-box;
}

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #f97316;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

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

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 34px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

.logo-text {
  font-size: 20px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #334155;
  font-weight: 650;
}

.nav-link {
  position: relative;
  padding: 24px 0;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 17px;
  height: 3px;
  content: "";
  border-radius: 999px;
  background: var(--primary);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  border-radius: 999px;
}

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

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.12)),
    radial-gradient(circle at 28% 52%, rgba(37, 99, 235, 0.28), transparent 35%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy .eyebrow,
.detail-copy .eyebrow {
  color: #93c5fd;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-text {
  max-width: 620px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.hero-tags,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.movie-card .chip-row span,
.category-title .chip-row span,
.detail-article .chip-row span {
  color: #475569;
  background: #eef2ff;
}

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

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

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

.btn.primary {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 14px 24px rgba(37, 99, 235, 0.34);
}

.btn.primary:hover {
  background: var(--primary-dark);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.btn.ghost.light {
  color: #ffffff;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 46px;
  height: 46px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
}

.hero-arrow.prev {
  left: 28px;
}

.hero-arrow.next {
  right: 28px;
}

.hero-dots {
  position: absolute;
  right: 40px;
  bottom: 34px;
  z-index: 6;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

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

.quick-search-panel,
.section-block,
.inner-page {
  padding: 58px 0;
}

.quick-search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 480px);
  align-items: center;
  gap: 30px;
}

.quick-search-panel h2,
.section-heading h2,
.page-title-block h1 {
  margin: 0;
  color: var(--ink);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.quick-search-panel h2 {
  font-size: clamp(26px, 4vw, 44px);
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  min-height: 56px;
  padding: 0 130px 0 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: none;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  font-size: 16px;
}

.search-box input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.24);
}

.search-box span {
  position: absolute;
  top: 50%;
  right: 16px;
  color: var(--muted);
  font-size: 13px;
  transform: translateY(-50%);
}

.search-box.wide {
  max-width: 680px;
}

.section-heading {
  margin-bottom: 24px;
}

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

.inline-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.inline-heading > a {
  color: var(--primary);
  font-weight: 800;
}

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

.category-card {
  display: flex;
  min-height: 160px;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-name {
  font-size: 20px;
  font-weight: 850;
}

.category-desc {
  color: var(--muted);
  font-size: 14px;
}

.category-count {
  color: var(--primary);
  font-weight: 850;
}

.split-layout,
.category-content-layout,
.detail-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px;
  align-items: start;
}

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

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

.all-grid {
  padding-bottom: 70px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #1e293b, #334155);
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.movie-card-body {
  padding: 16px;
}

.movie-card-body h3 {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 12px 0 8px;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.movie-card-body p {
  display: -webkit-box;
  min-height: 4.7em;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.movie-card.compact .movie-card-body {
  padding: 13px;
}

.movie-card.compact .chip-row span {
  font-size: 12px;
}

.ranking-panel,
.related-panel,
.text-panel,
.player-section {
  padding: 22px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 34px 46px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
  transition: background 0.2s ease;
}

.rank-item:hover {
  background: #eef2ff;
}

.rank-num {
  color: var(--primary);
  font-weight: 900;
}

.rank-item img {
  width: 46px;
  height: 62px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-title {
  overflow: hidden;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-score {
  color: var(--accent);
  font-weight: 900;
}

.home-category-block {
  margin-bottom: 54px;
}

.inner-page {
  min-height: 70vh;
}

.page-title-block {
  max-width: 820px;
  margin-bottom: 34px;
}

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

.page-title-block p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
}

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

.breadcrumb a {
  color: var(--primary);
  font-weight: 750;
}

.breadcrumb.light,
.breadcrumb.light a {
  color: rgba(255, 255, 255, 0.82);
}

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

.category-overview-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-overview-card a {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  align-items: center;
}

.category-overview-card img {
  width: 180px;
  height: 240px;
  object-fit: cover;
}

.category-overview-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

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

.category-samples {
  font-weight: 750;
}

.containerless-search {
  margin-bottom: 30px;
}

.sticky-panel {
  position: sticky;
  top: 94px;
}

.ranking-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.ranking-table th,
.ranking-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.ranking-table th {
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
}

.ranking-table td:first-child,
.ranking-table td:last-child {
  color: var(--primary);
  font-weight: 900;
}

.ranking-table a {
  font-weight: 800;
}

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

.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  filter: blur(2px) saturate(1.05);
}

.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.32)),
    radial-gradient(circle at 30% 60%, rgba(37, 99, 235, 0.28), transparent 38%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  min-height: 620px;
  padding: 60px 0;
}

.detail-poster {
  width: 290px;
  aspect-ratio: 2 / 3;
  border: 6px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.32);
}

.detail-copy {
  color: #ffffff;
}

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
}

.detail-content-layout {
  padding: 54px 0 80px;
}

.detail-article {
  display: grid;
  gap: 24px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #ffffff;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.68));
  font-size: 18px;
  font-weight: 900;
}

.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  padding-left: 4px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.36);
}

.video-shell.playing .play-overlay {
  display: none;
}

.watch-score {
  color: var(--accent);
  font-weight: 900;
}

.text-panel h2,
.player-section h2,
.related-panel h2 {
  margin: 0 0 14px;
  font-size: 25px;
  letter-spacing: -0.03em;
}

.text-panel p {
  margin: 0;
  color: #334155;
  font-size: 17px;
}

.info-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.info-list dt {
  color: var(--muted);
  font-weight: 800;
}

.info-list dd {
  margin: 0;
  color: var(--ink);
}

.sidebar-grid {
  grid-template-columns: 1fr;
}

.sidebar-grid .movie-card {
  display: grid;
  grid-template-columns: 90px 1fr;
}

.sidebar-grid .poster-link {
  aspect-ratio: auto;
  height: 136px;
}

.sidebar-grid .movie-card-body h3 {
  min-height: auto;
  margin-top: 8px;
  font-size: 15px;
}

.sidebar-grid .movie-card-body p {
  min-height: auto;
  -webkit-line-clamp: 2;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
  padding: 54px 0;
}

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

.site-footer p {
  margin: 0;
  max-width: 520px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 17px;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

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

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

[data-card].hidden {
  display: none;
}

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

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

  .sticky-panel {
    position: static;
  }

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

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

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  .nav-link {
    padding: 12px 14px;
    border-radius: 12px;
  }

  .nav-link.active::after {
    display: none;
  }

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

  .hero-copy h1 {
    font-size: 44px;
  }

  .hero-arrow {
    display: none;
  }

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

  .quick-search-panel {
    grid-template-columns: 1fr;
  }

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

  .category-overview-card a {
    grid-template-columns: 1fr;
  }

  .category-overview-card img {
    width: 100%;
    height: 260px;
  }

  .detail-hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 34px 0;
  }

  .detail-poster {
    width: 190px;
  }

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

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

@media (max-width: 520px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .logo-mark {
    width: 50px;
  }

  .logo-text {
    font-size: 17px;
  }

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

  .search-box input {
    padding-right: 20px;
  }

  .search-box span {
    position: static;
    display: block;
    margin-top: 8px;
    transform: none;
  }

  .sidebar-grid .movie-card {
    grid-template-columns: 88px 1fr;
  }
}
