:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #ecfeff;
  --text: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --cyan: #0891b2;
  --cyan-dark: #0e7490;
  --blue: #2563eb;
  --deep: #0f172a;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(103, 232, 249, 0.18), transparent 30rem), var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(8, 145, 178, 0.3);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 20px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

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

.nav-link,
.mobile-link {
  position: relative;
  padding: 10px 14px;
  border-radius: 12px;
  color: #334155;
  font-weight: 700;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--cyan-dark);
  background: linear-gradient(135deg, rgba(236, 254, 255, 0.95), rgba(239, 246, 255, 0.95));
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #0f172a;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 10px 16px 18px;
  background: rgba(255, 255, 255, 0.96);
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

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

.hero-track {
  position: relative;
  min-height: 680px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-backdrop,
.detail-hero::before,
.inner-hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.68), rgba(8, 145, 178, 0.12)), var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.06);
}

.hero-backdrop::after,
.detail-overlay {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 20% 30%, rgba(34, 211, 238, 0.28), transparent 24rem), linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.52));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 420px;
  gap: 56px;
  align-items: center;
  padding: 86px 0 96px;
}

.hero-copy {
  color: #fff;
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  color: #0e7490;
  background: rgba(207, 250, 254, 0.92);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-copy .eyebrow,
.detail-copy .eyebrow,
.inner-hero .eyebrow {
  color: #cffafe;
  background: rgba(14, 116, 144, 0.38);
  border: 1px solid rgba(103, 232, 249, 0.25);
}

.hero h1,
.inner-hero h1,
.detail-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero p,
.inner-hero p,
.detail-copy p {
  max-width: 740px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(18px, 2vw, 22px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.86);
}

.hero-meta span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.36);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.primary-button,
.ghost-button,
.home-search button,
.filter-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button,
.home-search button {
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.26);
}

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

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

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 32px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 14px;
  color: #fff;
  background: rgba(8, 145, 178, 0.82);
  border-radius: 999px;
  font-weight: 800;
}

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

.hero-dots button {
  width: 42px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.32);
}

.hero-dots button.active {
  background: #67e8f9;
}

.quick-search-card,
.filter-panel,
.rank-panel,
.content-card,
.player-card,
.info-card,
.category-overview-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.quick-search-card {
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  gap: 24px;
  align-items: center;
  margin-top: -48px;
  padding: 26px;
}

.quick-search-card h2,
.section-heading h2,
.rank-panel h2,
.content-card h2,
.info-card h2,
.category-overview-card h2 {
  margin: 8px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.home-search,
.filter-search {
  display: flex;
  gap: 12px;
}

.home-search input,
.filter-search input,
.filter-selects select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.home-search input:focus,
.filter-search input:focus,
.filter-selects select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.12);
}

.page-section {
  padding: 72px 0;
}

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

.section-heading p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link,
.text-button {
  color: var(--cyan-dark);
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  display: grid;
  min-height: 230px;
  align-content: end;
  overflow: hidden;
  padding: 18px;
  color: #fff;
  border-radius: 24px;
  background: #0f172a;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
}

.category-tile img,
.category-tile::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.category-tile img {
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-tile::after {
  content: "";
  background: linear-gradient(180deg, transparent 10%, rgba(2, 6, 23, 0.88));
}

.category-tile strong,
.category-tile small {
  position: relative;
  z-index: 2;
}

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

.category-tile small {
  color: rgba(255, 255, 255, 0.82);
}

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

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  margin: 0 0 24px;
  padding: 18px;
}

.filter-selects {
  display: flex;
  gap: 12px;
}

.filter-search button {
  color: var(--cyan-dark);
  background: var(--surface-soft);
}

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

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

.movie-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(8, 145, 178, 0.3);
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.featured-card .poster-link img {
  aspect-ratio: 16 / 10;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.65));
}

.play-badge,
.corner-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
}

.play-badge {
  left: 14px;
  bottom: 14px;
  color: #fff;
  background: rgba(8, 145, 178, 0.9);
  padding: 7px 12px;
}

