*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #38bdf8;
  --cyan: #22d3ee;
  --violet: #6366f1;
  --amber: #f59e0b;
  --shadow: 0 24px 70px rgba(2, 8, 23, 0.5);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at 16% 6%, rgba(56, 189, 248, 0.24), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(99, 102, 241, 0.2), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #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, 64, 175, 0.9), rgba(15, 23, 42, 0.94));
  border-bottom: 1px solid rgba(56, 189, 248, 0.24);
  box-shadow: 0 18px 50px rgba(2, 8, 23, 0.42);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-link {
  color: #dbeafe;
  padding: 10px 13px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: white;
  background: rgba(56, 189, 248, 0.16);
  transform: translateY(-1px);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 320px;
}

.header-search input,
.mobile-search input,
.wide-search input,
.search-page-form input,
.filter-controls input,
.filter-controls select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  color: white;
  outline: none;
  padding: 11px 15px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.search-page-form input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
  border-color: rgba(56, 189, 248, 0.8);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.header-search button,
.mobile-search button,
.wide-search button,
.search-page-form button,
.primary-btn {
  border: 0;
  border-radius: 999px;
  color: white;
  cursor: pointer;
  padding: 11px 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.34);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.wide-search button:hover,
.search-page-form button:hover,
.primary-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.primary-btn.small {
  display: inline-flex;
  padding: 9px 14px;
  font-size: 14px;
}

.primary-btn.wide {
  justify-content: center;
  width: 100%;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(125, 211, 252, 0.42);
  border-radius: 999px;
  padding: 11px 18px;
  color: white;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.ghost-btn:hover {
  transform: translateY(-2px);
  background: rgba(56, 189, 248, 0.16);
}

.menu-toggle {
  display: none;
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: white;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  padding: 9px 12px;
}

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

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

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

main {
  width: 100%;
}

.hero-wrap {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  filter: saturate(1.15) contrast(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.64), rgba(2, 6, 23, 0.38)),
    radial-gradient(circle at 72% 30%, rgba(56, 189, 248, 0.2), transparent 28rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 760px;
  justify-self: start;
  padding: 100px 0 90px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: #67e8f9;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 13px;
}

.hero-content h1,
.page-hero h1 {
  margin: 0;
  color: white;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-summary {
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.ranking-meta,
.movie-meta-line,
.detail-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

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

.hero-meta span,
.hero-meta strong,
.movie-meta-line span,
.movie-meta-line a,
.detail-meta-grid span,
.ranking-meta span,
.ranking-meta strong {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.55);
}

.hero-meta strong,
.ranking-meta strong {
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.4);
}

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

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

.hero-dot {
  width: 34px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.32);
}

.hero-dot.active {
  background: linear-gradient(90deg, #38bdf8, #22d3ee);
}

.section-block {
  width: min(1240px, calc(100% - 32px));
  margin: 34px auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.62));
  box-shadow: var(--shadow);
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 24px;
  align-items: center;
  margin-top: -58px;
  position: relative;
  z-index: 8;
}

.section-block h2,
.content-panel h2,
.sidebar-card h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.section-block p,
.category-panel p,
.content-panel p,
.page-hero p {
  color: var(--soft);
  line-height: 1.8;
}

.wide-search,
.search-page-form {
  display: flex;
  gap: 10px;
}

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

.full-row {
  grid-column: 1 / -1;
}

.text-link {
  color: #67e8f9;
  font-weight: 800;
}

.text-link:hover {
  color: white;
}

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

.category-tile {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(30, 64, 175, 0.42), rgba(8, 47, 73, 0.28)),
    rgba(15, 23, 42, 0.7);
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-panel:hover,
.ranking-row:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.46);
}

.category-tile span {
  color: white;
  font-size: 19px;
  font-weight: 900;
}

.category-tile strong {
  color: #67e8f9;
  font-size: 36px;
}

.category-tile em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: 0 20px 54px rgba(2, 8, 23, 0.48);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.26), rgba(14, 165, 233, 0.14));
}

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

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

.poster-year,
.poster-rating {
  position: absolute;
  top: 10px;
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 900;
  color: white;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

.poster-year {
  left: 10px;
}

.poster-rating {
  right: 10px;
  color: #fde68a;
}

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

.movie-meta-line {
  gap: 6px;
  font-size: 12px;
  margin-bottom: 10px;
}

.movie-meta-line span,
.movie-meta-line a {
  min-height: auto;
  padding: 4px 7px;
}

.movie-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #67e8f9;
}

