:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-500: #64748b;
  --gray-700: #334155;
  --gray-900: #0f172a;
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --cyan-600: #0891b2;
  --blue-600: #2563eb;
  --orange-500: #f97316;
  --yellow-400: #facc15;
  --white: #ffffff;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --shadow-lg: 0 15px 35px rgba(15, 23, 42, 0.16);
  --shadow-xl: 0 24px 60px rgba(15, 23, 42, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800));
  color: var(--white);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.25);
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 72px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.site-logo {
  flex-shrink: 0;
  font-size: 1.45rem;
}

.logo-mark {
  display: inline-grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-600));
  box-shadow: 0 10px 25px rgba(6, 182, 212, 0.35);
  font-size: 0.8rem;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.nav-link {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--cyan-400);
}

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

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
  padding: 0.55rem 0.85rem;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.header-search button {
  border: 0;
  color: var(--white);
  background: var(--cyan-600);
  padding: 0.58rem 0.9rem;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 0.75rem;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.55rem 0.75rem;
}

.hero-section {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-600), #1d4ed8 48%, var(--slate-900));
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.26;
  background-image: radial-gradient(circle at 20% 20%, rgba(250, 204, 21, 0.35), transparent 28%), radial-gradient(circle at 82% 18%, rgba(34, 211, 238, 0.32), transparent 32%), linear-gradient(135deg, rgba(255,255,255,0.08) 25%, transparent 25%);
  background-size: auto, auto, 48px 48px;
}

.hero-container {
  position: relative;
  z-index: 1;
  min-height: 620px;
  display: flex;
  align-items: center;
  padding: 4rem 0;
}

.hero-slider {
  position: relative;
  width: 100%;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.7fr);
  align-items: center;
  gap: 3rem;
}

.hero-slide.active {
  display: grid;
  animation: fadeIn 0.55s ease both;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  color: var(--yellow-400);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 7vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.08em;
}

.hero-copy p,
.page-hero p {
  max-width: 760px;
  margin: 0 0 1.5rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.12rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.hero-tags span,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: var(--white);
  padding: 0.42rem 0.72rem;
  font-size: 0.84rem;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  border-radius: 999px;
  padding: 0 1.6rem;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-btn {
  color: var(--white);
  background: linear-gradient(90deg, var(--cyan-500), var(--blue-600));
  box-shadow: 0 18px 38px rgba(8, 145, 178, 0.3);
}

.secondary-btn {
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-poster {
  position: relative;
  display: block;
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 2rem;
  box-shadow: var(--shadow-xl);
  background: linear-gradient(135deg, rgba(15,23,42,0.82), rgba(8,145,178,0.42));
}

.hero-poster img {
  width: 100%;
  height: 430px;
  object-fit: cover;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.46), transparent 55%);
}

.hero-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.hero-controls button {
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  width: 2.5rem;
  height: 2.5rem;
  transition: background 0.2s ease;
}

.hero-controls button:hover,
.hero-dot.active {
  background: var(--cyan-500);
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.hero-dot {
  width: 0.75rem !important;
  height: 0.75rem !important;
}

.section-block {
  padding: 4rem 0;
}

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

.section-heading.left {
  display: block;
}

.section-heading span {
  display: block;
  color: var(--cyan-600);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.section-heading h2 {
  margin: 0.2rem 0 0;
  color: var(--gray-900);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.1;
}

.section-heading a {
  color: var(--cyan-600);
  font-weight: 800;
}

.category-grid,
.movie-grid,
.category-overview-grid {
  display: grid;
  gap: 1.25rem;
}

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

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

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

.category-tile,
.category-overview-card a,
.movie-card,
.story-card,
.detail-side-card,
.ranking-panel,
.filter-panel {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.category-tile {
  position: relative;
  min-height: 180px;
  padding: 1.25rem;
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), rgba(2, 6, 23, 0.15));
}

.category-tile span,
.category-tile em {
  position: relative;
  z-index: 1;
}

.category-tile span {
  font-size: 1.35rem;
  font-weight: 900;
}

.category-tile em {
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
}

.movie-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.poster-frame {
  position: relative;
  overflow: hidden;
  min-height: 245px;
  background: linear-gradient(135deg, var(--slate-800), var(--cyan-600));
}

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

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

.poster-small,
.poster-small img {
  min-height: 185px;
  height: 185px;
}

.poster-tiny {
  width: 82px;
  min-width: 82px;
  min-height: 108px;
  border-radius: 0.8rem;
}

.poster-tiny img {
  width: 82px;
  height: 108px;
}

.poster-empty::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.45), transparent 34%), linear-gradient(135deg, var(--slate-900), var(--cyan-600));
}

.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 0.85rem;
  border-radius: 999px;
  color: var(--white);
  font-weight: 900;
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
}

.type-badge {
  right: 0.85rem;
  background: var(--orange-500);
}

.rank-badge {
  left: 0.85rem;
  background: linear-gradient(135deg, var(--yellow-400), var(--orange-500));
}

.play-bubble {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--cyan-500);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-bubble {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-card-body {
  padding: 1rem;
}

.movie-card-body h2 {
  margin: 0 0 0.45rem;
  color: var(--gray-900);
  font-size: 1.05rem;
  line-height: 1.35;
}

.movie-card-body p {
  min-height: 3.2rem;
  margin: 0 0 0.8rem;
  color: var(--gray-500);
  font-size: 0.92rem;
}

.movie-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.movie-meta span {
  color: var(--gray-500);
  font-size: 0.82rem;
}

.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 0.45rem;
  color: #cbd5e1;
}

.tag-row .tag,
.movie-card .tag {
  color: var(--gray-700);
  background: var(--gray-100);
}