.corner-badge {
  top: 12px;
  right: 12px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.88);
  padding: 6px 10px;
}

.card-body {
  padding: 16px;
}

.card-body h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.card-body h2 a:hover {
  color: var(--cyan-dark);
}

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

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

.meta-row span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.meta-row span {
  color: #475569;
  background: #f1f5f9;
}

.tag-row span {
  color: var(--cyan-dark);
  background: #ecfeff;
}

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

.side-rank,
.detail-side {
  min-width: 0;
}

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

.rank-panel,
.info-card,
.content-card,
.player-card {
  padding: 22px;
}

.rank-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.rank-item {
  display: grid;
  grid-template-columns: 42px 58px 1fr;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.25s ease, transform 0.25s ease;
}

.rank-item:hover {
  background: #f8fafc;
  transform: translateX(4px);
}

.rank-item img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-item span:last-child {
  min-width: 0;
}

.rank-item strong,
.rank-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-item small {
  color: var(--muted);
}

.rank-num,
.rank-dot {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.rank-dot {
  width: 12px;
  height: 12px;
  justify-self: center;
}

.inner-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

.inner-hero .container {
  position: relative;
  z-index: 2;
  padding: 96px 0;
}

.inner-hero::before {
  background-image: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.28), transparent 24rem), linear-gradient(135deg, #020617, #0f172a 58%, #0e7490);
}

.category-hero::before {
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.68)), var(--hero-image);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  align-items: center;
  padding: 18px;
}

.overview-cover {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.overview-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
  min-height: 620px;
  padding: 84px 0;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

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

.breadcrumb a:hover {
  color: #67e8f9;
}

.detail-tags {
  margin: 22px 0 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
}

.detail-main {
  display: grid;
  gap: 24px;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: #fff;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(8, 145, 178, 0.26), rgba(2, 6, 23, 0.68));
}

.player-cover.hidden {
  display: none;
}

.big-play {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26);
  clip-path: polygon(30% 20%, 30% 80%, 82% 50%);
}

.player-cover strong {
  font-size: 24px;
}

.player-cover small,
.player-status {
  color: rgba(255, 255, 255, 0.82);
}

.player-status {
  margin-top: 14px;
  color: var(--muted);
}

.content-card p {
  margin: 14px 0 0;
  color: #334155;
  font-size: 17px;
}

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

.info-card li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

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

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding: 54px 0 30px;
}

.footer-brand {
  color: #fff;
  font-size: 22px;
}

.site-footer p {
  max-width: 520px;
  color: #94a3b8;
}

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

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a:hover {
  color: #67e8f9;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 30px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
}

.is-hidden {
  display: none !important;
}

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

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

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

  .side-rank,
  .detail-side {
    display: none;
  }
}

@media (max-width: 860px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero,
  .hero-track,
  .hero-content {
    min-height: 620px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 72px 0 90px;
  }

  .hero-poster {
    display: none;
  }

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

  .home-search,
  .filter-search,
  .filter-selects {
    flex-direction: column;
  }

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

  .detail-poster {
    max-width: 260px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 22px, 1200px);
  }

  .header-inner {
    min-height: 66px;
  }

  .brand-text small {
    display: none;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .hero,
  .hero-track,
  .hero-content {
    min-height: 560px;
  }

  .hero h1,
  .inner-hero h1,
  .detail-copy h1 {
    font-size: 38px;
  }

  .hero p,
  .inner-hero p,
  .detail-copy p {
    font-size: 16px;
  }

  .page-section {
    padding: 46px 0;
  }

  .section-heading {
    display: block;
  }

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

  .card-body {
    padding: 13px;
  }

  .card-body h2 {
    font-size: 16px;
  }

  .category-tile {
    min-height: 180px;
  }

  .detail-hero-inner {
    min-height: auto;
    padding: 54px 0;
  }

  .footer-bottom {
    display: grid;
  }
}
