:root {
  --bg: #f9fafb;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --teal: #14b8a6;
  --teal-dark: #0f766e;
  --teal-soft: #f0fdfa;
  --amber: #f59e0b;
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--teal), #0ea5e9);
  box-shadow: 0 10px 28px rgba(20, 184, 166, 0.28);
}

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

.nav-link,
.dropdown-button {
  border: 0;
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 12px;
  background: transparent;
  color: #374151;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.dropdown-button:hover {
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  padding: 10px;
  display: grid;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-xl);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a,
.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
}

.dropdown-panel a:hover,
.mobile-panel a:hover {
  color: var(--teal-dark);
  background: var(--teal-soft);
}

.menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  display: block;
  margin: 3px 0;
  background: #111827;
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.mobile-panel.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.hero-slider {
  position: relative;
  height: 60vh;
  min-height: 520px;
  overflow: hidden;
  background: #000000;
}

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

.hero-slide.active {
  opacity: 1;
}

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

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 16px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--teal);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  max-width: 760px;
  margin: 0 0 20px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p,
.detail-copy p {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(18px, 2vw, 22px);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.hero-tags span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  backdrop-filter: blur(12px);
}

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

.primary-button,
.glass-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.primary-button {
  color: #111827;
  background: #ffffff;
}

.primary-button:hover {
  color: #ffffff;
  background: var(--teal);
}

.glass-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
}

.glass-button:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 34px;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.3);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.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.active {
  width: 32px;
  background: #ffffff;
}

.featured-wrap {
  position: relative;
  z-index: 4;
  width: min(1280px, calc(100% - 32px));
  margin: -80px auto 64px;
}

.featured-card {
  position: relative;
  min-height: 340px;
  display: block;
  overflow: hidden;
  border-radius: 30px;
  background: #111827;
  box-shadow: var(--shadow-xl);
}

.featured-card img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.featured-card:hover img {
  transform: scale(1.05);
}

.featured-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.32), transparent);
}

.featured-copy {
  position: absolute;
  left: 44px;
  right: 44px;
  bottom: 40px;
  z-index: 2;
  max-width: 720px;
  color: #ffffff;
}

.featured-copy span {
  display: inline-flex;
  padding: 6px 12px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--teal);
  font-weight: 700;
}

.featured-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
}

.featured-copy p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.content-section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.content-section.no-padding {
  padding: 0;
}

.content-band {
  padding: 72px 0;
  background: #ffffff;
}

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

.section-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  color: var(--teal-dark);
  border-radius: 12px;
  background: var(--teal-soft);
  font-weight: 900;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.movie-grid {
  display: grid;
  gap: 24px;
}

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

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

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

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

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

.poster-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #e5e7eb, #f9fafb);
}

.poster-frame.landscape {
  aspect-ratio: 16 / 9;
}

.poster-frame.wide {
  width: 190px;
  height: 130px;
  aspect-ratio: auto;
  flex: 0 0 auto;
}

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

.movie-card:hover .poster-frame img,
.rank-row:hover img,
.category-tile:hover img {
  transform: scale(1.08);
}

.type-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.play-symbol {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  opacity: 0;
  color: #111827;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%) scale(0.84);
  transition: all 0.25s ease;
}

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

.card-body {
  padding: 16px;
}

.card-body h3 {
  min-height: 48px;
  margin: 0 0 8px;
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--teal-dark);
}

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

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

.card-meta span:last-child {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--teal-dark);
  background: var(--teal-soft);
  font-weight: 700;
}

.horizontal-list {
  display: grid;
  gap: 16px;
}

.movie-card.horizontal {
  display: flex;
  align-items: stretch;
}

.horizontal-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.text-link {
  display: inline-flex;
  margin-top: 22px;
  color: var(--teal-dark);
  font-weight: 800;
}

.search-box {
  margin-bottom: 28px;
}

.search-box input {
  width: 100%;
  height: 56px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  outline: 0;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  box-shadow: var(--shadow);
}

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

