:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-soft: #eef4ff;
  --text: #182033;
  --muted: #667085;
  --line: #e5eaf3;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --orange: #f97316;
  --orange-dark: #ea580c;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.site-nav {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--orange));
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.28);
  font-size: 15px;
}

.brand-text,
.footer-brand {
  background: linear-gradient(90deg, var(--blue), var(--orange));
  -webkit-background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 16px;
  font-weight: 650;
  color: #344054;
}

.nav-links a {
  position: relative;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--blue);
}

.nav-links a::after {
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--blue), var(--orange));
  transition: width 0.2s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #eef4ff;
  color: var(--blue);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 2px;
}

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 700px;
  padding: 70px 0 52px;
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 18%, rgba(249, 115, 22, 0.28), transparent 32%),
    radial-gradient(circle at 82% 20%, rgba(59, 130, 246, 0.34), transparent 34%),
    linear-gradient(135deg, #111827 0%, #1e3a8a 50%, #172554 100%);
}

.hero-section::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.28)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 96px);
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 999px;
  filter: blur(50px);
  opacity: 0.48;
}

.hero-glow-one {
  left: 12%;
  bottom: 6%;
  background: var(--orange);
}

.hero-glow-two {
  right: 8%;
  top: 14%;
  background: var(--blue);
}

.hero-container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 38px;
  align-items: center;
}

.hero-title-block h1,
.page-hero h1,
.detail-info h1 {
  margin: 10px 0 16px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.06em;
}

.hero-title-block p,
.page-hero p,
.detail-line {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-search,
.filter-panel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-search {
  margin: 30px 0 20px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero-search input,
.filter-panel input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

.hero-search button,
.btn,
.filter-panel button {
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.hero-search button,
.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.25);
}

.hero-search button {
  padding: 12px 22px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-chips a {
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-chips a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
}

.hero-carousel {
  position: relative;
  min-height: 490px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 24px;
  align-items: center;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.hero-copy {
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.4);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-copy h2 {
  margin: 12px 0 10px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy p {
  color: rgba(255, 255, 255, 0.78);
}

.hero-meta {
  color: rgba(255, 255, 255, 0.62) !important;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.hero-poster,
.detail-poster,
.poster-link {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.25), transparent 28%),
    linear-gradient(135deg, #dbeafe, #fff7ed);
}

.hero-poster {
  min-height: 430px;
  box-shadow: 0 26px 55px rgba(2, 6, 23, 0.32);
}

.hero-poster img,
.detail-poster img,
.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster img {
  min-height: 430px;
}

.image-missing {
  opacity: 0;
}

.hero-dots {
  position: absolute;
  left: 28px;
  bottom: 18px;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

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

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

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

.section-head h2,
.channel-card h2,
.text-panel h2,
.page-rank-mini h2 {
  margin: 6px 0 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.section-head.slim {
  align-items: center;
}

.text-link {
  color: var(--blue);
  font-weight: 800;
}

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

.category-card,
.channel-card a {
  display: block;
  height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.channel-card a:hover,
.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-card span {
  display: block;
  color: var(--blue);
  font-weight: 900;
  margin-bottom: 10px;
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.category-card p,
.channel-card p,
.site-footer p,
.text-panel p {
  margin: 0;
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
  display: block;
  aspect-ratio: 2 / 2.8;
  border-radius: 0;
}

.hot-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.25);
}

.card-content {
  padding: 16px;
}

.card-content h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.28;
}

.card-content h3 a:hover {
  color: var(--blue);
}

.movie-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-line {
  min-height: 45px;
  margin: 0 0 12px;
  color: #475467;
  font-size: 14px;
}

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

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 800;
}

.movie-card-small .card-content {
  padding: 13px;
}

.movie-card-small .card-content h3 {
  font-size: 15px;
}

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

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
}

.rank-panel,
.text-panel,
.page-rank-mini {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-list li + li {
  border-top: 1px solid var(--line);
}

.rank-list a {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 13px 0;
}

.rank-num {
  color: var(--orange);
  font-size: 20px;
  font-weight: 900;
}

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

.rank-score {
  color: var(--muted);
  font-weight: 800;
}

.page-hero {
  color: #ffffff;
  padding: 60px 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(249, 115, 22, 0.26), transparent 32%),
    linear-gradient(135deg, #0f172a, #1d4ed8 58%, #172554);
}

.compact-page-hero {
  padding: 72px 0;
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.75fr);
  gap: 30px;
  align-items: start;
}

.page-filter {
  flex-wrap: wrap;
  margin-top: 24px;
}

.filter-panel input {
  min-height: 46px;
  padding: 0 16px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.filter-panel button {
  min-height: 46px;
  padding: 0 16px;
  color: #344054;
  background: #ffffff;
}

.filter-panel button.is-active,
.filter-panel button:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--orange));
}

.compact-filter input {
  width: 260px;
}

.page-rank-mini {
  padding: 20px;
  color: var(--text);
}

.mini-card-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-height: 520px;
  overflow: auto;
  margin-top: 16px;
  padding-right: 4px;
}

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

.channel-card ul {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.channel-card li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: #344054;
  font-weight: 700;
}

.channel-card li span {
  color: var(--muted);
}

.detail-hero {
  padding: 54px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.26), transparent 35%),
    linear-gradient(135deg, #0b1120, #1e3a8a 55%, #172554);
}

.detail-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 2 / 2.8;
  box-shadow: 0 26px 55px rgba(2, 6, 23, 0.34);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-meta {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.68);
  font-weight: 700;
}

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

.player-section {
  padding-bottom: 22px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.72));
  transition: opacity 0.25s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.player-start {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  box-shadow: 0 18px 35px rgba(249, 115, 22, 0.36);
  font-size: 26px;
}

.player-overlay strong {
  font-size: 20px;
}

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

.text-panel {
  padding: 26px;
}

.text-panel p {
  margin-top: 12px;
  font-size: 16px;
  color: #344054;
}

.empty-state {
  display: none;
  margin: 24px 0 0;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: #111827;
}

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

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

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

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

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

@media (max-width: 1100px) {
  .hero-container,
  .hero-slide,
  .split-layout,
  .page-hero-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-panel {
    position: static;
  }

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

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

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

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

  .site-nav {
    min-height: 66px;
  }

  .brand,
  .footer-brand {
    font-size: 20px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 68px;
    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);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 12px;
  }

  .hero-section {
    min-height: auto;
    padding: 42px 0;
  }

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

  .hero-slide {
    align-items: start;
  }

  .hero-copy {
    padding: 22px;
  }

  .hero-poster,
  .hero-poster img {
    min-height: 360px;
  }

  .hero-search,
  .section-head,
  .hero-actions,
  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

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

  .category-grid,
  .channel-grid,
  .movie-grid,
  .compact-grid,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .mini-card-row {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .detail-poster {
    width: min(320px, 100%);
    margin: 0 auto;
  }

  .page-hero,
  .detail-hero {
    padding: 42px 0;
  }
}
