: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;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 22px 50px rgba(15, 23, 42, 0.18);
  --radius-lg: 18px;
  --radius-xl: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-800);
  background: linear-gradient(180deg, var(--gray-50), #ffffff 460px);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

.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 12px 24px rgba(19, 78, 74, 0.18);
}

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

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

.site-logo {
  font-size: 22px;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 700;
}

.nav-link {
  position: relative;
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ccfbf1;
  opacity: 1;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 3px;
  border-radius: 999px;
  background: #ccfbf1;
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  font-size: 22px;
  padding: 8px 12px;
  cursor: pointer;
}

.page-main {
  padding: 32px 0 64px;
}

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

.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-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide.active .hero-image {
  animation: heroZoom 8s ease forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.09);
  }
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 7, 18, 0.86), rgba(3, 7, 18, 0.56), rgba(3, 7, 18, 0.12));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 42px;
}

.hero-copy {
  width: min(620px, 100%);
  color: var(--white);
}

.hero-badges,
.detail-badges,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-badges span,
.detail-badges span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.hero-badges .accent,
.detail-badges .accent {
  background: var(--amber-500);
}

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

.hero-copy h2 {
  font-size: clamp(30px, 4vw, 48px);
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: 18px;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 16px;
  font-weight: 800;
  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) scale(1.02);
}

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

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

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

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

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

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

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

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

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

.section-head p {
  margin: 8px 0 0;
  color: var(--gray-600);
}

.section-more {
  flex: 0 0 auto;
  color: var(--teal-700);
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.card-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--teal-800), var(--gray-900));
}

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

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

.card-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.68), rgba(3, 7, 18, 0.05));
  transition: opacity 0.25s ease;
}

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

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

.rank-badge {
  left: auto;
  right: 12px;
  background: var(--red-600);
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  color: var(--white);
  background: var(--teal-600);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: var(--gray-800);
  font-size: 18px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

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

.card-body p {
  min-height: 46px;
  margin: 0 0 14px;
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.55;
}

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

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

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

.compact .card-body p {
  display: none;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 160px 160px 160px;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 0 16px;
  background: var(--gray-100);
}

.search-box span {
  color: var(--teal-700);
  font-size: 22px;
  font-weight: 900;
}

.search-box input,
.filter-panel select {
  width: 100%;
  height: 46px;
  border: 0;
  outline: 0;
  color: var(--gray-800);
  background: transparent;
  font: inherit;
}

.filter-panel select {
  border-radius: 999px;
  padding: 0 14px;
  background: var(--gray-100);
  cursor: pointer;
}

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

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

.category-card {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: var(--white);
  background: var(--gray-900);
  box-shadow: var(--shadow-md);
}

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

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

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.86), rgba(3, 7, 18, 0.18));
}

.category-content {
  position: absolute;
  inset: auto 0 0;
  padding: 20px;
}

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

.category-content p {
  margin: 0 0 12px;
  color: #e5e7eb;
  font-size: 14px;
}

.category-content span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--teal-600);
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--gray-600);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 42px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--gray-950);
  box-shadow: var(--shadow-xl);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--gray-950);
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.72), rgba(3, 7, 18, 0.2));
  cursor: pointer;
}

.player-overlay span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: var(--teal-600);
  box-shadow: 0 16px 32px rgba(13, 148, 136, 0.35);
  font-size: 32px;
}

.player-overlay strong {
  font-size: 20px;
}

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

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: var(--radius-xl);
  padding: 28px;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-700), var(--gray-900));
  box-shadow: var(--shadow-md);
}

.detail-info h1 {
  margin: 18px 0 12px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.14;
}

.detail-info p {
  margin: 0 0 18px;
  color: #e5e7eb;
}

.tag-list span {
  color: var(--gray-800);
  background: var(--gray-100);
}

.content-panel {
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 28px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.content-panel h2 {
  margin: 0 0 14px;
  color: var(--gray-800);
  font-size: 26px;
}

.content-panel p {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.rank-number {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  color: var(--white);
  background: linear-gradient(135deg, var(--red-600), var(--amber-500));
  font-size: 24px;
  font-weight: 900;
  box-shadow: var(--shadow-md);
}

.page-hero {
  border-radius: var(--radius-xl);
  padding: clamp(28px, 5vw, 54px);
  margin-bottom: 34px;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-800), var(--gray-900));
  box-shadow: var(--shadow-xl);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.18;
}

.page-hero p {
  width: min(820px, 100%);
  margin: 0;
  color: #e5e7eb;
  font-size: 18px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 28px;
  padding: 44px 0;
}

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

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

.footer-grid p {
  margin: 14px 0 0;
  color: #d1d5db;
}

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

.footer-links a {
  color: #d1d5db;
}

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

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

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

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

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

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-radius: 0 0 18px 18px;
    padding: 12px;
    background: linear-gradient(180deg, var(--teal-800), var(--teal-900));
    box-shadow: var(--shadow-xl);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    padding: 12px;
    border-radius: 12px;
  }

  .nav-link.active::after {
    display: none;
  }

  .nav-link:hover,
  .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
  }

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

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

  .hero-shade {
    background: linear-gradient(0deg, rgba(3, 7, 18, 0.9), rgba(3, 7, 18, 0.3));
  }

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

  .cards-grid,
  .cards-grid.six,
  .rank-list,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .page-main {
    padding-top: 20px;
  }

  .site-logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 30px;
    height: 30px;
  }

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

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

  .btn {
    width: 100%;
  }

  .cards-grid,
  .cards-grid.six,
  .category-grid,
  .rank-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .rank-number {
    font-size: 18px;
  }

  .content-panel,
  .detail-info {
    padding: 22px;
  }
}
