:root {
  --green-950: #052e16;
  --green-900: #064e3b;
  --green-800: #065f46;
  --green-700: #047857;
  --green-600: #059669;
  --green-500: #10b981;
  --green-300: #6ee7b7;
  --green-100: #d1fae5;
  --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: 0 20px 60px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 12px 35px rgba(15, 23, 42, 0.10);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(135deg, var(--green-900), var(--green-800));
  color: var(--white);
  box-shadow: 0 12px 35px rgba(6, 78, 59, 0.25);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green-300), var(--green-500));
  color: var(--green-950);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-text strong {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.brand-text em {
  font-size: 12px;
  color: var(--green-100);
  font-style: normal;
}

.desktop-nav {
  display: flex;
  gap: 18px;
  margin-left: auto;
}

.desktop-nav a {
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--green-100);
  transition: 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

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

.header-search input,
.mobile-search input {
  width: 220px;
  border: 1px solid rgba(209, 250, 229, 0.35);
  background: rgba(6, 78, 59, 0.78);
  color: var(--white);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(209, 250, 229, 0.8);
}

.header-search button,
.mobile-search button,
.intro-search button,
.search-page-form button {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  background: var(--green-500);
  color: var(--green-950);
  font-weight: 800;
  cursor: pointer;
  transition: 0.25s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.intro-search button:hover,
.search-page-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.25);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 16px;
  border-top: 1px solid rgba(209, 250, 229, 0.2);
  background: var(--green-900);
}

.mobile-nav.is-open {
  display: block;
}

.mobile-nav nav,
.mobile-cats {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.mobile-nav a {
  color: var(--green-100);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--gray-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.92), rgba(3, 7, 18, 0.62), rgba(3, 7, 18, 0.25)),
    linear-gradient(0deg, rgba(3, 7, 18, 0.92), rgba(3, 7, 18, 0.08) 46%, rgba(3, 7, 18, 0.65));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 340px;
  gap: 56px;
  align-items: center;
  color: var(--white);
}

.hero-kicker,
.detail-kicker,
.section-head span,
.sub-hero span {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--green-300);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.hero h1 {
  margin: 18px 0 16px;
  max-width: 780px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.hero-actions,
.text-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 800;
  transition: 0.25s ease;
}

.btn.primary {
  background: var(--green-500);
  color: var(--green-950);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.28);
}

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

.btn.ghost-light {
  color: var(--green-900);
  border: 1px solid var(--green-100);
  background: var(--white);
}

.btn.text {
  color: var(--green-300);
}

.btn.small {
  padding: 9px 14px;
  border-radius: 12px;
  color: var(--green-900);
  background: var(--green-100);
}

.btn.full {
  width: 100%;
}

.btn:hover,
.category-tile:hover,
.movie-card:hover {
  transform: translateY(-4px);
}

.hero-poster {
  display: block;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

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

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

.hero-dot {
  width: 42px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--green-300);
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: center;
  gap: 24px;
  margin-top: -52px;
  position: relative;
  z-index: 8;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow);
}

.intro-panel h2,
.section-head h2,
.sub-hero h1,
.detail-heading h1 {
  margin: 0;
  letter-spacing: -0.03em;
}

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

.intro-search,
.search-page-form {
  display: flex;
  gap: 10px;
}

.intro-search input,
.search-page-form input,
.page-filter-box input,
.search-toolbar input,
.search-toolbar select {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 13px 14px;
  background: var(--white);
  outline: none;
}

.intro-search input:focus,
.search-page-form input:focus,
.page-filter-box input:focus,
.search-toolbar input:focus,
.search-toolbar select:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.section-block {
  margin-top: 44px;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

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

.section-head h2,
.category-overview-head h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.section-head a,
.category-overview-head a {
  color: var(--green-700);
  font-weight: 800;
}

.compact-head {
  align-items: center;
}

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

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

.five-cols {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: 0.25s ease;
}

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--gray-900);
}

.movie-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(5, 46, 22, 0.82);
  color: var(--green-100);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  color: var(--gray-950);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-title:hover {
  color: var(--green-700);
}

.movie-meta {
  margin: 8px 0;
  color: var(--gray-500);
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--gray-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.compact-card .movie-card-body {
  padding: 13px;
}

.compact-card .movie-card-title {
  min-height: 44px;
  font-size: 15px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--green-100);
  color: var(--green-900);
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span,
.detail-tags span {
  background: rgba(209, 250, 229, 0.13);
  color: var(--green-100);
  border: 1px solid rgba(209, 250, 229, 0.18);
}

.split-section {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 58px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 10px;
  border-radius: 16px;
  background: var(--gray-50);
  transition: 0.25s ease;
}

.rank-item:hover {
  background: var(--green-100);
}

.rank-number {
  color: var(--green-700);
  font-size: 18px;
  font-weight: 900;
}

.rank-item img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-text {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rank-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.category-tile {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--gray-950);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.15);
  transition: 0.25s ease;
}

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

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

.category-tile span,
.category-tile em {
  position: absolute;
  z-index: 2;
  left: 16px;
  right: 16px;
}

