:root {
  --sky: #0284c7;
  --sky-dark: #0369a1;
  --orange: #f97316;
  --orange-soft: #fed7aa;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #ffffff;
  --soft: #f8fafc;
  --soft-blue: #eff6ff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
  line-height: 1.6;
}

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

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

main {
  min-height: 60vh;
}

.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.86);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
}

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

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--sky), var(--orange));
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.28);
}

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

.site-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.site-nav a,
.quick-cats a {
  padding: 9px 13px;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active,
.quick-cats a:hover {
  color: var(--sky-dark);
  background: #e0f2fe;
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
}

.header-search input {
  width: 170px;
  border: 0;
  outline: 0;
  padding: 9px 8px 9px 12px;
  background: transparent;
}

.header-search button,
.btn-primary,
.btn-ghost,
.play-gate,
.filter-panel button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.btn-primary,
.play-gate {
  color: white;
  background: linear-gradient(135deg, var(--sky), var(--orange));
  box-shadow: 0 12px 26px rgba(249, 115, 22, 0.24);
}

.header-search button {
  padding: 9px 14px;
}

.header-search button:hover,
.btn-primary:hover,
.play-gate:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(2, 132, 199, 0.25);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #e0f2fe;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--sky-dark);
}

.quick-cats {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

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

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-slide.is-active .hero-bg {
  animation: slowZoom 8s ease forwards;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 30%, rgba(249, 115, 22, 0.32), transparent 36%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.62) 48%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  min-height: 560px;
  margin: 0 auto;
  padding: 74px 22px 70px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: 42px;
  color: white;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--sky);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy .eyebrow {
  color: #7dd3fc;
}

.hero-copy h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

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

.hero-tags,
.hero-actions,
.hero-mini-tags,
.card-meta,
.tag-line,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

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

.hero-tags span,
.hero-mini-tags span,
.detail-tags span,
.tag-line span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.92);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
}

.hero-actions {
  margin-top: 30px;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
}

.btn-ghost {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.hero-feature-card {
  padding: 18px;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.5);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

.hero-feature-card strong {
  color: #fed7aa;
}

.hero-feature-card h2 {
  margin: 6px 0;
  font-size: 24px;
  line-height: 1.16;
}

.hero-feature-card p {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.72);
}

.mini-poster {
  min-height: 210px;
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(135deg, #0f172a, #0ea5e9, #f97316);
}

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

.hero-nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: white;
  background: rgba(15, 23, 42, 0.48);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 32px;
  background: white;
}

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

.page-hero,
.category-hero {
  padding: 72px 0 46px;
  color: white;
  background:
    radial-gradient(circle at 85% 10%, rgba(251, 146, 60, 0.7), transparent 28%),
    linear-gradient(135deg, #0369a1 0%, #0ea5e9 48%, #f97316 100%);
}

.page-hero h1,
.category-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.05em;
}

.page-hero p,
.category-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.section {
  padding: 58px 0;
}

.section-soft {
  margin: 58px auto;
  padding: 34px;
  border-radius: 32px;
  background: linear-gradient(135deg, #eff6ff, #fff7ed);
  box-shadow: var(--shadow);
}

.section-white {
  margin: 58px auto;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: white;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.04em;
}

.section-more {
  color: var(--sky-dark);
  font-weight: 900;
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 22px;
  background: white;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(14, 165, 233, 0.3);
  transform: translateY(-8px);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
}

.poster-frame {
  position: relative;
  height: 270px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #0284c7, #f97316);
}

.movie-card-small .poster-frame {
  height: 220px;
}

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

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

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(2, 6, 23, 0.72) 100%);
}

.card-badge,
.rating-badge,
.rank-flag {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 9px;
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.card-badge {
  top: 12px;
  right: 12px;
  background: rgba(249, 115, 22, 0.92);
}

.rating-badge {
  left: 12px;
  bottom: 12px;
  background: rgba(2, 132, 199, 0.9);
}

.rank-flag {
  left: 12px;
  top: 12px;
  background: rgba(15, 23, 42, 0.78);
}

.play-hover {
  position: absolute;
  inset: 0;
  z-index: 3;
  margin: auto;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--sky-dark);
  background: rgba(255, 255, 255, 0.9);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
  transform: scale(1);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-meta {
  justify-content: space-between;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.tag-line {
  margin-top: 12px;
}

.tag-line span,
.detail-tags span {
  color: var(--sky-dark);
  background: #e0f2fe;
}

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

.category-card {
  overflow: hidden;
  border-radius: 28px;
  background: white;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
}

.category-covers {
  height: 160px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: linear-gradient(135deg, #0f172a, #0284c7, #f97316);
}

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

.category-card-body {
  padding: 20px;
}

.category-card-body span {
  color: var(--orange);
  font-weight: 900;
}

.category-card-body h3 {
  margin: 6px 0 8px;
  font-size: 24px;
}

.category-card-body p {
  margin: 0;
  color: var(--muted);
}

.ranking-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.ranking-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
}

.rank-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row:hover {
  background: #f0f9ff;
}

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

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

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

.filter-panel {
  margin: 28px 0;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(130px, 180px)) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--ink);
  background: white;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}

