:root {
  --teal-950: #12312e;
  --teal-900: #134e4a;
  --teal-800: #115e59;
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --gray-950: #111827;
  --gray-900: #1f2937;
  --gray-800: #374151;
  --gray-700: #4b5563;
  --gray-600: #6b7280;
  --gray-500: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --shadow-soft: 0 18px 45px rgba(15, 118, 110, 0.13);
  --shadow-card: 0 12px 28px rgba(17, 24, 39, 0.1);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: linear-gradient(180deg, #f8fbfb 0%, #ffffff 42%, #f7faf9 100%);
  font-family: ui-sans-serif, 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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--teal-800), var(--teal-950));
  box-shadow: 0 14px 34px rgba(15, 78, 74, 0.28);
}

.site-nav {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-500), var(--amber-500));
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(20, 184, 166, 0.35);
}

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

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

.nav-link,
.mobile-link {
  font-weight: 650;
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ccfbf1;
  opacity: 1;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 14px;
  cursor: pointer;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--white);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  padding: 0 20px 16px;
}

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

.mobile-link {
  padding: 10px 12px;
  border-radius: 12px;
}

.mobile-link:hover,
.mobile-link.active {
  background: rgba(255, 255, 255, 0.12);
}

main,
.page-main {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 32px 20px 0;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  margin-bottom: 42px;
  overflow: hidden;
  color: var(--white);
  background: var(--teal-950);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.025);
}

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

.hero-slide img,
.page-hero::before,
.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 18%, rgba(20, 184, 166, 0.28), transparent 30%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.1));
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(720px, 90%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px;
}

.hero-kicker,
.detail-kicker,
.page-hero span {
  width: max-content;
  padding: 7px 12px;
  color: var(--white);
  background: var(--teal-600);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0 18px;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p {
  max-width: 680px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.02rem, 2vw, 1.22rem);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.hero-tags span,
.tag {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-size: 0.92rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

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

.primary-button,
.search-form button {
  color: var(--white);
  background: var(--teal-600);
  box-shadow: 0 12px 28px rgba(13, 148, 136, 0.28);
}

.primary-button:hover,
.search-form button:hover {
  background: var(--teal-700);
  transform: translateY(-1px);
}

.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.hero-dots {
  position: absolute;
  right: 28px;
  bottom: 24px;
  display: flex;
  gap: 8px;
}

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

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

.quick-search-panel,
.filter-bar,
.category-panel,
.detail-copy,
.player-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(229, 231, 235, 0.85);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.quick-search-panel h2,
.category-panel h2,
.player-section h2,
.detail-copy h2 {
  margin: 0 0 6px;
  font-size: 1.45rem;
}

.quick-search-panel p,
.category-panel p {
  margin: 0;
  color: var(--gray-600);
}

.search-form {
  width: min(460px, 100%);
  display: flex;
  gap: 10px;
}

.search-form input,
.filter-input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  outline: none;
  background: var(--gray-50);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus,
.filter-input:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.content-section {
  margin-bottom: 56px;
}

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

.section-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.2;
}

.section-head h2 span {
  color: var(--teal-600);
}

.section-head p {
  margin: 8px 0 0;
  color: var(--gray-600);
}

.section-more {
  flex: 0 0 auto;
  color: var(--teal-700);
  font-weight: 800;
}

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

.compact-grid {
  gap: 18px;
}

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(229, 231, 235, 0.78);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(20, 184, 166, 0.42);
  box-shadow: 0 22px 42px rgba(17, 24, 39, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #f0fdfa, #eff6ff);
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.68));
  opacity: 0.3;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-gradient {
  opacity: 1;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--teal-600);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.78);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.year-badge,
.rank-num {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  color: var(--white);
  background: var(--amber-500);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.movie-info h3 a:hover,
.rank-item h3 a:hover {
  color: var(--teal-700);
}

.movie-info p,
.rank-item p {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 0.94rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta,
.rank-meta,
.detail-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-600);
  font-size: 0.86rem;
}

.movie-meta span,
.rank-meta span,
.detail-meta-grid span {
  padding: 5px 9px;
  background: var(--gray-100);
  border-radius: 999px;
}

.split-section {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
}

.category-panel {
  display: block;
  height: max-content;
  margin: 0;
}