.soft-bg {
  background: linear-gradient(135deg, #fff7ed, #ecfeff);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.36fr);
  gap: 2rem;
}

.ranking-panel {
  padding: 1.25rem;
  align-self: start;
}

.rank-list {
  display: grid;
  gap: 0.85rem;
}

.rank-row a {
  display: grid;
  grid-template-columns: 44px 82px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  padding: 0.8rem;
  border-radius: 1rem;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-row a:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-lg);
}

.rank-index {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-600));
  font-weight: 900;
}

.rank-row h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.rank-row p {
  margin: 0.2rem 0;
  color: var(--gray-500);
  font-size: 0.9rem;
}

.rank-row span {
  color: var(--cyan-600);
  font-size: 0.82rem;
  font-weight: 700;
}

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

.filter-panel {
  margin-bottom: 1.4rem;
  padding: 1rem;
}

.filter-panel input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  outline: 0;
  padding: 0.85rem 1rem;
  color: var(--gray-900);
  background: var(--gray-50);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.filter-buttons button {
  border: 0;
  border-radius: 999px;
  color: var(--gray-700);
  background: var(--gray-100);
  padding: 0.5rem 0.85rem;
  font-weight: 800;
}

.filter-buttons button.active,
.filter-buttons button:hover {
  color: var(--white);
  background: var(--cyan-600);
}

.no-results {
  margin: 1rem 0 0;
  color: var(--gray-500);
  font-weight: 700;
}

.page-hero {
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-600), var(--blue-600) 45%, var(--slate-900));
}

.compact-hero {
  padding: 4rem 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
}

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

.category-overview-card a {
  display: block;
  padding: 1.2rem;
}

.category-thumb-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.category-thumb-row img {
  width: 100%;
  height: 135px;
  border-radius: 0.9rem;
  object-fit: cover;
  background: linear-gradient(135deg, var(--slate-800), var(--cyan-600));
}

.category-overview-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.4rem;
}

.category-overview-card p {
  margin: 0 0 0.9rem;
  color: var(--gray-500);
}

.category-overview-card span {
  color: var(--cyan-600);
  font-weight: 900;
}

.watch-hero {
  padding: 2rem 0 3.5rem;
  color: var(--white);
  background: radial-gradient(circle at 12% 12%, rgba(34, 211, 238, 0.25), transparent 34%), linear-gradient(135deg, var(--slate-950), var(--slate-800));
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.5rem;
  align-items: start;
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  background: #000000;
  box-shadow: var(--shadow-xl);
}

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

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 5rem;
  height: 5rem;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-600));
  box-shadow: 0 24px 60px rgba(6, 182, 212, 0.35);
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.video-player.playing .player-start {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.8);
}

.player-status {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 5;
  border-radius: 999px;
  color: var(--white);
  background: rgba(2, 6, 23, 0.72);
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.player-status.show {
  opacity: 1;
}

.detail-side-card {
  padding: 1rem;
  color: var(--gray-900);
}

.detail-poster,
.detail-poster img {
  min-height: 420px;
  height: 420px;
  border-radius: 1rem;
}

.detail-side-card h1 {
  margin: 1rem 0 0.6rem;
  font-size: 1.55rem;
  line-height: 1.25;
}

.detail-side-card p {
  margin: 0 0 1rem;
  color: var(--gray-500);
}

.detail-side-card dl {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}

.detail-side-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.55rem;
}

.detail-side-card dt {
  color: var(--gray-500);
  font-weight: 700;
}

.detail-side-card dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}

.detail-content {
  display: grid;
  gap: 1.2rem;
}

.story-card {
  padding: 1.5rem;
}

.story-card h2 {
  margin: 0 0 0.8rem;
  font-size: 1.45rem;
}

.story-card p {
  margin: 0.7rem 0 0;
  color: var(--gray-700);
  font-size: 1.02rem;
}

.accent-card {
  border-left: 5px solid var(--orange-500);
}

.detail-tags {
  padding: 0.2rem 0;
}

.detail-tags .tag {
  color: var(--cyan-600);
}

.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.prev-next a {
  flex: 1;
  border-radius: 1rem;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  padding: 1rem;
  color: var(--cyan-600);
  font-weight: 900;
}

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

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
  padding: 4rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-logo {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.site-footer h2 {
  margin: 0 0 1rem;
  color: var(--white);
  font-size: 1rem;
}

.site-footer p {
  margin: 0;
}

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

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 2rem auto 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.25rem;
  text-align: center;
  color: #94a3b8;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  .hero-slide,
  .detail-grid,
  .split-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-side-card {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1rem;
  }

  .detail-poster,
  .detail-poster img {
    min-height: 300px;
    height: 300px;
  }
}

@media (max-width: 820px) {
  .nav-shell {
    flex-wrap: wrap;
    padding: 0.8rem 0;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 0.8rem;
  }

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

  .nav-link {
    border-radius: 0.75rem;
    padding: 0.65rem 0.8rem;
  }

  .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .header-search {
    order: 4;
    width: 100%;
  }

  .hero-container {
    min-height: auto;
    padding: 3rem 0;
  }

  .hero-slide.active {
    display: flex;
    flex-direction: column;
  }

  .hero-poster,
  .hero-poster img {
    width: 100%;
    min-height: 320px;
    height: 320px;
  }

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

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

  .site-logo {
    font-size: 1.15rem;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 2.35rem;
  }

  .movie-grid,
  .category-grid,
  .category-overview-grid,
  .rank-page-list,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .rank-row a {
    grid-template-columns: 38px 70px minmax(0, 1fr);
  }

  .poster-tiny,
  .poster-tiny img {
    width: 70px;
    min-width: 70px;
    height: 92px;
    min-height: 92px;
  }

  .detail-side-card {
    display: block;
  }

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

  .prev-next {
    flex-direction: column;
  }
}
