* {
  box-sizing: border-box;
}

:root {
  --page-bg: #071330;
  --panel-bg: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.14);
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --brand-blue: #2563eb;
  --brand-blue-dark: #1e3a8a;
  --brand-orange: #f97316;
  --brand-yellow: #facc15;
  --line: rgba(255, 255, 255, 0.16);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  --radius-large: 28px;
  --radius-card: 20px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.35), transparent 36rem),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.28), transparent 32rem),
    linear-gradient(180deg, #071330 0%, #0f1f45 48%, #071330 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.96), rgba(30, 64, 175, 0.96));
  color: #fff;
  box-shadow: 0 16px 50px rgba(3, 7, 18, 0.28);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--brand-orange);
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.35);
  font-weight: 800;
}

.brand-text {
  display: grid;
  gap: 2px;
}

.brand-text strong {
  font-size: 20px;
  line-height: 1;
}

.brand-text em {
  font-size: 12px;
  color: #bfdbfe;
  font-style: normal;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

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

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.header-search {
  width: min(340px, 32vw);
  display: flex;
  align-items: center;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.header-search input,
.header-search button,
.quick-search-panel input,
.quick-search-panel select,
.search-page-panel input,
.search-page-panel button {
  font: inherit;
}

.header-search input {
  min-width: 0;
  flex: 1;
  padding: 11px 14px;
  border: 0;
  outline: none;
  background: transparent;
  color: #fff;
}

.header-search input::placeholder {
  color: #c7d2fe;
}

.header-search button {
  border: 0;
  padding: 11px 16px;
  color: #fff;
  background: var(--brand-orange);
  cursor: pointer;
}

.mobile-menu-button {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 9px 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

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

.mobile-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #dbeafe;
}

.hero-shell {
  position: relative;
  width: min(1280px, calc(100% - 32px));
  min-height: 620px;
  margin: 28px auto 34px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.55fr);
  gap: 24px;
  align-items: center;
  padding: clamp(28px, 6vw, 74px);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.01);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fed7aa;
  font-size: 14px;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 760px;
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.85;
}

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

.hero-tags span,
.tag-row span,
.rank-meta span,
.hero-stats span,
.source-label {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 13px;
}

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

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

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #f97316, #facc15);
  box-shadow: 0 18px 34px rgba(249, 115, 22, 0.30);
}

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.10);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  justify-self: end;
  width: min(340px, 100%);
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transform: rotate(2deg);
}