.category-pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.category-pill-grid a,
.filter-chips button {
  padding: 9px 13px;
  color: var(--teal-800);
  background: #f0fdfa;
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.category-pill-grid a:hover,
.filter-chips button:hover,
.filter-chips button.active {
  color: var(--white);
  background: var(--teal-700);
  transform: translateY(-1px);
}

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

.slim-list {
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 16px;
  padding: 14px;
  background: var(--white);
  border: 1px solid rgba(229, 231, 235, 0.78);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

.rank-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  background: linear-gradient(135deg, #f0fdfa, #eff6ff);
  border-radius: 14px;
}

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

.rank-item h3 {
  margin: 2px 0 6px;
  font-size: 1.05rem;
}

.rank-num {
  top: 8px;
  left: 8px;
  min-width: 30px;
  text-align: center;
}

.page-hero {
  position: relative;
  min-height: 300px;
  margin-bottom: 34px;
  padding: 48px;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 86% 22%, rgba(245, 158, 11, 0.32), transparent 25%),
    linear-gradient(135deg, var(--teal-800), var(--teal-950));
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
}

.page-hero div {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.compact-hero,
.search-hero,
.ranking-hero,
.category-hero {
  min-height: 270px;
}

.filter-bar {
  align-items: stretch;
  flex-direction: column;
  margin-bottom: 30px;
}

.sticky-filter {
  position: sticky;
  top: 80px;
  z-index: 10;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.category-card {
  min-height: 240px;
  overflow: hidden;
  background: var(--teal-950);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.category-card a {
  position: relative;
  display: block;
  height: 100%;
  min-height: 240px;
  color: var(--white);
}

.category-card span {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.78));
}

.category-card div {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--gray-600);
  font-size: 0.95rem;
}

.breadcrumb a {
  color: var(--teal-700);
  font-weight: 700;
}

.detail-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 32px;
  margin-bottom: 38px;
  padding: 28px;
  background: linear-gradient(135deg, #ffffff, #f0fdfa);
  border: 1px solid rgba(20, 184, 166, 0.13);
  border-radius: 28px;
  box-shadow: var(--shadow-card);
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #f0fdfa, #eff6ff);
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.16);
}

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

.detail-info h1 {
  color: var(--gray-950);
  font-size: clamp(2rem, 4vw, 3.8rem);
}

.detail-one-line {
  margin: 0 0 20px;
  color: var(--gray-700);
  font-size: 1.12rem;
}

.detail-meta-grid {
  margin-bottom: 18px;
}

.tag-row .tag {
  color: var(--teal-800);
  background: #f0fdfa;
}

.player-section {
  display: block;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #020617;
  border-radius: var(--radius-xl);
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(13, 148, 136, 0.18), rgba(0, 0, 0, 0.48));
  border: 0;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  background: var(--teal-600);
  border-radius: 999px;
  box-shadow: 0 18px 45px rgba(13, 148, 136, 0.35);
  font-size: 2.2rem;
}

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

.detail-copy {
  display: block;
}

.detail-copy h2 {
  margin-top: 0;
  color: var(--gray-900);
}

.detail-copy p {
  color: var(--gray-700);
  font-size: 1.03rem;
}

.site-footer {
  margin-top: 70px;
  color: var(--gray-300);
  background: var(--gray-950);
}

.footer-inner {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 48px 20px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  color: var(--white);
  font-size: 1.15rem;
}

.site-footer p {
  max-width: 520px;
  color: var(--gray-300);
}

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

.footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-list li {
  margin: 8px 0;
}

.footer-list a:hover {
  color: #99f6e4;
}

.footer-bottom {
  padding: 16px 20px;
  text-align: center;
  color: var(--gray-500);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

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

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

  .menu-button {
    display: block;
  }

  main,
  .page-main {
    padding-top: 22px;
  }

  .hero-carousel {
    min-height: 520px;
    border-radius: 22px;
  }

  .hero-content {
    padding: 32px;
  }

  .quick-search-panel,
  .filter-bar,
  .split-section,
  .detail-hero,
  .footer-inner {
    display: grid;
    grid-template-columns: 1fr;
  }

  .search-form {
    width: 100%;
  }

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

  .page-hero {
    padding: 32px;
  }

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

@media (max-width: 560px) {
  .site-nav {
    padding: 13px 16px;
  }

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

  main,
  .page-main {
    padding-inline: 14px;
  }

  .hero-carousel {
    min-height: 560px;
    margin-bottom: 28px;
  }

  .hero-content {
    width: 100%;
    padding: 24px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 2.2rem;
  }

  .hero-dots {
    right: 22px;
    bottom: 20px;
  }

  .quick-search-panel,
  .filter-bar,
  .page-hero,
  .detail-hero,
  .player-section,
  .detail-copy {
    border-radius: 20px;
  }

  .search-form {
    flex-direction: column;
  }

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

  .rank-item {
    grid-template-columns: 98px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .movie-info p,
  .rank-item p {
    min-height: auto;
  }
}
