* {
  box-sizing: border-box;
}

:root {
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --cyan-500: #06b6d4;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 30px rgb(15 23 42 / 0.14);
  --shadow-xl: 0 20px 45px rgb(15 23 42 / 0.18);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgb(255 255 255 / 0.94);
  border-bottom: 1px solid rgb(229 231 235 / 0.85);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 24px;
  font-weight: 800;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--teal-600), var(--cyan-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  color: var(--teal-600);
  display: inline-flex;
}

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

.nav-link {
  color: var(--gray-700);
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--teal-600);
}

.header-search input,
.mobile-search input,
.wide-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  color: var(--gray-800);
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  transition: all 0.2s ease;
}

.header-search input {
  width: 230px;
}

.header-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  background: #fff;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgb(20 184 166 / 0.18);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: var(--gray-100);
  color: var(--gray-700);
  border-radius: 12px;
  padding: 8px 11px;
  font-size: 22px;
}

.mobile-panel {
  border-top: 1px solid var(--gray-100);
  padding: 14px 16px 18px;
  background: #fff;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-link {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--gray-700);
}

.mobile-link:hover,
.mobile-link.active {
  background: var(--gray-50);
  color: var(--teal-600);
}

.hero-carousel {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  background: #07111f;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 42%, rgb(20 184 166 / 0.24), transparent 28%),
    linear-gradient(90deg, rgb(8 13 27 / 0.94) 0%, rgb(8 13 27 / 0.78) 45%, rgb(8 13 27 / 0.32) 100%),
    linear-gradient(0deg, #07111f 0%, transparent 42%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  align-items: center;
  gap: 48px;
  padding-top: 36px;
  padding-bottom: 120px;
}

.hero-copy {
  max-width: 720px;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--teal-100);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--teal-700);
}

.hero-copy h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(24px, 3vw, 38px);
  color: var(--teal-50);
}

.hero-copy p {
  max-width: 650px;
  margin: 0 0 20px;
  color: rgb(240 253 250 / 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.detail-tags span {
  background: rgb(20 184 166 / 0.2);
}

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

.primary-btn,
.ghost-btn,
.small-btn,
.wide-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  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-btn,
.wide-search button,
.small-btn {
  color: #fff;
  background: var(--teal-600);
  box-shadow: 0 12px 24px rgb(13 148 136 / 0.28);
}

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

.ghost-btn {
  color: #fff;
  background: rgb(255 255 255 / 0.16);
  backdrop-filter: blur(12px);
}

.ghost-btn:hover {
  background: rgb(255 255 255 / 0.27);
}

.hero-poster {
  justify-self: end;
  position: relative;
  width: min(360px, 100%);
  aspect-ratio: 3 / 4.1;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.45);
}

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

.hero-poster:hover img {
  transform: scale(1.05);
}

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--teal-600);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.4);
  font-size: 28px;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 152px;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 8px;
}

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

.hero-dot.active {
  width: 34px;
  background: #fff;
}

.hero-thumbs {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  z-index: 5;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border-radius: 18px;
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  backdrop-filter: blur(14px);
  border: 1px solid rgb(255 255 255 / 0.16);
}

.hero-thumb.active {
  background: rgb(255 255 255 / 0.24);
}

.hero-thumb img {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-thumb span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
}

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

.intro-panel {
  display: grid;
  grid-template-columns: 1fr 430px;
  gap: 32px;
  align-items: center;
  padding: 30px;
  margin-top: -42px;
  position: relative;
  z-index: 10;
  background: #fff;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
}

.intro-panel h2,
.section-title h2,
.page-hero h1,
.story-card h2,
.player-card h2,
.side-card h2 {
  margin: 0;
  color: var(--gray-900);
}

.intro-panel p,
.section-lead,
.page-hero p,
.story-card p {
  color: var(--gray-600);
  line-height: 1.8;
}

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

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

.section-title h2 {
  font-size: 28px;
}

.section-more {
  color: var(--teal-600);
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--gray-200);
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.64), transparent 62%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.card-category,
.card-year {
  position: absolute;
  top: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.card-category {
  left: 10px;
  background: var(--teal-600);
}

.card-year {
  right: 10px;
  background: rgb(0 0 0 / 0.65);
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%) scale(0.82);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #fff;
  background: var(--teal-600);
  opacity: 0;
  transition: all 0.24s ease;
}

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

.card-body {
  padding: 15px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-body h3 a:hover,
.rank-info h2 a:hover {
  color: var(--teal-600);
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-600);
  font-size: 13px;
}

.card-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--gray-100);
}

.tag-row {
  margin-top: 10px;
}

.tag-row span {
  background: var(--gray-100);
  color: var(--gray-500);
}

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

