:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: #ffffff;
  --panel-dark: #1e293b;
  --text: #0f172a;
  --muted: #64748b;
  --light: #f8fafc;
  --line: rgba(148, 163, 184, 0.22);
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --rose: #ef4444;
  --radius: 18px;
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: #f1f5f9;
  line-height: 1.65;
}

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, #1e293b, #334155, #1e293b);
  color: #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.28);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-shell {
  max-width: 1240px;
  height: 66px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.35);
}

.brand-text {
  font-size: 1.18rem;
}

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

.main-nav a {
  padding: 9px 12px;
  border-radius: 999px;
  color: #dbeafe;
  font-weight: 600;
  transition: 0.22s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  background: rgba(245, 158, 11, 0.18);
}

.nav-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 4px;
  min-width: 310px;
}

.nav-search input,
.big-search input,
.filter-bar input {
  border: 0;
  outline: none;
  width: 100%;
  font: inherit;
}

.nav-search input {
  color: #fff;
  background: transparent;
  padding: 8px 12px;
}

.nav-search input::placeholder {
  color: #94a3b8;
}

.nav-search button,
.big-search button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  font-weight: 800;
  padding: 8px 16px;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #fff;
  font-size: 1.4rem;
  background: transparent;
  cursor: pointer;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  color: #fff;
  background: radial-gradient(circle at 22% 20%, rgba(245, 158, 11, 0.2), transparent 34%), linear-gradient(135deg, #020617, #111827 48%, #1e293b);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 140px;
  background: linear-gradient(0deg, #f1f5f9, rgba(241, 245, 249, 0));
  pointer-events: none;
}

.hero-track {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 78px 22px 120px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: 48px;
  align-items: center;
  min-height: 450px;
}

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

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

.hero-media {
  order: 2;
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.48);
  transform: rotate(1.6deg);
  isolation: isolate;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.42));
  z-index: 1;
}

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

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

.eyebrow {
  margin: 0 0 8px;
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(2.45rem, 6vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-desc {
  margin: 0 0 18px;
  max-width: 620px;
  color: #dbeafe;
  font-size: 1.08rem;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #78350f;
  background: #fef3c7;
  font-size: 0.76rem;
  font-weight: 800;
}

.tag-row.big span {
  color: #fed7aa;
  background: rgba(245, 158, 11, 0.16);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.22s ease;
}

.btn.primary {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.26);
}

.btn.ghost {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.btn:hover,
.movie-card:hover,
.category-tile:hover,
.rank-card:hover {
  transform: translateY(-3px);
}

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

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

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

.section-shell,
.page-hero,
.detail-content {
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 22px;
}

.quick-search {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  margin-top: -48px;
  position: relative;
  z-index: 5;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 26px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search h2,
.section-head h2,
.rank-panel h2,
.page-hero h1,
.detail-info h1,
.article-card h2,
.related-card h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.big-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.04);
}

.big-search input {
  padding: 11px 16px;
  border-radius: 999px;
}

.big-search.standalone {
  max-width: 720px;
  margin-top: 24px;
}

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

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

.text-link {
  color: var(--amber-dark);
  font-weight: 900;
}

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

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

.category-tile {
  min-height: 210px;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff, #f8fafc);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.09);
  border: 1px solid #e2e8f0;
  transition: 0.22s ease;
  overflow: hidden;
}

.category-tile a {
  display: block;
  height: 100%;
  padding: 22px;
}

.category-tile h3 {
  margin: 0 0 8px;
  font-size: 1.28rem;
}

.category-tile p {
  margin: 0 0 16px;
  color: var(--muted);
}

.tile-mini-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mini-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #334155;
  font-weight: 700;
  font-size: 0.84rem;
}

.mini-link img {
  width: 42px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 auto;
}

.mini-link span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
  border: 1px solid #e2e8f0;
  transition: 0.22s ease;
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #cbd5e1;
}

.poster img,
.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.35s ease;
}

.movie-card:hover .poster img,
.rank-card:hover .rank-poster img {
  transform: scale(1.06);
}

.year-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.76);
  font-size: 0.75rem;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-body h3,
