:root {
  --teal: #14b8a6;
  --cyan: #06b6d4;
  --blue: #3b82f6;
  --dark: #111827;
  --gray: #4b5563;
  --muted: #6b7280;
  --line: rgba(15, 23, 42, 0.1);
  --card: #ffffff;
  --soft: #f0fdfa;
  --radius: 18px;
  --shadow: 0 22px 45px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--dark);
  background: linear-gradient(180deg, #ecfeff 0%, #ffffff 28%, #f8fafc 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

img {
  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;
  color: #ffffff;
  background: linear-gradient(90deg, var(--teal), var(--cyan), var(--blue));
  box-shadow: 0 12px 32px rgba(14, 116, 144, 0.28);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

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

.desktop-nav > a,
.nav-dropdown > a {
  padding: 22px 0;
  opacity: 0.92;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  opacity: 1;
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 60px;
  left: 0;
  width: 210px;
  padding: 10px;
  color: var(--dark);
  background: #ffffff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--gray);
}

.dropdown-panel a:hover {
  color: #0f766e;
  background: #ecfeff;
}

.nav-search,
.mobile-search,
.search-box-large form {
  display: flex;
  align-items: center;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.nav-search input,
.mobile-search input,
.search-box-large input {
  width: 180px;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 9px 14px;
}

.nav-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.nav-search button,
.mobile-search button,
.search-box-large button {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  padding: 9px 15px;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-menu.is-open {
  display: grid;
  gap: 10px;
}

.mobile-menu a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

.hero-carousel {
  position: relative;
  height: 430px;
  overflow: hidden;
  background: linear-gradient(90deg, #111827, #1f2937);
}

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

.hero-slide {
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.8), transparent 32%), linear-gradient(135deg, #0f172a, #0891b2);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.45) 46%, rgba(0, 0, 0, 0.12)), linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, calc(100% - 72px));
  margin-left: max(24px, calc((100% - 1180px) / 2));
  padding-top: 78px;
  color: #ffffff;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-kicker {
  color: #99f6e4;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.24);
  backdrop-filter: blur(12px);
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.hero-tags,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.hero-tags span,
.detail-meta span,
.detail-meta a {
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  box-shadow: 0 14px 28px rgba(6, 182, 212, 0.28);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-size: 32px;
  cursor: pointer;
  transform: translateY(-50%);
  transition: all 0.2s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: translateY(-50%) scale(1.08);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.5);
}

.hero-dots button.is-active {
  background: #ffffff;
  transform: scale(1.25);
}

.hero-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(0, 0, 0, 0.22);
}

.hero-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #2dd4bf, #22d3ee);
  animation: heroProgress 5s linear infinite;
}

@keyframes heroProgress {
  from { width: 0; }
  to { width: 100%; }
}

.section {
  padding: 42px 0;
}

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

.section-head h2 {
  margin: 4px 0 0;
  font-size: clamp(26px, 4vw, 34px);
}

.section-head.light,
.section-head.light .section-kicker {
  color: #ffffff;
}

.text-link {
  color: #0f766e;
  font-weight: 800;
}

.text-link.light {
  color: #ffffff;
}

.sort-tabs,
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.sort-tabs button,
.filter-buttons button {
  border: 0;
  border-radius: 999px;
  padding: 9px 15px;
  color: var(--gray);
  background: #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sort-tabs button.is-active,
.filter-buttons button.is-active,
.sort-tabs button:hover,
.filter-buttons button:hover {
  color: #ffffff;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link,
.poster-shell {
  position: relative;
  display: block;
}

.poster-shell {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin: 0;
  background: radial-gradient(circle at 25% 20%, rgba(45, 212, 191, 0.95), transparent 34%), radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.75), transparent 30%), linear-gradient(135deg, #0f172a, #164e63 56%, #0891b2);
}

.poster-shell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.25s ease;
}

.poster-shell img.img-missing {
  opacity: 0;
}

.movie-card:hover .poster-shell img {
  transform: scale(1.09);
}

.play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 44px;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
}

.movie-card-body {
  padding: 16px;
}

.movie-title {
  display: block;
  overflow: hidden;
  color: var(--dark);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.movie-meta,
.rank-info div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-meta a,
.movie-meta span,
.rank-info span {
  padding: 4px 8px;
  border-radius: 8px;
  background: #f1f5f9;
}

.movie-meta a {
  color: #0f766e;
  background: #ccfbf1;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #0f766e;
  background: #ecfeff;
  font-size: 12px;
}

.category-strip {
  padding-top: 22px;
}

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

.category-tile,
.category-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 22px;
  border-radius: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #06b6d4 56%, #3b82f6);
  box-shadow: 0 18px 36px rgba(6, 182, 212, 0.2);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 45px rgba(6, 182, 212, 0.28);
}

.category-tile span,
.category-card h2 {
  font-size: 22px;
  font-weight: 850;
}

.category-tile small,
.category-card p {
  color: rgba(255, 255, 255, 0.88);
}

.category-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  font-weight: 900;
}

