:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --line: rgba(148, 163, 184, 0.18);
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --yellow: #facc15;
  --green: #22c55e;
  --orange: #fb923c;
  --rose: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at 10% -10%, rgba(34, 211, 238, 0.14), transparent 34%), radial-gradient(circle at 88% 12%, rgba(59, 130, 246, 0.18), transparent 30%), linear-gradient(180deg, #0f172a 0%, #020617 42%, #020617 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner,
.footer-grid,
.section-block,
.quick-search,
.rank-and-picks,
.page-hero,
.detail-content,
.detail-layout,
.player-section,
.channel-strip {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.42);
}

.logo-text,
.footer-logo {
  font-size: 24px;
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link,
.mobile-link {
  color: var(--soft);
  padding: 10px 16px;
  border-radius: 12px;
  transition: 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.active,
.mobile-link.active {
  color: #fff;
  background: rgba(34, 211, 238, 0.16);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.24);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.86);
  color: white;
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: white;
}

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

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

.hero-section {
  position: relative;
  min-height: 640px;
  overflow: hidden;
}

.hero-slider {
  position: relative;
  min-height: 640px;
}

.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-slide img {
  width: 100%;
  height: 100%;
  min-height: 640px;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.36) 100%), linear-gradient(0deg, #020617 0%, transparent 40%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1200px) / 2));
  bottom: 88px;
  width: min(680px, calc(100% - 48px));
}

.hero-kicker,
.section-title span,
.page-hero span {
  display: inline-flex;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero-content h1 {
  font-size: clamp(44px, 7vw, 88px);
  line-height: 0.96;
  margin: 0 0 20px;
  letter-spacing: -0.08em;
}

.hero-content p,
.page-hero p {
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
  margin: 0;
}

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

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(34, 211, 238, 0.2);
}

.hero-actions,
.quick-search-form,
.section-title,
.detail-meta,
.filter-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.quick-search button,
.filter-buttons button {
  border: 0;
  cursor: pointer;
  border-radius: 14px;
  padding: 13px 20px;
  color: #fff;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-button,
.quick-search button {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 34px rgba(14, 165, 233, 0.24);
}

.primary-button:hover,
.quick-search button:hover,
.filter-buttons button:hover,
.filter-buttons button.active {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(14, 165, 233, 0.28);
}

.ghost-button,
.filter-buttons button {
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid var(--line);
}

.hero-dots {
  position: absolute;
  left: max(24px, calc((100vw - 1200px) / 2));
  bottom: 36px;
  display: flex;
  gap: 10px;
  z-index: 3;
}

.hero-dot {
  width: 44px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.34);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--cyan);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.54);
}

.panel,
.movie-card,
.rank-panel,
.mosaic-panel,
.category-overview-card,
.video-shell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.quick-search {
  margin-top: -42px;
  position: relative;
  z-index: 4;
  padding: 26px;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 24px;
  align-items: center;
}

.quick-search h2,
.detail-main h2,
.detail-side h2 {
  margin: 0 0 8px;
}

.quick-search p {
  margin: 0;
  color: var(--muted);
}

.quick-search-form input,
.filter-panel input,
.filter-panel select {
  flex: 1;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.68);
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
}

.section-block {
  padding: 62px 0 0;
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.05em;
}

.section-title a,
.text-link {
  color: var(--cyan);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  transition: 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.36);
}

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

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), transparent 56%);
}

.play-badge,
.year-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.play-badge {
  left: 12px;
  bottom: 12px;
  background: rgba(34, 211, 238, 0.92);
}

.year-badge {
  top: 12px;
  right: 12px;
  background: rgba(34, 197, 94, 0.92);
}

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

.tag-row {
  margin-bottom: 10px;
}

.tag-row span {
  min-height: 24px;
  font-size: 12px;
  padding: 3px 8px;
}

.movie-card h2 {
  font-size: 18px;
  line-height: 1.3;
  margin: 0 0 8px;
}

.movie-card h2 a:hover {
  color: var(--cyan);
}

.movie-card p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 12px;
  min-height: 54px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-line {
  display: flex;
  justify-content: space-between;
  color: #64748b;
  font-size: 13px;
  gap: 10px;
}

.category-band {
  margin-top: 70px;
  padding: 56px max(24px, calc((100vw - 1200px) / 2));
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.88));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.category-tile {
  position: relative;
  min-height: 180px;
  padding: 24px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(59, 130, 246, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: 0.22s ease;
}

.category-tile:nth-child(2n) {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.2), rgba(244, 63, 94, 0.12));
}

.category-tile:nth-child(3n) {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.18), rgba(34, 197, 94, 0.12));
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.24);
}

.category-tile span {
  display: block;
  font-size: 34px;
  margin-bottom: 16px;
}