.card-body h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.card-body h3 a:hover,
.card-body h2 a:hover,
.rank-card h2 a:hover {
  color: var(--amber-dark);
}

.card-body p {
  min-height: 52px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.card-meta span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #f1f5f9;
}

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

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

.rank-panel {
  position: sticky;
  top: 90px;
  padding: 24px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(180deg, #1e293b, #0f172a);
  box-shadow: var(--shadow);
}

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

.rank-list li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.rank-list a {
  display: flex;
  gap: 10px;
  padding: 9px 0;
  color: #e2e8f0;
  font-weight: 700;
}

.rank-list span {
  color: var(--amber);
  font-weight: 900;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  color: #fff;
  background: radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.18), transparent 26%), linear-gradient(135deg, #020617, #1e293b);
  max-width: none;
  padding-top: 80px;
  padding-bottom: 72px;
}

.page-hero.narrow > * {
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 22px;
  padding-right: 22px;
}

.page-hero h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  color: #cbd5e1;
}

.filter-bar {
  margin-bottom: 22px;
}

.filter-bar input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

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

.rank-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
  transition: 0.22s ease;
}

.rank-poster {
  position: relative;
  overflow: hidden;
  min-height: 110px;
  border-radius: 16px;
}

.rank-poster span {
  position: absolute;
  left: 9px;
  top: 9px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: var(--amber);
  font-weight: 900;
}

.rank-card h2 {
  margin: 4px 0 8px;
  font-size: 1.1rem;
}

.rank-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

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

.search-item {
  display: grid;
  grid-template-columns: 122px 1fr;
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.search-item img {
  width: 122px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
}

.search-item h2 {
  margin: 0 0 6px;
  font-size: 1.08rem;
}

.search-item p {
  margin: 0 0 8px;
  color: var(--muted);
}

.detail-main {
  background: #0f172a;
  color: #fff;
}

.detail-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 70px 22px 42px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
}

.detail-cover {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.breadcrumb {
  color: #cbd5e1;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--amber);
}

.detail-info h1 {
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1.02;
}

.detail-one {
  max-width: 860px;
  color: #dbeafe;
  font-size: 1.08rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 700;
}

.watch-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.play-mask {
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.18), rgba(2, 6, 23, 0.68));
  transition: 0.25s ease;
}

.play-mask.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.38);
  font-size: 2rem;
}

.play-mask strong {
  font-size: 1.25rem;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  color: var(--text);
  padding-top: 28px;
}

.article-card,
.related-card {
  padding: 26px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
}

.article-card h2 + p {
  color: #334155;
}

.related-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #111827, #020617);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

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

.footer-inner strong {
  color: #fff;
  font-size: 1.1rem;
}

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

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

.footer-links a {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.is-filtered-out {
  display: none !important;
}

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

  .split-section,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }

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

@media (max-width: 820px) {
  .nav-shell {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 12px 18px;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav,
  .nav-search {
    display: none;
    width: 100%;
  }

  .topbar.open .main-nav,
  .topbar.open .nav-search {
    display: flex;
  }

  .main-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav a {
    border-radius: 14px;
  }

  .nav-search {
    min-width: 0;
  }

  .hero {
    min-height: 0;
  }

  .hero-track {
    padding-top: 42px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .hero-media {
    order: 0;
    transform: none;
  }

  .hero-media img {
    height: 270px;
  }

  .quick-search {
    grid-template-columns: 1fr;
    margin-top: -34px;
  }

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

  .detail-hero {
    grid-template-columns: 1fr;
    padding-top: 38px;
  }

  .detail-cover {
    max-width: 320px;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .section-shell,
  .page-hero,
  .detail-content,
  .watch-section,
  .detail-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-text {
    font-size: 1rem;
  }

  .hero-copy h1,
  .detail-info h1 {
    font-size: 2.15rem;
  }

  .hero-actions,
  .big-search {
    flex-direction: column;
    border-radius: 20px;
  }

  .category-grid,
  .category-grid.large,
  .movie-grid,
  .movie-grid.tight {
    grid-template-columns: 1fr;
  }

  .rank-card,
  .search-item {
    grid-template-columns: 1fr;
  }

  .search-item img {
    width: 100%;
    height: 170px;
  }
}