.category-tile span {
  bottom: 46px;
  font-size: 18px;
  font-weight: 900;
}

.category-tile em {
  bottom: 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-style: normal;
}

.sub-hero {
  padding: 78px 0 64px;
  color: var(--white);
  background:
    radial-gradient(circle at 15% 10%, rgba(16, 185, 129, 0.35), transparent 30%),
    linear-gradient(135deg, var(--green-950), var(--gray-950));
}

.sub-hero h1 {
  margin-top: 14px;
  font-size: clamp(34px, 5vw, 58px);
}

.sub-hero p {
  max-width: 790px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.sub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.sub-links a,
.side-link-list a {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--green-100);
}

.category-overview-list {
  display: grid;
  gap: 24px;
  margin-top: 42px;
}

.category-overview-card {
  padding: 26px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.toolbar-section {
  margin-top: 32px;
}

.page-filter-box,
.search-toolbar label {
  display: grid;
  gap: 8px;
  color: var(--gray-600);
  font-weight: 800;
}

.search-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

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

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

.ranking-side {
  align-self: start;
}

.side-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.side-link-list a {
  background: var(--green-100);
  color: var(--green-900);
  font-weight: 800;
}

.detail-top {
  padding: 34px 0 12px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--gray-500);
  font-size: 14px;
}

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

.breadcrumb em {
  overflow: hidden;
  max-width: 520px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
}

.detail-heading {
  margin-top: 20px;
  padding: 28px;
  border-radius: var(--radius-xl);
  color: var(--white);
  background:
    radial-gradient(circle at 88% 5%, rgba(16, 185, 129, 0.28), transparent 28%),
    linear-gradient(135deg, var(--gray-950), var(--green-950));
  box-shadow: var(--shadow);
}

.detail-heading h1 {
  margin-top: 14px;
  font-size: clamp(30px, 4vw, 50px);
}

.detail-heading p {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.78);
}

.player-section {
  margin-top: 22px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--gray-950);
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 16px;
  border: 0;
  color: var(--white);
  cursor: pointer;
  background: rgba(3, 7, 18, 0.36);
  transition: 0.25s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.45);
}

.player-cover .play-icon,
.player-cover strong {
  position: relative;
  z-index: 2;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green-500);
  color: var(--green-950);
  font-size: 32px;
  box-shadow: 0 18px 35px rgba(16, 185, 129, 0.35);
}

.player-cover strong {
  max-width: 80%;
  font-size: clamp(22px, 3vw, 38px);
  text-align: center;
}

.player-card.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  margin-top: 34px;
}

.detail-poster-card,
.detail-article {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.detail-poster-card {
  overflow: hidden;
  padding: 16px;
  align-self: start;
}

.detail-poster-card img {
  width: 100%;
  border-radius: 20px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  margin-bottom: 16px;
}

.detail-article {
  padding: 30px;
}

.detail-article h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.detail-article p {
  margin: 0 0 24px;
  color: var(--gray-700);
}

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

.movie-info-list div {
  padding: 14px;
  border-radius: 16px;
  background: var(--gray-50);
}

.movie-info-list dt {
  color: var(--gray-500);
  font-size: 13px;
}

.movie-info-list dd {
  margin: 4px 0 0;
  color: var(--gray-950);
  font-weight: 900;
}

.text-page {
  color: var(--gray-700);
  font-size: 18px;
}

.site-footer {
  margin-top: 60px;
  padding-top: 46px;
  color: var(--gray-300);
  background: var(--gray-950);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 32px;
}

.footer-grid p {
  color: var(--gray-500);
}

.footer-grid h3 {
  margin: 0 0 12px;
  color: var(--white);
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: var(--gray-400);
}

.footer-grid a:hover {
  color: var(--green-300);
}

.footer-brand {
  color: var(--white);
  font-size: 22px;
}

.footer-bottom {
  margin-top: 34px;
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--gray-500);
  text-align: center;
}

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

.empty-result {
  grid-column: 1 / -1;
  padding: 32px;
  border-radius: 20px;
  background: var(--gray-50);
  color: var(--gray-600);
  text-align: center;
}

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

  .hero-content,
  .intro-panel,
  .split-section,
  .ranking-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .header-inner {
    min-height: 68px;
  }

  .brand-text em {
    display: none;
  }

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

  .hero-content {
    gap: 20px;
  }

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

  .intro-panel {
    margin-top: 18px;
  }

  .intro-search,
  .search-page-form,
  .hero-actions,
  .text-link-row {
    flex-direction: column;
  }

  .section-block,
  .category-overview-card,
  .detail-heading,
  .detail-article {
    padding: 20px;
  }

  .four-cols,
  .five-cols,
  .six-cols,
  .category-grid,
  .large-rank,
  .search-toolbar,
  .movie-info-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .movie-grid {
    gap: 14px;
  }

  .rank-item {
    grid-template-columns: 38px 52px minmax(0, 1fr);
  }

  .sub-hero {
    padding: 56px 0 46px;
  }

  .footer-grid {
    gap: 18px;
  }
}