.hero-poster img {
  height: 100%;
  object-fit: cover;
  background: linear-gradient(140deg, #1e3a8a, #f97316);
}

.hero-dots {
  position: absolute;
  left: clamp(28px, 6vw, 74px);
  bottom: 26px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.active {
  width: 34px;
  background: var(--brand-orange);
}

.hero-rank {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 6;
  width: min(360px, calc(100% - 48px));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  padding: 14px;
  background: rgba(7, 19, 48, 0.72);
  backdrop-filter: blur(18px);
}

.hero-rank-title {
  margin-bottom: 8px;
  color: #fed7aa;
  font-weight: 800;
}

.hero-rank a {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
}

.hero-rank a:hover {
  background: rgba(255, 255, 255, 0.10);
}

.hero-rank span {
  color: #facc15;
  font-weight: 800;
}

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

.hero-rank em {
  color: #bfdbfe;
  font-style: normal;
  font-size: 13px;
}

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

.quick-search-panel {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(320px, 1fr);
  gap: 20px;
  align-items: center;
  margin-bottom: 34px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel-bg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}

.quick-search-panel strong {
  font-size: 22px;
}

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

.filter-grid,
.slim-panel {
  display: grid;
  grid-template-columns: 1fr 180px 150px;
  gap: 12px;
}

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

.quick-search-panel input,
.quick-search-panel select,
.search-page-panel input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  outline: none;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.quick-search-panel select option {
  color: #0f172a;
}

.content-section {
  margin-top: 36px;
  margin-bottom: 56px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--text-muted);
}

.section-heading a {
  color: #fed7aa;
  font-weight: 700;
}

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

.category-tile,
.category-overview-card,
.movie-card,
.rank-row,
.detail-hero,
.player-section,
.detail-text-section article,
.page-hero {
  border: 1px solid var(--line);
  background: var(--panel-bg);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(14px);
}

.category-tile {
  display: grid;
  gap: 10px;
  min-height: 230px;
  padding: 14px;
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform 0.2s ease, background 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.category-overview-card:hover,
.rank-row:hover {
  transform: translateY(-4px);
  background: var(--panel-strong);
}

.category-cover {
  min-height: 110px;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
}

.category-tile strong {
  font-size: 20px;
}

.category-tile em,
.category-overview-card span {
  color: #fed7aa;
  font-style: normal;
}

.category-tile p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

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

.movie-card {
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: transform 0.2s ease, background 0.2s ease;
}

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

.poster-link img,
.rank-cover img,
.detail-poster img {
  height: 100%;
  object-fit: cover;
  background: linear-gradient(140deg, #1e3a8a, #f97316);
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(249, 115, 22, 0.95);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 800;
}

.movie-meta,
.movie-line {
  color: var(--text-muted);
  line-height: 1.65;
}

.movie-meta {
  margin: 7px 0 0;
  font-size: 13px;
}

.movie-line {
  min-height: 3.3em;
  margin: 8px 0 12px;
  font-size: 14px;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 12px;
}

.movie-card-compact .movie-line {
  display: none;
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 18px;
  color: #bfdbfe;
  flex-wrap: wrap;
}

.breadcrumb strong {
  color: #fff;
}

.page-hero {
  border-radius: var(--radius-large);
  padding: clamp(28px, 5vw, 58px);
  background:
    radial-gradient(circle at right top, rgba(249, 115, 22, 0.25), transparent 24rem),
    linear-gradient(135deg, rgba(37, 99, 235, 0.40), rgba(15, 23, 42, 0.72));
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
}

.page-hero p {
  max-width: 760px;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.8;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border-radius: var(--radius-card);
  transition: transform 0.2s ease, background 0.2s ease;
}

.category-overview-cover {
  min-height: 180px;
  border-radius: 18px;
  background-size: cover;
  background-position: center;
}

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

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

.inline-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.inline-links a {
  border-radius: 999px;
  padding: 6px 10px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.10);
}

.sticky-filter {
  position: sticky;
  top: 88px;
  z-index: 20;
}

.rank-list {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  margin-bottom: 56px;
}

.rank-row {
  display: grid;
  grid-template-columns: 74px 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-card);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-num {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #facc15);
  font-weight: 900;
}

.rank-cover {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(140deg, #1e3a8a, #f97316);
}

.rank-info h2 {
  margin: 0;
  font-size: 22px;
}

.rank-info p {
  margin: 8px 0 12px;
  color: var(--text-muted);
  line-height: 1.7;
}

.search-page-panel {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel-bg);
}

.search-page-panel input {
  flex: 1;
}

.search-page-panel button {
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  color: #fff;
  background: var(--brand-orange);
  cursor: pointer;
}

.search-results {
  display: grid;
  gap: 12px;
}

.search-result-item {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-bg);
}

.search-result-item strong {
  font-size: 20px;
}

.search-result-item p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.detail-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  border-radius: var(--radius-large);
  padding: clamp(20px, 4vw, 40px);
  background:
    radial-gradient(circle at right top, rgba(249, 115, 22, 0.22), transparent 24rem),
    linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(15, 23, 42, 0.75));
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(140deg, #1e3a8a, #f97316);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.08;
}

.detail-one-line {
  color: #e2e8f0;
  font-size: 19px;
  line-height: 1.85;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.detail-meta-grid span {
  display: grid;
  gap: 5px;
  min-height: 70px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.09);
}

.detail-meta-grid strong {
  color: #fed7aa;
  font-size: 13px;
}

.large-tags {
  margin-bottom: 24px;
}

.player-section {
  margin-top: 34px;
  border-radius: var(--radius-large);
  padding: 22px;
}

.player-heading {
  margin-bottom: 14px;
}

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

.video-shell video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
}

.video-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(7, 19, 48, 0.25), rgba(7, 19, 48, 0.82));
  cursor: pointer;
}

.video-start span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--brand-orange);
  box-shadow: 0 20px 44px rgba(249, 115, 22, 0.34);
  font-size: 28px;
}

.video-start strong {
  font-size: 20px;
}

.video-shell.is-playing .video-start {
  display: none;
}

.detail-text-section {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  margin-top: 34px;
}

.detail-text-section article {
  border-radius: var(--radius-card);
  padding: 24px;
}

.detail-text-section h2 {
  margin-top: 0;
}

.detail-text-section p {
  color: #e2e8f0;
  line-height: 1.95;
  white-space: pre-line;
}

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

.empty-state {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text-muted);
  background: var(--panel-bg);
}

.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  background: rgba(7, 19, 48, 0.72);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-inner p {
  margin: 8px 0 0;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #bfdbfe;
}

[hidden] {
  display: none !important;
}

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

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

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

  .hero-rank {
    display: none;
  }
}

@media (max-width: 820px) {
  .header-inner {
    height: auto;
    min-height: 66px;
  }

  .top-nav {
    display: none;
  }

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

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

  .brand-text em {
    display: none;
  }

  .hero-shell {
    min-height: 720px;
    border-radius: 24px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: start;
    padding: 28px;
  }

  .hero-poster {
    justify-self: start;
    width: 220px;
    transform: none;
  }

  .quick-search-panel,
  .filter-grid,
  .slim-panel,
  .detail-hero,
  .detail-text-section,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

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

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

  .detail-poster {
    width: min(260px, 100%);
  }

  .rank-row {
    grid-template-columns: 48px 72px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-num {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 13px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .detail-info h1,
  .page-hero h1 {
    font-size: 34px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .search-page-panel {
    flex-direction: column;
  }

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