.movie-card p {
  min-height: 66px;
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  border-radius: 999px;
  padding: 5px 8px;
  color: #bae6fd;
  font-size: 12px;
  background: rgba(14, 165, 233, 0.13);
}

.large-tags span {
  padding: 7px 10px;
  font-size: 13px;
}

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

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

.ranking-row {
  display: grid;
  grid-template-columns: 54px 78px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.7);
  transition: transform 0.2s ease, border 0.2s ease;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: white;
  font-weight: 950;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.ranking-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(30, 64, 175, 0.32);
}

.ranking-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.ranking-info p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.ranking-meta {
  gap: 6px;
  font-size: 12px;
}

.ranking-meta span,
.ranking-meta strong {
  min-height: auto;
  padding: 4px 8px;
}

.page-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 34px auto 0;
  min-height: 310px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 42px;
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 34px;
  background:
    radial-gradient(circle at 78% 24%, rgba(34, 211, 238, 0.18), transparent 24rem),
    linear-gradient(135deg, rgba(30, 64, 175, 0.42), rgba(15, 23, 42, 0.86));
  box-shadow: var(--shadow);
}

.slim-hero {
  min-height: 260px;
}

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

.category-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border 0.2s ease;
}

.category-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.category-panel-head strong {
  font-size: 34px;
  color: #67e8f9;
}

.preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.preview-links a {
  color: #dbeafe;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(15, 23, 42, 0.68);
}

.filter-panel {
  margin-top: 22px;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 12px;
}

.detail-layout {
  width: min(1240px, calc(100% - 32px));
  margin: 34px auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 16px;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: #67e8f9;
}

.detail-article,
.sidebar-card,
.content-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
}

.detail-article {
  overflow: hidden;
}

.detail-head {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 24px;
  padding: 26px;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(30, 64, 175, 0.3);
}

.detail-head h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-one-line {
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.7;
}

.detail-meta-grid {
  gap: 8px;
  margin: 18px 0;
}

.detail-meta-grid span {
  border-radius: 12px;
}

.player-card {
  position: relative;
  margin: 0 26px 26px;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(56, 189, 248, 0.24);
  background: #020617;
  aspect-ratio: 16 / 9;
}

.movie-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: white;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.58));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 20px 50px rgba(14, 165, 233, 0.42);
}

.content-panel {
  margin: 26px;
  padding: 26px;
}

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

.detail-sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
}

.sidebar-card {
  padding: 20px;
}

.side-rank-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.side-rank-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.side-rank-link span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 11px;
  font-weight: 900;
  background: rgba(56, 189, 248, 0.18);
  color: #67e8f9;
}

.side-rank-link strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.side-rank-link em {
  color: #fde68a;
  font-style: normal;
  font-size: 12px;
}

.search-page-panel {
  min-height: 460px;
}

.search-status {
  margin: 18px 0;
  color: var(--muted);
}

.site-footer {
  margin-top: 50px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.72);
}

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

.footer-brand p,
.copyright {
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
  justify-content: end;
}

.footer-links a {
  color: #dbeafe;
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(15, 23, 42, 0.7);
}

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

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

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

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

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

  .detail-sidebar {
    position: static;
  }
}

@media (max-width: 860px) {
  .header-inner {
    gap: 12px;
  }

  .main-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .hero-wrap {
    min-height: 590px;
  }

  .hero-content {
    padding: 74px 0 82px;
  }

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

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

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

  .page-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 30px;
  }

  .ranking-row {
    grid-template-columns: 44px 66px minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .brand-text {
    font-size: 17px;
  }

  .section-block,
  .page-hero,
  .detail-layout {
    width: min(100% - 20px, 1240px);
  }

  .section-block,
  .content-panel {
    padding: 20px;
  }

  .hero-content h1,
  .page-hero h1 {
    font-size: 36px;
  }

  .wide-search,
  .search-page-form,
  .mobile-search {
    flex-direction: column;
  }

  .category-grid,
  .category-panels,
  .movie-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .detail-head {
    padding: 18px;
  }

  .player-card,
  .content-panel {
    margin: 18px;
  }
}
