:root {
  color-scheme: light;
  --page-bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #ecfdf5;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #dbeafe;
  --primary: #059669;
  --primary-dark: #047857;
  --teal: #0d9488;
  --cyan: #0891b2;
  --gold: #f59e0b;
  --danger: #e11d48;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

button,
a,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #059669, #0d9488);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(4, 120, 87, 0.24);
}

.site-header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}

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

.site-logo-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
}

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

.nav-link,
.mobile-nav a,
.footer-links a {
  color: inherit;
  text-decoration: none;
  font-weight: 650;
}

.nav-link {
  padding: 10px 0;
  opacity: 0.9;
  transition: opacity 0.2s ease, color 0.2s ease;
}

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

.header-search {
  position: relative;
  width: 280px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-nav input,
.highlight-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  outline: none;
}

.header-search input {
  width: 100%;
  padding: 10px 84px 10px 16px;
}

.header-search button,
.mobile-nav button,
.highlight-search button,
.filter-panel button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  background: #ecfdf5;
  color: var(--primary-dark);
  font-weight: 800;
}

.header-search button {
  position: absolute;
  right: 4px;
  padding: 7px 14px;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 26px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}

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

.mobile-nav form {
  display: flex;
  gap: 10px;
}

.mobile-nav input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
}

.mobile-nav button {
  padding: 10px 16px;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #022c22;
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 44, 34, 0.94), rgba(4, 120, 87, 0.72) 45%, rgba(8, 145, 178, 0.3)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
  padding: 84px 0 96px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #a7f3d0;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.eyebrow.dark {
  background: rgba(5, 150, 105, 0.12);
  color: var(--primary-dark);
}

.hero-content h1 {
  max-width: 820px;
  margin: 22px 0 12px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 850;
}

.hero-content p {
  max-width: 690px;
  margin: 0 0 22px;
  color: #ecfeff;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.hero-tags span,
.detail-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 700;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  padding: 8px 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn-primary,
.btn-ghost,
.section-link,
.side-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  padding: 12px 24px;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(8, 145, 178, 0.28);
}

.btn-primary:hover,
.btn-ghost:hover,
.section-link:hover,
.side-link:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(16px);
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.32);
  color: #ffffff;
  font-size: 32px;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

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

.section-block {
  padding: 62px 0;
}

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

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

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.section-link,
.side-link {
  padding: 10px 18px;
  background: #d1fae5;
  color: var(--primary-dark);
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.movie-poster-wrap {
  position: relative;
  height: 310px;
  overflow: hidden;
  background: #064e3b;
}

.movie-card-compact .movie-poster-wrap {
  height: 250px;
}

.movie-poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 58%);
}

.poster-year,
.poster-type,
.rank-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  backdrop-filter: blur(10px);
}

.poster-year {
  top: 12px;
  right: 12px;
  background: rgba(5, 150, 105, 0.86);
}

.poster-type {
  left: 12px;
  bottom: 12px;
  background: rgba(15, 23, 42, 0.62);
}

.rank-badge {
  top: 12px;
  left: 12px;
  background: linear-gradient(90deg, #f59e0b, #e11d48);
}

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

.movie-card-body h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.28;
  font-weight: 850;
}

.movie-meta,
.movie-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.movie-meta {
  font-size: 13px;
  font-weight: 700;
}

.movie-desc {
  display: -webkit-box;
  margin-top: 8px;
  min-height: 48px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
}

.tag-list {
  margin-top: 14px;
}

.tag-list span,
.detail-tags span {
  padding: 5px 9px;
  background: #ecfdf5;
  color: var(--primary-dark);
  font-size: 12px;
}

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

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

.category-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 130px;
  background: #064e3b;
}

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

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

.category-card-body span {
  color: var(--primary);
  font-weight: 850;
  font-size: 13px;
}

.category-card-body h3 {
  margin: 8px 0;
  font-size: 24px;
  font-weight: 900;
}

.category-card-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.highlight-band,
.page-hero {
  background:
    radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.18), transparent 28%),
    linear-gradient(135deg, #ecfdf5, #eff6ff 50%, #ffffff);
}

.highlight-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 54px 0;
}

