:root {
  --green-950: #052e1d;
  --green-900: #064e3b;
  --green-800: #065f46;
  --green-700: #047857;
  --green-600: #059669;
  --green-500: #10b981;
  --green-100: #d1fae5;
  --green-50: #ecfdf5;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --shadow-soft: 0 20px 55px rgba(15, 23, 42, 0.14);
  --shadow-card: 0 14px 30px rgba(15, 23, 42, 0.10);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--slate-900);
  background: linear-gradient(180deg, #f8fafc 0%, #edfdf5 42%, #f8fafc 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, rgba(6, 78, 59, 0.96), rgba(5, 150, 105, 0.96));
  box-shadow: 0 10px 25px rgba(6, 78, 59, 0.22);
  backdrop-filter: blur(16px);
}

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

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: var(--green-900);
  background: linear-gradient(135deg, #d9ffe9, #ffffff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.52), 0 8px 18px rgba(0, 0, 0, 0.16);
}

.brand-text {
  font-size: 1.18rem;
  white-space: nowrap;
}

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

.nav-link,
.mobile-link {
  border-radius: 999px;
  padding: 9px 14px;
  color: rgba(255, 255, 255, 0.86);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

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

.header-search input,
.mobile-search input,
.inline-search input,
.filter-input {
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 11px 16px;
  color: var(--slate-900);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.header-search input {
  width: 220px;
}

.header-search button,
.mobile-search button,
.inline-search button,
.play-primary,
.hero-button,
.section-action,
.load-more-button {
  border: 0;
  border-radius: 999px;
  color: var(--green-950);
  background: var(--white);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(6, 78, 59, 0.16);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button {
  padding: 10px 16px;
}

.header-search button:hover,
.mobile-search button:hover,
.hero-button:hover,
.play-primary:hover,
.section-action:hover,
.load-more-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(6, 78, 59, 0.24);
}

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

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

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-panel.open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(circle at 80% 16%, rgba(16, 185, 129, 0.38), transparent 36%), linear-gradient(135deg, var(--green-950), var(--green-800));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(6, 78, 59, 0.58), rgba(2, 6, 23, 0.36));
  pointer-events: none;
}

.hero-slider {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 78vh;
  margin: 0 auto;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
  align-items: center;
  gap: 54px;
  padding: 58px 0 76px;
  opacity: 0;
  transform: translateX(26px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: translateX(0);
  z-index: 2;
}

.hero-backdrop {
  position: absolute;
  inset: 0 calc(50% - 50vw);
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  filter: saturate(1.18) blur(1px);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.hero-kicker,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--green-100);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(2.45rem, 6vw, 5.6rem);
  line-height: 1.03;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1.02rem, 1.7vw, 1.32rem);
}

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

.hero-tags span,
.tag-row span,
.meta-pill,
.detail-tag {
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--green-950);
  background: rgba(209, 250, 229, 0.94);
  font-size: 0.82rem;
  font-weight: 750;
}

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

.hero-button {
  padding: 13px 22px;
}

.hero-button.secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.hero-poster-card {
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.32);
  transform: rotate(2deg);
}

.hero-poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, var(--green-900), var(--green-500));
}

.hero-poster-caption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  border-radius: 22px;
  padding: 18px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(14px);
}

.hero-poster-caption strong {
  display: block;
  font-size: 1.1rem;
}

.hero-poster-caption span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.92rem;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 0;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

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

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

.section {
  padding: 70px 0;
}

.section.alt {
  background: rgba(255, 255, 255, 0.62);
}

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

.section-heading h2 {
  margin: 0 0 8px;
  color: var(--slate-900);
  font-size: clamp(1.8rem, 3vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

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

.section-action,
.load-more-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  color: var(--white);
  background: var(--green-700);
}

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

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

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

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--green-900), var(--green-500));
}

.poster-frame img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

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

.poster-frame img.image-error,
.hero-poster-card img.image-error,
.ranking-item img.image-error,
.detail-poster img.image-error {
  opacity: 0;
}

.quality-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--green-950);
  background: rgba(236, 253, 245, 0.92);
  font-size: 0.78rem;
  font-weight: 800;
}

.quality-badge {
  right: 12px;
}

.rank-badge {
  left: 12px;
}

.card-content {
  padding: 16px;
}

.card-meta,
.detail-meta,
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--slate-500);
  font-size: 0.88rem;
}

.card-content h2 {
  margin: 8px 0 8px;
  color: var(--slate-950);
  font-size: 1.08rem;
  line-height: 1.35;
}

.card-content p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--slate-600);
  font-size: 0.92rem;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 28px;
  color: var(--white);
  background: linear-gradient(135deg, var(--green-800), var(--green-500));
  box-shadow: var(--shadow-card);
  min-height: 250px;
}

.category-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.category-card h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: 1.7rem;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.84);
}

.category-card a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--green-950);
  background: var(--white);
  font-weight: 800;
}

