* {
  box-sizing: border-box;
}

:root {
  --teal-900: #134e4a;
  --teal-800: #115e59;
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --amber-500: #f59e0b;
  --red-600: #dc2626;
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.10);
  --shadow-xl: 0 22px 45px rgba(15, 23, 42, 0.18);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-800);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 55%, #f8fafc 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--teal-700), var(--teal-900));
  box-shadow: 0 10px 30px rgba(15, 118, 110, 0.24);
}

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

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

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-900);
  background: var(--white);
  box-shadow: inset 0 0 0 3px rgba(20, 184, 166, 0.18);
}

.logo-text {
  font-size: 20px;
}

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

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

.nav-link {
  padding: 8px 12px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
}

.menu-toggle {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

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

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

.mobile-link {
  display: block;
  padding: 12px 14px;
}

.hero-wrap {
  padding: 32px 0 8px;
}

.hero-slider {
  position: relative;
  height: 560px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--gray-900);
  box-shadow: var(--shadow-xl);
}

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 7, 18, 0.84) 0%, rgba(3, 7, 18, 0.58) 48%, rgba(3, 7, 18, 0.10) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 48px;
}

.hero-inner {
  max-width: 650px;
  color: var(--white);
}

.hero-badges,
.hero-tags,
.movie-tags,
.info-pills,
.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-badges span,
.hero-tags span,
.movie-tags span,
.info-pills span,
.category-tags span {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
}

.hero-badges span:first-child {
  background: var(--teal-600);
}

.hero-badges span:last-child {
  color: var(--white);
  background: var(--amber-500);
}

.hero-inner h1 {
  margin: 18px 0 16px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-inner p {
  max-width: 600px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.hero-tags {
  margin-bottom: 28px;
}

.hero-tags span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.primary-btn,
.secondary-btn,
.text-link,
.filter-panel button,
.player-play {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 22px;
}

.primary-btn {
  color: var(--white);
  background: var(--teal-600);
  box-shadow: 0 18px 30px rgba(13, 148, 136, 0.28);
}

.secondary-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.secondary-btn:hover,
.filter-panel button:hover,
.player-play:hover {
  transform: translateY(-2px);
}

.hero-search {
  max-width: 560px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(16px);
}

.hero-search input,
.filter-search input,
.filter-selects select {
  width: 100%;
  border: 1px solid transparent;
  outline: none;
  border-radius: 999px;
  background: var(--white);
}

.hero-search input {
  padding: 12px 16px;
}

.hero-search button {
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  color: var(--white);
  background: var(--teal-600);
  font-weight: 800;
  cursor: pointer;
}

.hero-dots {
  position: absolute;
  right: 24px;
  bottom: 22px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  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.is-active {
  width: 34px;
  background: var(--white);
}

.section-block {
  margin: 56px 0;
}

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

.section-title {
  margin: 0;
  color: var(--gray-800);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.2;
}

.section-desc {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--gray-600);
}

.text-link {
  color: var(--teal-700);
  white-space: nowrap;
}

.text-link:hover {
  color: var(--teal-900);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.movie-grid.compact .card-cover,
.search-grid .card-cover,
.category-grid .card-cover {
  aspect-ratio: 3 / 4;
}

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

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent 25%, rgba(3, 7, 18, 0.78));
  transition: opacity 0.25s ease;
}

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

.year-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--white);
  background: var(--amber-500);
  font-size: 12px;
  font-weight: 800;
}

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

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

.card-content {
  display: block;
  padding: 16px;
}

