:root {
  --primary-50: #e6fffb;
  --primary-100: #b2f5ea;
  --primary-400: #1ab0b0;
  --primary-500: #009999;
  --primary-600: #007a7a;
  --primary-700: #005b5b;
  --accent-500: #ff7a45;
  --secondary-50: #f0f4f8;
  --secondary-100: #d9e2ec;
  --secondary-200: #bcccdc;
  --secondary-300: #9fb3c8;
  --secondary-400: #829ab1;
  --secondary-500: #627d98;
  --secondary-600: #486581;
  --secondary-700: #334e68;
  --secondary-800: #243b53;
  --secondary-900: #102a43;
  --surface: #ffffff;
  --text: #102a43;
  --muted: #627d98;
  --shadow: 0 18px 45px rgba(16, 42, 67, 0.14);
  --shadow-soft: 0 8px 22px rgba(16, 42, 67, 0.10);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(188, 204, 220, 0.65);
  backdrop-filter: blur(18px);
}

.nav-bar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--secondary-900);
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
  box-shadow: 0 10px 24px rgba(0, 153, 153, 0.28);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-menu a {
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--secondary-600);
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.is-active {
  color: var(--primary-700);
  background: var(--primary-50);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: var(--secondary-50);
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 99px;
  background: var(--secondary-800);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 22px;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: var(--primary-500);
  box-shadow: 0 14px 28px rgba(0, 153, 153, 0.26);
}

.btn-primary:hover {
  background: var(--primary-600);
}

.btn-secondary {
  color: var(--secondary-800);
  background: var(--secondary-100);
}

.btn-secondary:hover {
  background: var(--secondary-200);
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--secondary-900);
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.56) 42%, rgba(0, 0, 0, 0.18) 100%), linear-gradient(0deg, rgba(16, 42, 67, 0.95) 0%, rgba(16, 42, 67, 0.15) 48%, rgba(16, 42, 67, 0.45) 100%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(720px, 100%);
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(0, 153, 153, 0.9);
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 660px;
  margin: 0 0 24px;
  color: #d9e2ec;
  font-size: 18px;
}

.hero-tags,
.detail-tags,
.card-meta,
.rank-meta,
.detail-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-tags span,
.detail-tags span {
  padding: 6px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.hero-dots {
  position: absolute;
  right: 48px;
  bottom: 38px;
  display: flex;
  gap: 10px;
  z-index: 3;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--primary-500);
}

.quick-search {
  position: relative;
  z-index: 4;
  margin-top: -54px;
}

.quick-search-inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 460px);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.quick-search h2,
.quick-search p {
  margin: 0;
}

.quick-search h2 {
  font-size: 26px;
}

.quick-search p {
  margin-top: 6px;
  color: var(--muted);
}

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

.hero-search input,
.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--secondary-200);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--secondary-900);
  background: #ffffff;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.hero-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(0, 153, 153, 0.14);
}

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

.section-soft {
  background: linear-gradient(135deg, var(--primary-50), var(--secondary-50));
}

.section-dark {
  color: #ffffff;
  background: var(--secondary-900);
}

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

.section-heading h2,
.section-heading p {
  margin: 0;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.2;
}

.section-heading p {
  margin-top: 8px;
  color: var(--muted);
}

.section-heading a {
  color: var(--primary-600);
  font-weight: 800;
  white-space: nowrap;
}

.section-heading-light p {
  color: var(--secondary-300);
}

.section-heading-light a {
  color: var(--primary-100);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--secondary-100);
}

.card-cover img {
  transition: transform 0.5s ease;
}

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

.card-badge,
.card-year,
.rank-badge {
  position: absolute;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(10px);
}

.card-badge {
  top: 12px;
  left: 12px;
}

.card-year {
  right: 12px;
  bottom: 12px;
  background: rgba(0, 153, 153, 0.86);
}

.rank-badge {
  right: 12px;
  top: 12px;
  background: rgba(255, 122, 69, 0.9);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 50px;
  color: var(--secondary-900);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.card-title:hover {
  color: var(--primary-600);
}

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

.card-meta span,
.rank-meta span,
.detail-meta span {
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--secondary-600);
  background: var(--secondary-50);
  font-size: 12px;
  font-weight: 700;
}

.horizontal-track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding-bottom: 18px;
  scrollbar-width: none;
}

.horizontal-track::-webkit-scrollbar {
  display: none;
}

.horizontal-track .movie-card {
  width: 320px;
  flex: 0 0 auto;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 160px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(188, 204, 220, 0.5);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.rank-number {
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-400), var(--primary-700));
  font-weight: 900;
}

.rank-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: var(--secondary-100);
}

.rank-title {
  color: var(--secondary-900);
  font-size: 18px;
  font-weight: 900;
}

.rank-title:hover {
  color: var(--primary-600);
}

.rank-content p {
  margin: 6px 0 10px;
  color: var(--muted);
}

.feature-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-auto-rows: 210px;
  gap: 22px;
}

.feature-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: var(--secondary-800);
  box-shadow: var(--shadow);
}

.feature-card img {
  transition: transform 0.5s ease;
}

.feature-card:hover img {
  transform: scale(1.08);
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.08));
}

.feature-card-large {
  grid-row: span 2;
}

.feature-card div,
.feature-card-small strong,
.feature-card-small span {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
}

.feature-card div {
  bottom: 26px;
}

.feature-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--primary-100);
  font-weight: 800;
}