.page-hero {
  color: var(--white);
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.42), transparent 32%), linear-gradient(135deg, var(--green-950), var(--green-700));
  padding: 64px 0;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.1rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  border-radius: var(--radius-md);
  padding: 18px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--slate-700);
  background: var(--slate-100);
  cursor: pointer;
  font-weight: 750;
}

.filter-chip.active,
.filter-chip:hover {
  color: var(--white);
  background: var(--green-700);
}

.inline-search {
  display: flex;
  gap: 10px;
  flex: 1 1 320px;
  justify-content: flex-end;
}

.inline-search input {
  width: min(420px, 100%);
  background: var(--slate-50);
}

.inline-search button {
  padding: 10px 16px;
  color: var(--white);
  background: var(--green-700);
}

.ranking-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.ranking-panel {
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.ranking-panel h2 {
  margin: 0 0 18px;
  font-size: 1.5rem;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 42px 60px 1fr auto;
  align-items: center;
  gap: 12px;
  border-radius: 18px;
  padding: 10px;
  background: var(--slate-50);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-item:hover {
  background: var(--green-50);
  transform: translateX(3px);
}

.ranking-item img {
  width: 60px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--green-900), var(--green-500));
}

.ranking-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--white);
  background: var(--green-700);
  font-weight: 900;
}

.ranking-text strong,
.ranking-text em {
  display: block;
}

.ranking-text em {
  color: var(--slate-500);
  font-size: 0.88rem;
  font-style: normal;
}

.score-pill {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--green-950);
  background: var(--green-100);
  font-weight: 900;
}

.detail-hero {
  padding: 54px 0 34px;
  color: var(--white);
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.35), transparent 35%), linear-gradient(135deg, var(--slate-950), var(--green-900));
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  background: linear-gradient(135deg, var(--green-900), var(--green-500));
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.32);
}

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

.breadcrumbs {
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.68);
}

.breadcrumbs a:hover {
  color: var(--white);
}

.detail-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4.8vw, 4.4rem);
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.detail-lead {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.1rem;
}

.detail-meta {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.76);
}

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

.watch-section {
  padding: 42px 0 70px;
}

.watch-box {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--slate-950);
  box-shadow: var(--shadow-soft);
}

.video-frame {
  position: relative;
  background: #000;
}

.video-frame video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.46), rgba(6, 78, 59, 0.26));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  color: var(--green-950);
  background: rgba(255, 255, 255, 0.95);
  font-size: 2.2rem;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.watch-info {
  padding: 24px;
  color: var(--white);
}

.watch-info h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.watch-info p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.article-panel,
.side-panel {
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.article-panel h2,
.side-panel h2 {
  margin: 0 0 16px;
  color: var(--slate-950);
  font-size: 1.55rem;
}

.article-panel p {
  margin: 0 0 18px;
  color: var(--slate-700);
  font-size: 1.02rem;
}

.related-mini {
  display: grid;
  gap: 14px;
}

.related-mini a {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 10px;
  background: var(--slate-50);
}

.related-mini img {
  width: 72px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--green-900), var(--green-500));
}

.related-mini strong,
.related-mini span {
  display: block;
}

.related-mini span {
  color: var(--slate-500);
  font-size: 0.88rem;
}

.empty-state {
  display: none;
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  color: var(--slate-600);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.empty-state.show {
  display: block;
}

.site-footer {
  color: rgba(255, 255, 255, 0.78);
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 50px 0 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

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

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 1rem;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--green-100);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0 30px;
  color: rgba(255, 255, 255, 0.55);
}

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

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

@media (max-width: 1024px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    align-content: center;
  }

  .hero-poster {
    max-width: 420px;
  }

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

  .category-grid,
  .ranking-layout,
  .content-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .header-inner {
    min-height: 64px;
  }

  .brand-text {
    font-size: 1rem;
  }

  .hero,
  .hero-slider {
    min-height: 720px;
  }

  .hero-slide {
    padding: 36px 0 82px;
  }

  .hero h1 {
    font-size: 2.45rem;
  }

  .hero-dots {
    bottom: 24px;
  }

  .section {
    padding: 48px 0;
  }

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

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

  .card-content {
    padding: 13px;
  }

  .card-content p {
    min-height: 0;
  }

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

  .detail-poster {
    max-width: 260px;
  }

  .toolbar,
  .inline-search,
  .ranking-item {
    align-items: stretch;
  }

  .inline-search {
    justify-content: stretch;
  }

  .inline-search input {
    width: 100%;
  }

  .ranking-item {
    grid-template-columns: 34px 54px 1fr;
  }

  .score-pill {
    grid-column: 2 / 4;
    justify-self: start;
  }
}

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

  .hero-actions,
  .mobile-search,
  .inline-search {
    flex-direction: column;
  }

  .mobile-search button,
  .inline-search button {
    width: 100%;
  }
}
