:root {
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --teal-800: #115e59;
  --teal-900: #134e4a;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --red-600: #dc2626;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 22px 60px rgba(15, 23, 42, 0.22);
  --radius: 24px;
}

* {
  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(--gray-800);
  background: linear-gradient(180deg, var(--gray-50), var(--white));
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: var(--white);
  background: linear-gradient(90deg, var(--teal-700), var(--teal-900));
  box-shadow: 0 12px 30px rgba(15, 78, 74, 0.28);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  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 {
  font-size: 22px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-900);
  background: linear-gradient(135deg, var(--teal-100), var(--white));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

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

.nav-link,
.mobile-link {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--white);
}

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

.menu-button span {
  width: 20px;
  height: 2px;
  margin: 4px auto;
  display: block;
  border-radius: 99px;
  background: var(--white);
}

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

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 0;
}

.hero-carousel {
  position: relative;
  height: clamp(520px, 58vw, 640px);
  margin-bottom: 48px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  background: var(--gray-900);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.05));
}

.hero-content {
  position: absolute;
  inset: 0;
  max-width: 760px;
  padding: clamp(36px, 6vw, 76px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--white);
}

.hero-badges,
.hero-tags,
.hero-actions,
.detail-tags-line,
.filter-row,
.meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.teal-badge,
.amber-badge,
.hero-tags span,
.detail-tags-line span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 700;
}

.teal-badge {
  padding: 6px 12px;
  color: var(--white);
  background: var(--teal-600);
}

.amber-badge {
  padding: 6px 12px;
  color: var(--white);
  background: var(--amber-500);
}

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

.hero-content p {
  max-width: 690px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags span {
  padding: 7px 12px;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-actions {
  margin-top: 28px;
}

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

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

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

.ghost-button {
  padding: 0 22px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
}

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

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

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

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

.search-panel,
.filter-panel,
.page-hero,
.detail-card,
.info-panel,
.category-card,
.movie-card,
.side-links {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search-panel {
  margin-bottom: 54px;
  padding: 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 24px;
  align-items: center;
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-card h1,
.detail-card h2,
.info-panel h2 {
  margin: 0;
  color: var(--gray-800);
}

.search-panel p,
.page-hero p,
.category-card p {
  color: var(--gray-600);
  line-height: 1.8;
}

.search-form {
  display: flex;
  gap: 12px;
}

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

.search-form input:focus,
.inline-search input:focus {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

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

.section-heading {
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.section-more,
.text-link,
.breadcrumb a,
.info-panel a {
  color: var(--teal-700);
  font-weight: 800;
}

.card-grid,
.compact-grid,
.category-grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--gray-900);
}

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

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

.cover-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
  transition: opacity 0.25s ease;
}

.movie-card:hover .cover-shade {
  opacity: 1;
}

.play-hover {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--teal-600);
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.year-pill,
.rank-badge {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
}

.year-pill {
  left: 12px;
  padding: 0 10px;
  background: var(--amber-500);
}

.rank-badge {
  right: 12px;
  min-width: 34px;
  padding: 0 9px;
  background: rgba(0, 0, 0, 0.72);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  min-height: 54px;
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.5;
}

.movie-info h3 a {
  transition: color 0.2s ease;
}

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

.movie-info p {
  min-height: 45px;
  margin: 0 0 13px;
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.65;
}

.meta-row {
  justify-content: space-between;
  color: var(--gray-500);
  font-size: 12px;
}

.page-hero {
  margin-bottom: 32px;
  padding: 40px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--white), var(--teal-50));
}

.small-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(30px, 5vw, 46px);
}

.rank-hero {
  background: linear-gradient(135deg, #fff7ed, var(--white));
}

.filter-panel {
  margin-bottom: 28px;
  padding: 22px;
  display: grid;
  gap: 18px;
}

.filter-chip {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  color: var(--gray-700);
  background: var(--white);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
  color: var(--white);
  border-color: var(--teal-600);
  background: var(--teal-600);
}

.inline-search {
  display: grid;
  grid-template-columns: auto minmax(220px, 420px);
  gap: 12px;
  align-items: center;
  color: var(--gray-600);
  font-weight: 700;
}

.wide-search {
  max-width: 760px;
}

.hidden-card {
  display: none;
}

.category-card {
  overflow: hidden;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--gray-900);
}

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

.category-content {
  padding: 22px;
}

.category-content h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.breadcrumb {
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--gray-500);
  font-size: 14px;
}

.detail-shell {
  padding-top: 28px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
  gap: 30px;
  align-items: start;
}

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

.player-shell video,
.player-cover,
.player-cover img,
.player-gradient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-shell video {
  object-fit: cover;
  background: #000000;
}

.player-cover {
  z-index: 2;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: transparent;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  object-fit: cover;
}

.player-gradient {
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.75));
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  font-size: 34px;
  background: var(--teal-600);
  box-shadow: 0 20px 50px rgba(13, 148, 136, 0.4);
  transform: translate(-50%, -50%);
}

.player-shell.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-card,
.info-panel,
.side-links {
  padding: 26px;
}

.detail-card {
  margin-top: 24px;
}

.detail-card h1 {
  margin-bottom: 18px;
  font-size: clamp(28px, 4vw, 42px);
}

.detail-tags-line {
  margin-bottom: 28px;
}

.detail-tags-line span {
  padding: 7px 12px;
  color: var(--teal-800);
  background: var(--teal-100);
}

.detail-card section {
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid var(--gray-200);
}

.detail-card h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

.detail-card p {
  color: var(--gray-700);
  line-height: 1.9;
}

.lead-text {
  font-weight: 700;
}

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

.tag-cloud a {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--teal-800);
  background: var(--teal-50);
  font-weight: 700;
}

.detail-side {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 18px;
}

.info-panel {
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-600), var(--teal-900));
}

.info-panel h2 {
  color: var(--white);
  margin-bottom: 18px;
}

.info-panel dl {
  margin: 0;
  display: grid;
  gap: 16px;
}

.info-panel dt {
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.info-panel dd {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.info-panel a {
  color: var(--white);
}

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

.side-links a {
  color: var(--gray-700);
  font-weight: 800;
}

.related-section {
  margin-top: 54px;
}

.site-footer {
  margin-top: 80px;
  color: #cbd5e1;
  background: var(--gray-900);
}

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

.footer-brand {
  margin-bottom: 16px;
  color: var(--white);
  font-size: 22px;
}

.footer-grid h3 {
  margin: 0 0 16px;
  color: var(--white);
}

.footer-grid p {
  margin: 0;
  line-height: 1.8;
}

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

.footer-links a {
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--teal-100);
}

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

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

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

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

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

  .detail-side {
    position: static;
  }
}

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

  .menu-button {
    display: block;
  }

  .page-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 22px;
  }

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

  .hero-content {
    padding: 28px;
  }

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

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

@media (max-width: 560px) {
  .nav-wrap {
    min-height: 64px;
  }

  .brand {
    font-size: 19px;
  }

  .hero-carousel {
    height: 620px;
  }

  .hero-actions,
  .search-form {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .ghost-button,
  .search-form button {
    width: 100%;
  }

  .card-grid,
  .compact-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .filter-panel,
  .detail-card,
  .info-panel,
  .side-links {
    padding: 22px;
  }

  .inline-search {
    grid-template-columns: 1fr;
  }

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