.card-content strong {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  color: var(--gray-800);
  font-size: 18px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-grid.compact .card-content strong,
.search-grid .card-content strong,
.category-grid .card-content strong {
  min-height: 44px;
  font-size: 15px;
}

.card-content em {
  display: -webkit-box;
  min-height: 42px;
  margin-top: 8px;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 14px;
  font-style: normal;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  color: var(--gray-500);
  font-size: 12px;
}

.card-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.category-tile {
  overflow: hidden;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.category-tile-images {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 150px;
  overflow: hidden;
}

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

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

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

.category-tile-body p {
  margin: 0 0 16px;
  color: var(--gray-600);
}

.category-tags span {
  color: var(--teal-700);
  background: #ecfeff;
}

.page-hero {
  margin: 32px 0 34px;
  border-radius: 28px;
  padding: 42px;
  color: var(--white);
  background: radial-gradient(circle at 12% 18%, rgba(20, 184, 166, 0.72), transparent 34%), linear-gradient(135deg, var(--teal-700), var(--teal-900));
  box-shadow: var(--shadow-xl);
}

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

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.filter-panel {
  display: grid;
  gap: 14px;
  margin: 28px 0;
  padding: 18px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.filter-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.filter-search input,
.filter-selects select {
  padding: 12px 16px;
  border-color: var(--gray-200);
}

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

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

.filter-selects select {
  width: auto;
  min-width: 150px;
}

.filter-panel button {
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--white);
  background: var(--teal-600);
}

.filter-empty {
  display: none;
  margin: 34px 0;
  padding: 28px;
  border-radius: 18px;
  color: var(--gray-600);
  text-align: center;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.filter-empty.is-visible {
  display: block;
}

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

.rank-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: start;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 92px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.rank-num {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--red-600));
  font-weight: 900;
}

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

.rank-item h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-item p {
  margin: 0;
  color: var(--gray-600);
  font-size: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 28px;
  align-items: start;
  margin: 32px 0;
}

.breadcrumb {
  margin: 28px auto 0;
  color: var(--gray-600);
  font-size: 14px;
}

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

.player-card,
.detail-card,
.info-card,
.related-section {
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.player-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--gray-950);
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: var(--gray-950);
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(3, 7, 18, 0.24);
  cursor: pointer;
}

.player-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.52);
}

.player-play {
  position: relative;
  z-index: 3;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  color: var(--white);
  background: var(--teal-600);
  box-shadow: 0 18px 40px rgba(13, 148, 136, 0.32);
  font-size: 32px;
}

.player-overlay.is-hidden {
  display: none;
}

.detail-card {
  margin-top: 22px;
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
}

.info-pills {
  margin-bottom: 22px;
}

.info-pills span {
  color: var(--teal-800);
  background: #ccfbf1;
}

.detail-card h2,
.related-section h2,
.info-card h2 {
  margin: 0 0 14px;
  color: var(--gray-800);
  font-size: 22px;
}

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

.detail-block {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--gray-200);
}

.movie-tags span {
  color: var(--teal-700);
  background: #f0fdfa;
}

.info-card {
  position: sticky;
  top: 96px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-600), var(--teal-900));
}

.info-card img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
}

.info-card-body {
  padding: 24px;
}

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

.info-card dt {
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
}

.info-card dd {
  margin: 2px 0 0;
  font-weight: 800;
}

.related-section {
  margin: 34px 0 56px;
  padding: 26px;
}

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

.small-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 10px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.small-card:hover {
  background: #ecfeff;
  transform: translateY(-2px);
}

.small-card img {
  width: 96px;
  height: 70px;
  border-radius: 12px;
  object-fit: cover;
}

.small-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--gray-800);
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.small-card em {
  display: block;
  margin-top: 6px;
  color: var(--gray-500);
  font-size: 13px;
  font-style: normal;
}

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

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

.footer-logo {
  color: var(--white);
  font-size: 20px;
}

.site-footer p {
  max-width: 420px;
  color: #9ca3af;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

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

.site-footer a:hover {
  color: var(--teal-500);
}

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

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

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

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

  .info-card {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

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

  .hero-content {
    padding: 28px;
    align-items: flex-end;
  }

  .hero-search,
  .filter-search {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .hero-search button {
    padding: 12px 18px;
  }

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

  .category-overview-grid,
  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .search-grid,
  .small-card-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .rank-item {
    grid-template-columns: 44px 72px 1fr;
  }

  .rank-item .primary-btn {
    grid-column: 1 / -1;
  }
}

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

  .logo-text {
    font-size: 17px;
  }

  .hero-slider {
    height: 560px;
  }

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

  .page-hero {
    padding: 28px;
    border-radius: 22px;
  }

  .category-overview-grid,
  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .search-grid,
  .small-card-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-tile-images {
    height: 120px;
  }

  .rank-item {
    grid-template-columns: 44px 76px 1fr;
    gap: 10px;
  }

  .rank-item img {
    width: 76px;
    height: 58px;
  }
}