.category-tile strong {
  display: block;
  font-size: 20px;
  margin-bottom: 10px;
}

.category-tile em {
  color: var(--soft);
  font-style: normal;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 300px);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-color: var(--cyan) rgba(15, 23, 42, 0.8);
}

.compact-card {
  display: grid;
  gap: 10px;
}

.compact-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
  transition: transform 0.28s ease;
}

.compact-card span {
  font-weight: 800;
}

.compact-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.rank-and-picks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 70px;
}

.rank-panel,
.mosaic-panel {
  padding: 28px;
}

.section-title.compact {
  margin-bottom: 18px;
}

.rank-list,
.hot-table {
  display: grid;
  gap: 10px;
}

.rank-row,
.hot-table-row {
  display: grid;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.08);
  transition: 0.18s ease;
}

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

.rank-row:hover,
.hot-table-row:hover {
  background: rgba(34, 211, 238, 0.12);
}

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

.rank-title {
  font-weight: 800;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

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

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

.page-hero {
  margin-top: 38px;
  padding: 54px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(15, 23, 42, 0.92) 42%, rgba(37, 99, 235, 0.14));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr minmax(300px, 440px);
  gap: 28px;
  align-items: center;
}

.small-hero {
  grid-template-columns: 1fr;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(40px, 6vw, 68px);
  letter-spacing: -0.07em;
}

.filter-panel {
  display: grid;
  gap: 14px;
}

.filter-panel.large {
  grid-template-columns: 1fr 180px;
}

.filter-panel.large .filter-buttons {
  grid-column: 1 / -1;
}

.channel-strip {
  margin-top: 24px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.channel-strip a {
  white-space: nowrap;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 15px;
}

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

.category-overview-card {
  padding: 18px;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  align-items: center;
}

.category-cover {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-cover img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
}

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

.category-overview-card p {
  color: var(--muted);
  line-height: 1.7;
}

.hot-table-row {
  grid-template-columns: 64px 1fr 80px 120px 100px;
}

.hot-table-row span {
  color: var(--yellow);
  font-weight: 900;
}

.hot-table-row em,
.hot-table-row b,
.hot-table-row i {
  color: var(--muted);
  font-style: normal;
  font-weight: 600;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  padding: 92px 0 60px;
}

.detail-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(26px) brightness(0.42) saturate(1.2);
  transform: scale(1.08);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.7) 52%, rgba(2, 6, 23, 0.42) 100%);
}

.detail-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 36px;
  align-items: end;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

.breadcrumb {
  display: flex;
  gap: 10px;
  color: var(--muted);
  margin-bottom: 20px;
}

.breadcrumb a:hover {
  color: var(--cyan);
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(42px, 6vw, 76px);
  letter-spacing: -0.07em;
}

.one-line {
  color: var(--soft);
  font-size: 20px;
  line-height: 1.8;
  max-width: 780px;
}

.detail-meta {
  margin: 20px 0;
}

.detail-meta span {
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--soft);
  border: 1px solid var(--line);
}

.detail-tags.large span {
  min-height: 34px;
  padding: 7px 12px;
}

.player-section {
  padding-top: 0;
}

.video-shell {
  position: relative;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.18));
  cursor: pointer;
}

.player-cover span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  font-size: 34px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 50px rgba(34, 211, 238, 0.4);
  padding-left: 6px;
}

.video-shell.is-active .player-cover {
  display: none;
}

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

.detail-main,
.detail-side {
  padding: 28px;
}

.detail-main p {
  color: var(--soft);
  line-height: 1.9;
  font-size: 17px;
}

.site-footer {
  margin-top: 84px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.68), #020617);
  border-top: 1px solid var(--line);
}

.footer-grid {
  padding: 48px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 32px;
}

.site-footer h2 {
  font-size: 16px;
  margin: 0 0 14px;
}

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

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer a:hover {
  color: var(--cyan);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  color: #64748b;
  text-align: center;
  padding: 20px;
}

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

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

  .page-hero,
  .quick-search,
  .rank-and-picks,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .menu-button {
    display: block;
  }

  .header-inner {
    height: 62px;
  }

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

  .hero-section,
  .hero-slider,
  .hero-slide img {
    min-height: 560px;
  }

  .hero-content {
    bottom: 70px;
  }

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

  .quick-search {
    margin-top: 20px;
  }

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

  .page-hero {
    padding: 32px 22px;
  }

  .filter-panel.large {
    grid-template-columns: 1fr;
  }

  .category-overview-card,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    padding-top: 50px;
  }

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

  .hot-table-row,
  .rank-row {
    grid-template-columns: 46px 1fr;
  }

  .hot-table-row em,
  .hot-table-row b,
  .hot-table-row i,
  .rank-meta {
    grid-column: 2;
  }

  .player-cover span {
    width: 72px;
    height: 72px;
  }
}