.highlight-inner h2,
.page-hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.highlight-inner p,
.page-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.highlight-search {
  display: flex;
  width: min(440px, 100%);
  padding: 8px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.1);
}

.highlight-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 12px 16px;
}

.highlight-search button {
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 850;
  cursor: pointer;
}

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

.large-rank-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.compact-hero {
  padding: 74px 0;
}

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid rgba(5, 150, 105, 0.12);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.filter-search {
  flex: 1;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 12px 16px;
}

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

.filter-selects select {
  width: 160px;
}

.empty-state {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  color: var(--muted);
  text-align: center;
  font-weight: 750;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #022c22;
}

.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px) saturate(1.05);
  transform: scale(1.04);
}

.detail-hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 44, 34, 0.94), rgba(15, 23, 42, 0.78)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.2));
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  padding: 52px 0 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #d1fae5;
  font-size: 14px;
  font-weight: 700;
}

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

.detail-info-card {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
  margin-top: 54px;
}

.detail-cover {
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

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

.detail-text {
  color: #ffffff;
}

.detail-text h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 20px;
  color: #ecfeff;
  font-size: 19px;
  line-height: 1.75;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 260px));
  gap: 12px;
  margin: 26px 0;
}

.detail-meta-grid span {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.detail-meta-grid strong {
  display: block;
  margin-bottom: 4px;
  color: #a7f3d0;
  font-size: 12px;
}

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

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

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

.player-poster {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000000;
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.play-button {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #ffffff;
  font-size: 38px;
  box-shadow: 0 22px 48px rgba(8, 145, 178, 0.35);
  cursor: pointer;
}

.detail-article,
.detail-side {
  margin-top: 24px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.detail-article {
  padding: 28px;
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 26px;
  font-weight: 900;
}

.detail-article p {
  margin: 0 0 22px;
  color: #334155;
  line-height: 1.9;
  font-size: 16px;
}

.detail-side {
  padding: 24px;
  position: sticky;
  top: 92px;
}

.detail-side dl {
  margin: 0;
}

.detail-side dt {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-side dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-weight: 750;
  line-height: 1.55;
}

.side-link {
  width: 100%;
  margin-top: 22px;
}

.site-footer {
  margin-top: 40px;
  padding: 38px 0;
  background: #0f172a;
  color: #cbd5e1;
}

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

.footer-logo {
  color: #ffffff;
  font-size: 20px;
}

.site-footer p {
  max-width: 680px;
  margin: 10px 0 0;
  line-height: 1.7;
}

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

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

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

  .movie-grid,
  .featured-grid,
  .search-grid,
  .category-movie-grid,
  .rank-list,
  .large-rank-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .detail-side {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: block;
  }

  .hero-carousel,
  .hero-content {
    min-height: 580px;
  }

  .hero-control {
    display: none;
  }

  .hero-content h1 {
    font-size: 38px;
  }

  .highlight-inner,
  .section-heading,
  .footer-grid,
  .filter-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-selects {
    flex-direction: column;
  }

  .filter-selects select {
    width: 100%;
  }

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

  .detail-cover {
    width: min(260px, 70vw);
  }

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

  .movie-grid,
  .featured-grid,
  .search-grid,
  .category-movie-grid,
  .rank-list,
  .large-rank-list,
  .category-grid,
  .full-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .movie-poster-wrap,
  .movie-card-compact .movie-poster-wrap {
    height: 220px;
  }
}

@media (max-width: 560px) {
  .site-header-inner {
    height: 62px;
  }

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

  .site-logo-icon {
    width: 32px;
    height: 32px;
  }

  .hero-carousel,
  .hero-content {
    min-height: 540px;
  }

  .hero-content {
    padding-top: 64px;
  }

  .hero-actions {
    width: 100%;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
  }

  .movie-grid,
  .featured-grid,
  .search-grid,
  .category-movie-grid,
  .rank-list,
  .large-rank-list,
  .category-grid,
  .full-category-grid {
    grid-template-columns: 1fr;
  }

  .movie-poster-wrap,
  .movie-card-compact .movie-poster-wrap {
    height: 360px;
  }

  .highlight-search {
    border-radius: var(--radius-lg);
    flex-direction: column;
  }

  .highlight-search button {
    min-height: 44px;
  }
}
