:root {
  color-scheme: light;
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --teal-900: #134e4a;
  --cyan-900: #164e63;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --black: #000000;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 12px 28px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 22px 55px rgba(15, 23, 42, 0.18);
  --radius-lg: 14px;
  --radius-xl: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--gray-50);
  color: var(--gray-900);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gray-900);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal-600), #0891b2);
  color: var(--white);
  font-size: 15px;
  box-shadow: var(--shadow-sm);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--gray-600);
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  background: var(--teal-50);
  color: var(--teal-700);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  color: var(--gray-900);
  font-size: 22px;
}

.hero {
  position: relative;
  height: min(600px, 84vh);
  min-height: 500px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--teal-900), var(--cyan-900));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  transform: scale(1.04);
}

.hero-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(19, 78, 74, 0.72), rgba(8, 47, 73, 0.42));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 100%;
}

.hero-copy {
  max-width: 690px;
  color: var(--white);
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.9);
  color: var(--white);
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 800;
}

.section-kicker {
  margin-bottom: 10px;
  background: var(--teal-100);
  color: var(--teal-700);
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 6vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(18px, 2.2vw, 23px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 30px;
}

.hero-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.78);
  color: var(--white);
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 700;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  padding: 0 22px;
  background: var(--teal-600);
  color: var(--white);
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--teal-700);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.hero-controls button {
  width: 42px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-controls button.is-active {
  width: 68px;
  background: var(--white);
}

.section {
  padding: 68px 0;
}

.section-white {
  background: var(--white);
}

.section-soft {
  background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
}

.section-tint {
  background: linear-gradient(135deg, var(--teal-50), #ecfeff);
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-heading p {
  max-width: 480px;
  margin: 0;
  color: var(--gray-600);
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-frame {
  position: relative;
  height: 250px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-200), var(--gray-100));
}

.movie-card-small .poster-frame {
  height: 190px;
}

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

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

.poster-frame::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(0, 0, 0, 0);
  transition: background 0.32s ease;
}

.movie-card:hover .poster-frame::after {
  background: rgba(0, 0, 0, 0.34);
}

.poster-type,
.poster-year {
  position: absolute;
  z-index: 3;
  top: 12px;
  border-radius: 8px;
  padding: 4px 8px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.poster-type {
  left: 12px;
  background: rgba(0, 0, 0, 0.72);
}

.poster-year {
  right: 12px;
  background: rgba(13, 148, 136, 0.88);
}

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

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

.movie-card-body {
  padding: 18px;
}

.movie-card-body h3 {
  display: -webkit-box;
  min-height: 50px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 17px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

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

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

.movie-meta-line,
.movie-category-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--gray-500);
  font-size: 13px;
}

.movie-category-line {
  justify-content: flex-start;
  margin-top: 8px;
  color: var(--teal-700);
  font-weight: 700;
}

.search-panel {
  margin-top: -46px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 8;
}

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

.search-row input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  background: var(--white);
  color: var(--gray-900);
  font-size: 16px;
  outline: 0;
  padding: 0 18px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

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

.category-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.category-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 126px;
  overflow: hidden;
  background: var(--gray-100);
}

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

.category-body {
  padding: 22px;
}

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

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

.category-link {
  color: var(--teal-700);
  font-weight: 800;
}

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

.rank-item {
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.rank-item a {
  display: grid;
  grid-template-columns: 58px 82px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
}

.rank-number {
  color: var(--teal-700);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 82px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--gray-100);
}

.rank-info {
  display: grid;
  gap: 2px;
}

.rank-info strong {
  color: var(--gray-900);
  font-size: 17px;
}

.rank-info em {
  color: var(--gray-500);
  font-style: normal;
  font-size: 13px;
}

.rank-genre {
  color: var(--gray-500);
  font-size: 14px;
  white-space: nowrap;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0;
  color: var(--gray-500);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: 28px;
  align-items: start;
  padding-bottom: 70px;
}

.player-panel,
.detail-side,
.content-panel {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.player-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--gray-100);
}

.player-header h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-tags span {
  border-radius: 999px;
  background: var(--teal-50);
  color: var(--teal-700);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
}

.player-frame {
  position: relative;
  background: var(--black);
}

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--black);
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58));
  color: var(--white);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-overlay span {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 999px;
  background: var(--teal-600);
  color: var(--white);
  font-size: 30px;
  box-shadow: var(--shadow-xl);
}

.content-panel {
  padding: 26px;
  margin-top: 22px;
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

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

.detail-side img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  background: var(--gray-100);
}

.side-body {
  padding: 22px;
}

.side-body dl {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px 14px;
  margin: 0;
}

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

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

.related-section {
  padding: 0 0 74px;
}

.site-footer {
  background: var(--gray-900);
  color: rgba(255, 255, 255, 0.78);
  padding: 46px 0;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-brand {
  color: var(--white);
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 620px;
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 14px;
  white-space: nowrap;
}

.footer-links a {
  color: var(--white);
  font-weight: 700;
}

[hidden] {
  display: none !important;
}

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

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

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

  .detail-side img {
    height: 360px;
  }
}

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

  .nav-shell {
    min-height: 64px;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: 18px;
    background: var(--white);
    box-shadow: var(--shadow-xl);
  }

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

  .hero {
    min-height: 560px;
  }

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

  .section {
    padding: 48px 0;
  }

  .section-heading {
    display: block;
  }

  .section-heading p {
    margin-top: 12px;
  }

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

  .poster-frame {
    height: 210px;
  }

  .movie-card-small .poster-frame {
    height: 180px;
  }

  .movie-card-body {
    padding: 14px;
  }

  .movie-card-body h3 {
    min-height: 46px;
    font-size: 15px;
  }

  .movie-card-body p {
    min-height: 42px;
    font-size: 13px;
  }

  .search-panel {
    margin-top: -26px;
    padding: 16px;
  }

  .search-row {
    display: block;
  }

  .search-row .btn {
    width: 100%;
    margin-top: 12px;
  }

  .rank-item a {
    grid-template-columns: 42px 64px 1fr;
    gap: 10px;
    padding: 10px;
  }

  .rank-item img {
    width: 64px;
    height: 48px;
  }

  .rank-genre {
    display: none;
  }

  .footer-grid {
    display: block;
  }

  .footer-links {
    margin-top: 22px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .poster-frame,
  .movie-card-small .poster-frame {
    height: 260px;
  }
}