.category-tile,
.category-card {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile {
  min-height: 145px;
  padding: 22px;
  background:
    radial-gradient(circle at right top, rgb(20 184 166 / 0.16), transparent 36%),
    #fff;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.category-tile strong {
  display: block;
  margin-bottom: 10px;
  color: var(--gray-900);
  font-size: 20px;
}

.category-tile span,
.category-card p {
  color: var(--gray-600);
  line-height: 1.65;
}

.page-hero {
  padding: 70px 0 60px;
}

.soft-hero {
  background:
    radial-gradient(circle at 10% 15%, rgb(20 184 166 / 0.16), transparent 28%),
    linear-gradient(135deg, #fff, var(--teal-50));
  border-bottom: 1px solid var(--gray-100);
}

.page-hero h1 {
  font-size: clamp(34px, 4vw, 52px);
  letter-spacing: -0.03em;
}

.page-hero p {
  max-width: 760px;
  font-size: 18px;
}

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

.category-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  padding: 16px;
}

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

.category-covers img {
  height: 82px;
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.category-card h2 {
  margin: 5px 0 8px;
}

.category-card span {
  color: var(--teal-600);
  font-weight: 800;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
  margin-bottom: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 150px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--teal-600), var(--cyan-500));
  color: #fff;
  font-weight: 900;
}

.rank-cover img {
  width: 150px;
  height: 88px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--gray-600);
  line-height: 1.6;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  background: #07111f;
}

.detail-bg,
.detail-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-bg {
  object-fit: cover;
  filter: blur(4px) saturate(1.1);
  transform: scale(1.05);
}

.detail-overlay {
  background:
    linear-gradient(90deg, rgb(7 17 31 / 0.92), rgb(7 17 31 / 0.64)),
    linear-gradient(0deg, #07111f, transparent 45%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: center;
  min-height: 520px;
  padding: 48px 0;
  color: #fff;
}

.detail-poster {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.42);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4.1;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: rgb(240 253 250 / 0.74);
  font-size: 14px;
  margin-bottom: 18px;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-title-block h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.04em;
}

.detail-title-block p {
  max-width: 780px;
  color: rgb(240 253 250 / 0.86);
  font-size: 18px;
  line-height: 1.75;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  color: #fff;
  background: rgb(255 255 255 / 0.15);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  margin-top: 40px;
}

.player-card,
.story-card,
.side-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.player-card,
.story-card {
  padding: 20px;
  margin-bottom: 24px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgb(0 0 0 / 0.45), rgb(0 0 0 / 0.18));
  cursor: pointer;
}

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

.player-overlay span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--teal-600);
  box-shadow: 0 20px 42px rgb(0 0 0 / 0.36);
  font-size: 34px;
}

.player-card h2 {
  margin-top: 18px;
}

.story-card h2,
.side-card h2 {
  margin-bottom: 14px;
}

.story-card p {
  margin: 0 0 16px;
  font-size: 16px;
}

.side-card {
  position: sticky;
  top: 92px;
  padding: 20px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  margin: 0;
}

.side-card dt {
  color: var(--gray-500);
}

.side-card dd {
  margin: 0;
  color: var(--gray-800);
  font-weight: 700;
}

.site-footer {
  margin-top: 72px;
  color: var(--gray-300);
  background: linear-gradient(135deg, var(--gray-900), var(--gray-800));
}

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

.footer-brand {
  color: #fff;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.footer-main p,
.site-footer a {
  color: var(--gray-400);
  line-height: 1.8;
}

.site-footer h2 {
  color: #fff;
  font-size: 18px;
}

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

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  border-top: 1px solid rgb(255 255 255 / 0.09);
  color: var(--gray-400);
  font-size: 14px;
}

@media (max-width: 1120px) {
  .desktop-nav {
    gap: 14px;
  }

  .header-search {
    display: none;
  }

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel {
    min-height: 740px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 28px;
    padding-bottom: 155px;
  }

  .hero-poster {
    justify-self: start;
    width: 210px;
  }

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

  .hero-thumb:nth-child(n + 5) {
    display: none;
  }

  .hero-controls {
    bottom: 170px;
  }

  .intro-panel,
  .detail-layout,
  .footer-grid,
  .category-card,
  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

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

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

  .rank-item {
    grid-template-columns: 42px 110px 1fr;
  }

  .rank-item .small-btn {
    grid-column: 2 / -1;
    width: fit-content;
  }

  .rank-cover img {
    width: 110px;
    height: 72px;
  }
}

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

  .brand {
    font-size: 20px;
  }

  .hero-carousel {
    min-height: 780px;
  }

  .hero-copy p,
  .detail-title-block p {
    font-size: 16px;
  }

  .hero-actions {
    gap: 8px;
  }

  .primary-btn,
  .ghost-btn,
  .small-btn,
  .wide-search button {
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
  }

  .hero-thumbs {
    grid-template-columns: 1fr;
  }

  .hero-thumb:nth-child(n + 4) {
    display: none;
  }

  .intro-panel {
    padding: 22px;
  }

  .wide-search,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 15px;
  }

  .rank-item {
    grid-template-columns: 36px 84px 1fr;
    gap: 10px;
    padding: 10px;
  }

  .rank-num {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .rank-cover img {
    width: 84px;
    height: 58px;
  }

  .rank-info h2 {
    font-size: 16px;
  }

  .rank-info p {
    display: none;
  }

  .detail-hero-inner {
    min-height: auto;
    padding: 36px 0;
  }

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

  .player-overlay span {
    width: 64px;
    height: 64px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