.rank-section,
.rank-hero {
  padding: 30px;
  border-radius: 28px;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
  box-shadow: 0 24px 50px rgba(37, 99, 235, 0.22);
}

.rank-list {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.rank-row {
  display: grid;
  grid-template-columns: 54px 136px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.rank-num {
  color: #0f766e;
  font-size: 22px;
  font-weight: 950;
  text-align: center;
}

.rank-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #0891b2);
}

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

.rank-thumb img.img-missing {
  opacity: 0;
}

.rank-info a {
  color: var(--dark);
  font-size: 18px;
  font-weight: 850;
}

.rank-info p {
  display: -webkit-box;
  margin: 4px 0 8px;
  overflow: hidden;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.masonry-grid {
  columns: 3 280px;
  column-gap: 22px;
}

.masonry-grid .movie-card {
  break-inside: avoid;
  margin-bottom: 22px;
}

.horizontal-section {
  padding-bottom: 64px;
}

.horizontal-scroller {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 8px 2px 18px;
  scroll-snap-type: x mandatory;
}

.horizontal-item {
  width: 320px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin: 28px 0;
  padding: 52px;
  border-radius: 30px;
  background: linear-gradient(135deg, #ecfeff, #ffffff 55%, #dbeafe);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.page-hero h1 {
  margin: 8px 0 12px;
  font-size: clamp(32px, 5vw, 50px);
}

.page-hero p {
  max-width: 850px;
  color: var(--gray);
  font-size: 17px;
}

.plain-page {
  min-height: 55vh;
}

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.filter-panel input {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  padding: 11px 16px;
}

.listing-grid {
  margin-bottom: 56px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.32;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px);
  transform: scale(1.05);
}

.detail-bg:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.7));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 28px 0 46px;
}

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

.breadcrumb a:hover {
  color: #99f6e4;
}

.detail-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.detail-copy h1 {
  margin: 10px 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 850px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.detail-tags span {
  color: #ffffff;
  background: rgba(20, 184, 166, 0.28);
}

.player-section {
  margin-top: 34px;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.25);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.2), rgba(0, 0, 0, 0.22));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 42px;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  box-shadow: 0 18px 38px rgba(6, 182, 212, 0.35);
}

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

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 28px;
}

.content-card {
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

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

.content-card p {
  margin: 0;
  color: var(--gray);
  font-size: 16px;
}

.related-section {
  padding-top: 34px;
}

.search-box-large form {
  width: min(760px, 100%);
  margin: 0 auto 28px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1);
}

.search-box-large input {
  flex: 1;
  width: auto;
  color: var(--dark);
  padding: 16px 20px;
}

.search-box-large button {
  padding: 16px 24px;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
}

.site-footer {
  margin-top: 64px;
  color: #ffffff;
  background: linear-gradient(180deg, #1f2937, #111827);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 26px;
  padding: 42px 0;
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.site-footer p,
.site-footer a {
  color: rgba(255, 255, 255, 0.76);
}

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

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

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

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

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

  .detail-layout {
    grid-template-columns: 280px 1fr;
  }

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

@media (max-width: 760px) {
  .container,
  .nav-wrap,
  .mobile-menu,
  .footer-grid {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

  .hero-carousel {
    height: 520px;
  }

  .hero-content {
    width: calc(100% - 42px);
    margin-left: 21px;
    padding-top: 70px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .hero-control {
    display: none;
  }

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

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

  .movie-card-body {
    padding: 13px;
  }

  .movie-title {
    font-size: 16px;
  }

  .rank-section,
  .page-hero {
    padding: 24px;
    border-radius: 22px;
  }

  .rank-row {
    grid-template-columns: 44px 96px 1fr;
    gap: 10px;
    padding: 10px;
  }

  .rank-info p,
  .rank-info div {
    display: none;
  }

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

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

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

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

  .horizontal-item {
    width: 280px;
  }

  .hero-dots {
    bottom: 18px;
  }
}