.feature-card strong {
  display: block;
  color: #ffffff;
  font-size: 28px;
  line-height: 1.25;
}

.feature-card p {
  margin: 12px 0 0;
  color: var(--secondary-200);
}

.feature-card-small span {
  bottom: 54px;
  color: var(--primary-100);
  font-size: 12px;
}

.feature-card-small strong {
  bottom: 22px;
  font-size: 18px;
}

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

.category-tile {
  display: grid;
  grid-template-columns: 220px 1fr;
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.category-tile-cover {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  background: var(--secondary-100);
}

.category-tile-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.04));
}

.category-tile-cover span {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.category-tile-body {
  padding: 22px;
}

.category-tile-body h2,
.category-tile-body p {
  margin: 0;
}

.category-tile-body h2 {
  font-size: 24px;
}

.category-tile-body p {
  margin-top: 8px;
  color: var(--muted);
}

.category-tile-body ul,
.site-footer ul,
.tag-links {
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.category-tile-body li + li,
.site-footer li + li {
  margin-top: 8px;
}

.category-tile-body a:hover,
.site-footer a:hover,
.tag-links a:hover,
.side-links a:hover {
  color: var(--primary-600);
}

.page-hero {
  color: #ffffff;
  background: radial-gradient(circle at 16% 20%, rgba(26, 176, 176, 0.45), transparent 32%), linear-gradient(135deg, var(--secondary-900), #071b2e 70%);
}

.page-hero .container-custom {
  padding: 76px 0 82px;
}

.page-hero span {
  display: inline-flex;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--primary-100);
  background: rgba(255, 255, 255, 0.1);
  font-weight: 800;
}

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

.page-hero p {
  max-width: 760px;
  margin: 0 0 24px;
  color: var(--secondary-200);
  font-size: 18px;
}

.filter-panel {
  margin-top: -40px;
  position: relative;
  z-index: 3;
}

.filter-card {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 24px;
  align-items: center;
  padding: 24px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.filter-card h2,
.filter-card p {
  margin: 0;
}

.filter-card p {
  color: var(--muted);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: var(--secondary-900);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.38;
  filter: blur(16px);
  transform: scale(1.08);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(16, 42, 67, 0.98), rgba(16, 42, 67, 0.76));
}

.detail-head {
  position: relative;
  z-index: 2;
  padding: 46px 0 64px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  color: var(--secondary-200);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--primary-100);
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 38px;
  align-items: center;
  margin-top: 28px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 3 / 4;
  background: var(--secondary-800);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.12;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 20px;
  color: var(--secondary-200);
  font-size: 18px;
}

.detail-info .detail-tags {
  margin: 18px 0 28px;
}

.player-section {
  padding: 48px 0 0;
  background: #ffffff;
}

.player {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(0, 153, 153, 0.38), rgba(0, 0, 0, 0.76));
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.player.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  display: flex;
  width: 72px;
  height: 72px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--primary-500);
  box-shadow: 0 16px 34px rgba(0, 153, 153, 0.36);
  font-size: 30px;
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  margin: 0;
  color: var(--secondary-100);
  text-align: center;
  pointer-events: none;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: start;
}

.detail-article,
.detail-side {
  padding: 28px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 14px;
  color: var(--secondary-900);
}

.detail-article p {
  margin: 0 0 22px;
  color: var(--secondary-700);
  font-size: 17px;
}

.tag-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-links li {
  margin: 0;
}

.tag-links a {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--secondary-50);
  color: var(--secondary-700);
  font-weight: 700;
}

.side-links {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.side-links a {
  padding: 12px;
  border-radius: 14px;
  background: var(--secondary-50);
  color: var(--secondary-700);
  font-weight: 700;
}

.site-footer {
  margin-top: 40px;
  color: var(--secondary-100);
  background: var(--secondary-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 38px;
  padding: 48px 0;
}

.footer-logo {
  color: #ffffff;
}

.footer-brand p {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--secondary-300);
}

.site-footer h3 {
  margin: 0 0 16px;
  color: #ffffff;
}

.site-footer a {
  color: var(--secondary-300);
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--secondary-400);
  font-size: 14px;
}

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

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

  .category-tile {
    grid-template-columns: 1fr;
  }

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

  .feature-card-large {
    grid-column: span 2;
  }
}

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

  .nav-menu {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    padding: 16px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .nav-menu.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    min-height: 600px;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.25));
  }

  .quick-search-inner,
  .filter-card,
  .detail-layout,
  .content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-search,
  .filter-controls {
    flex-direction: column;
  }

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

  .rank-row {
    grid-template-columns: 52px 110px 1fr;
  }

  .rank-link {
    grid-column: 2 / -1;
  }

  .detail-cover {
    width: min(300px, 100%);
  }
}

@media (max-width: 580px) {
  .container-custom {
    width: min(100% - 24px, 1280px);
  }

  .hero {
    min-height: 560px;
  }

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

  .hero-dots {
    left: 24px;
    right: auto;
    bottom: 22px;
  }

  .section-block {
    padding: 54px 0;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

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

  .feature-card-large {
    grid-column: auto;
  }

  .rank-row {
    grid-template-columns: 44px 92px 1fr;
    gap: 12px;
  }

  .rank-meta span:nth-child(n+3) {
    display: none;
  }

  .detail-head {
    padding-top: 32px;
  }

  .detail-info h1 {
    font-size: 34px;
  }
}