.page-hero,
.detail-hero {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #0f766e);
}

.page-hero.compact {
  display: flex;
  align-items: center;
  padding: 86px 0;
}

.page-hero.compact > div {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

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

.category-tile {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 24px;
  background: #111827;
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
  transition: transform 0.5s ease;
}

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

.category-tile div {
  position: relative;
  z-index: 1;
  padding: 24px;
  color: #ffffff;
}

.category-tile span {
  display: inline-flex;
  padding: 5px 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

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

.category-tile p {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.85);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 150px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.rank-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), #0ea5e9);
  font-size: 18px;
  font-weight: 900;
}

.rank-row img {
  width: 150px;
  height: 88px;
  object-fit: cover;
  border-radius: 14px;
  background: #e5e7eb;
  transition: transform 0.4s ease;
}

.rank-row h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-row p {
  margin: 0 0 8px;
  color: var(--muted);
}

.rank-row div span {
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
}

.detail-hero {
  min-height: 520px;
}

.detail-hero > img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.detail-copy {
  position: absolute;
  left: 50%;
  bottom: 70px;
  width: min(1280px, calc(100% - 32px));
  transform: translateX(-50%);
}

.breadcrumb {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

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

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

.player-card,
.side-panel,
.article-section {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 24px 24px 0 0;
  background: #000000;
}

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

.player-poster {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.22);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-poster span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  color: #111827;
  background: rgba(255, 255, 255, 0.94);
  font-size: 28px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

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

.player-info {
  padding: 24px;
}

.player-info h2,
.side-panel h2,
.article-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.player-info p,
.article-section p {
  margin: 0;
  color: var(--muted);
}

.side-panel {
  padding: 24px;
}

.side-panel dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px 16px;
  margin: 0;
}

.side-panel dt {
  color: var(--muted);
}

.side-panel dd {
  margin: 0;
  font-weight: 700;
}

.article-section {
  padding: 32px;
}

.article-section h2:not(:first-child) {
  margin-top: 28px;
}

.soft-end {
  padding-bottom: 90px;
}

.site-footer {
  padding: 50px 0;
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-logo {
  color: #ffffff;
}

.footer-inner p {
  max-width: 600px;
  margin: 0;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-links a:hover {
  color: #ffffff;
}

@media (max-width: 1180px) {
  .movie-grid.six-cols,
  .movie-grid.catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

  .menu-toggle {
    display: grid;
  }

  .hero-slider {
    height: 72vh;
    min-height: 560px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 42px;
  }

  .hero-control {
    display: none;
  }

  .featured-wrap {
    margin-top: -46px;
  }

  .movie-grid.three-cols,
  .movie-grid.four-cols,
  .movie-grid.six-cols,
  .movie-grid.catalog-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .rank-row {
    grid-template-columns: 44px 120px 1fr;
  }

  .rank-row img {
    width: 120px;
    height: 76px;
  }
}

@media (max-width: 640px) {
  .nav-shell,
  .mobile-panel,
  .hero-content,
  .content-section,
  .featured-wrap,
  .page-hero.compact > div,
  .detail-copy,
  .footer-inner {
    width: min(100% - 24px, 1280px);
  }

  .hero-slider {
    min-height: 620px;
  }

  .hero-actions {
    width: 100%;
  }

  .primary-button,
  .glass-button {
    width: 100%;
  }

  .featured-copy {
    left: 22px;
    right: 22px;
    bottom: 24px;
  }

  .movie-grid.three-cols,
  .movie-grid.four-cols,
  .movie-grid.six-cols,
  .movie-grid.catalog-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .movie-card.horizontal {
    display: block;
  }

  .poster-frame.wide {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

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

  .rank-row img {
    display: none;
  }

  .detail-hero,
  .detail-hero > img {
    min-height: 620px;
  }

  .side-panel dl {
    grid-template-columns: 1fr;
  }
}