.filter-count {
  color: var(--muted);
  font-weight: 900;
  white-space: nowrap;
}

.watch-section {
  padding: 34px 0 64px;
}

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

.breadcrumb a {
  color: var(--sky-dark);
  font-weight: 800;
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: 26px;
  align-items: start;
}

.player-card,
.detail-card,
.story-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: white;
  box-shadow: var(--shadow);
}

.player-stage {
  position: relative;
  overflow: hidden;
  min-height: 480px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 70% 15%, rgba(249, 115, 22, 0.3), transparent 35%),
    linear-gradient(135deg, #020617, #0f172a 55%, #082f49);
}

.main-video {
  width: 100%;
  height: 100%;
  min-height: 480px;
  background: #020617;
}

.play-gate {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  min-width: 154px;
  min-height: 54px;
  transform: translate(-50%, -50%);
  font-size: 18px;
}

.play-gate:hover {
  transform: translate(-50%, calc(-50% - 2px));
}

.play-gate.is-hidden {
  display: none;
}

.player-status {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 6;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  text-align: center;
}

.player-caption {
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
}

.detail-card {
  padding: 22px;
}

.detail-cover {
  height: 330px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #0f172a, #0284c7, #f97316);
}

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

.detail-card h1 {
  margin: 18px 0 10px;
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.detail-one-line {
  color: var(--muted);
}

.detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.detail-stats span {
  padding: 10px;
  border-radius: 16px;
  background: var(--soft);
  color: #334155;
  font-weight: 800;
}

.story-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.story-card {
  padding: 24px;
}

.story-card h2 {
  margin: 0 0 12px;
}

.story-card p {
  margin: 0;
  color: #334155;
}

.pagination-note {
  margin: 26px 0 0;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 22px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-logo {
  color: white;
  font-size: 24px;
}

.footer-inner p {
  max-width: 620px;
  margin: 12px 0 0;
  color: #94a3b8;
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.copyright {
  margin: 0;
  padding: 18px 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  text-align: center;
}

.poster-fallback {
  position: relative;
}

.poster-fallback::before {
  content: "高清剧集";
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.12em;
  background: linear-gradient(135deg, #0f172a, #0284c7, #f97316);
}

.hidden-by-filter {
  display: none !important;
}

@keyframes slowZoom {
  from {
    transform: scale(1.04);
  }
  to {
    transform: scale(1.12);
  }
}

@media (max-width: 1100px) {
  .header-inner {
    grid-template-columns: auto auto;
  }

  .nav-toggle {
    display: block;
    justify-self: end;
  }

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

  .site-header.nav-open .site-nav,
  .site-header.nav-open .header-search {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .site-header.nav-open .header-search {
    width: 100%;
  }

  .site-header.nav-open .header-search input {
    width: 100%;
  }

  .hero-content,
  .watch-layout,
  .ranking-layout,
  .story-grid {
    grid-template-columns: 1fr;
  }

  .hero-feature-card {
    max-width: 640px;
  }

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

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

@media (max-width: 760px) {
  .header-inner,
  .quick-cats,
  .container,
  .footer-inner {
    width: 100%;
  }

  .hero-carousel,
  .hero-content {
    min-height: 680px;
  }

  .hero-content {
    padding-top: 46px;
    align-content: center;
  }

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

  .hero-feature-card {
    grid-template-columns: 100px 1fr;
    border-radius: 22px;
  }

  .mini-poster {
    min-height: 150px;
  }

  .hero-nav {
    display: none;
  }

  .section-soft,
  .section-white {
    padding: 22px;
  }

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

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

  .poster-frame {
    height: 220px;
  }

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

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

  .rank-meta {
    grid-column: 2;
  }

  .player-stage,
  .main-video {
    min-height: 260px;
  }

  .player-caption,
  .footer-inner {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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

  .poster-frame {
    height: 320px;
  }

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

  .mini-poster {
    display: none;
  }
}
