:root {
  --bg: #f8fafc;
  --panel: rgba(255, 255, 255, 0.86);
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --green: #16a34a;
  --green-dark: #15803d;
  --red: #dc2626;
  --orange: #f97316;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(22, 163, 74, 0.14), transparent 34rem),
    linear-gradient(135deg, #f9fafb 0%, #ecfdf5 48%, #fff7ed 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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;
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid rgba(229, 231, 235, 0.82);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 14px 26px rgba(249, 115, 22, 0.28);
}

.brand-text {
  display: grid;
  line-height: 1.2;
}

.brand-text strong,
.footer-brand {
  font-size: 21px;
  letter-spacing: 0.02em;
  font-weight: 900;
  background: linear-gradient(90deg, var(--red), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  color: #374151;
  font-weight: 700;
  padding: 10px 13px;
  border-radius: 999px;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--green-dark);
  background: rgba(22, 163, 74, 0.1);
}

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

.nav-search input,
.mobile-search input,
.large-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid #d1d5db;
  border-radius: 999px;
  color: #111827;
  background: #fff;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.nav-search input {
  width: 230px;
  padding: 10px 15px;
}

.nav-search input:focus,
.mobile-search input:focus,
.large-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.nav-search button,
.mobile-search button,
.large-search button,
.primary-btn,
.ghost-btn,
.section-more {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.nav-search button,
.mobile-search button,
.large-search button,
.primary-btn {
  color: #fff;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  box-shadow: 0 10px 22px rgba(22, 163, 74, 0.22);
}

.primary-btn:hover,
.nav-search button:hover,
.large-search button:hover,
.mobile-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 26px rgba(22, 163, 74, 0.28);
}

.primary-btn.slim {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
}

.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  color: var(--green-dark);
  padding: 10px 18px;
  background: rgba(22, 163, 74, 0.12);
}

.ghost-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
  background: rgba(22, 163, 74, 0.18);
}

.menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: #f3f4f6;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  display: block;
  margin: 3px 0;
  background: #111827;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
}

.mobile-panel.is-open {
  display: grid;
  gap: 10px;
}

main {
  min-height: 70vh;
}

.hero-carousel {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 30px auto 0;
  padding: 18px;
  border-radius: 34px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.94), rgba(22, 101, 52, 0.86)),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.32), transparent 34rem);
  box-shadow: var(--shadow);
}

.hero-glow {
  position: absolute;
  inset: -120px -80px auto auto;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.28);
  filter: blur(20px);
  pointer-events: none;
}

.hero-stage {
  position: relative;
  min-height: 550px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 42px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(24px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.hero-media {
  position: relative;
  height: 480px;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.36);
  transform: rotate(-1deg);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.58));
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  position: relative;
  color: #fff;
  padding-right: 20px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  color: #bbf7d0;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy h2 {
  margin: 18px 0 10px;
  font-size: clamp(24px, 3vw, 38px);
}

.hero-copy p,
.page-hero p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
}

.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag-row span {
  color: #166534;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 999px;
  background: #dcfce7;
}

.hero-copy .tag-row span,
.detail-copy .tag-row span {
  color: #dcfce7;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-dots {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.hero-dot {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  color: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  text-align: left;
}

.hero-dot.is-active {
  color: #fff;
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.22);
}

.hero-dot img {
  width: 44px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-dot span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.content-section,
.page-shell,
.detail-page {
  width: min(1240px, calc(100% - 32px));
  margin: 34px auto;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(22, 163, 74, 0.32);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.1;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #166534);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.poster-year,
.poster-score {
  position: absolute;
  top: 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
}

.poster-year {
  left: 12px;
}

.poster-score {
  right: 12px;
  background: rgba(22, 163, 74, 0.86);
}

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

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #111827;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #4b5563;
  font-size: 13px;
}

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

.category-tile {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 24px;
  background: #111827;
  color: #fff;
  box-shadow: var(--soft-shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-tile:hover img {
  opacity: 0.48;
  transform: scale(1.06);
}

.category-tile span,
.category-tile small {
  position: relative;
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile small {
  color: rgba(255, 255, 255, 0.78);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 44px 66px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--soft-shadow);
  transition: transform 0.18s ease, background 0.18s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  background: #fff;
}

.rank-num,
.big-rank {
  color: var(--orange);
  font-weight: 950;
}

.rank-row img {
  width: 66px;
  height: 88px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.rank-info strong,
.ranking-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info small,
.ranking-copy small,
.ranking-copy em {
  color: var(--muted);
  font-style: normal;
}

.rank-row em {
  color: var(--green-dark);
  font-weight: 900;
  font-style: normal;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 54px;
  color: #fff;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(22, 101, 52, 0.88)),
    radial-gradient(circle at top right, rgba(249, 115, 22, 0.28), transparent 28rem);
  box-shadow: var(--shadow);
}

.small-hero {
  min-height: 280px;
}

.channel-featured {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.channel-featured a {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
}

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

.channel-featured span {
  display: block;
  padding: 8px;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-panel {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0;
  padding: 18px;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--soft-shadow);
}

.filter-panel input,
.filter-panel select {
  min-width: 190px;
  padding: 11px 15px;
}

.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.category-overview-card {
  padding: 22px;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--soft-shadow);
}

.category-card-head h2 {
  margin: 0;
  font-size: 26px;
}

.category-card-head p {
  color: var(--muted);
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 18px;
}

.category-preview a {
  overflow: hidden;
  border-radius: 16px;
  background: #f3f4f6;
}

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

.category-preview span {
  display: block;
  padding: 8px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 70px 90px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--soft-shadow);
}

.ranking-card:hover {
  transform: translateY(-3px);
}

.ranking-card img {
  width: 90px;
  height: 120px;
  object-fit: cover;
  border-radius: 16px;
}

.ranking-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ranking-copy strong {
  font-size: 20px;
}

.ranking-card b {
  color: var(--green-dark);
  font-size: 24px;
}

.large-search {
  max-width: 680px;
  margin-top: 26px;
}

.large-search input {
  width: 100%;
  padding: 14px 18px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 28px 0 18px;
  color: var(--muted);
  font-weight: 700;
}

.breadcrumb a:hover {
  color: var(--green-dark);
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 24px;
  align-items: stretch;
}

.player-card,
.detail-copy,
.detail-section {
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
  background: #020617;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 360px;
  background: #020617;
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #020617;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  color: #fff;
  border: 0;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.68));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green), var(--orange));
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.38);
}

.play-circle i {
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid #fff;
}

.play-layer strong {
  font-size: 20px;
}

.detail-copy {
  padding: 28px;
  color: #111827;
}

.detail-copy .eyebrow {
  color: var(--green-dark);
}

.detail-copy h1 {
  font-size: clamp(32px, 4vw, 52px);
}

.detail-one-line {
  color: #4b5563;
  font-size: 17px;
}

.detail-meta {
  display: grid;
  gap: 8px;
  margin: 20px 0;
  color: #374151;
  font-weight: 700;
}

.detail-meta a {
  color: var(--green-dark);
}

.detail-section {
  margin-top: 24px;
  padding: 28px;
}

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

.detail-section p {
  margin: 0;
  color: #374151;
  font-size: 16px;
}

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

.site-footer {
  margin-top: 60px;
  padding: 38px 0 24px;
  background: rgba(17, 24, 39, 0.96);
  color: #d1d5db;
}

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

.footer-inner p {
  max-width: 520px;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  color: #fff;
  background: rgba(22, 163, 74, 0.35);
}

.footer-copy {
  width: min(1240px, calc(100% - 32px));
  margin: 24px auto 0;
  color: #9ca3af;
  font-size: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 18px;
}

[data-filter-card].is-hidden {
  display: none;
}

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

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

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

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

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

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

  .hero-stage {
    min-height: 760px;
  }

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

  .hero-media {
    height: 390px;
  }

  .hero-copy {
    padding: 0;
  }

  .hero-dots {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .content-section,
  .page-shell,
  .detail-page,
  .hero-carousel {
    width: min(100% - 20px, 1240px);
  }

  .brand-text small {
    display: none;
  }

  .hero-carousel {
    padding: 12px;
    border-radius: 24px;
  }

  .hero-stage {
    min-height: 700px;
  }

  .hero-media {
    height: 340px;
    border-radius: 22px;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .hero-copy p,
  .page-hero p {
    font-size: 15px;
  }

  .hero-actions,
  .section-heading,
  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-dots,
  .movie-grid,
  .full-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid,
  .rank-list,
  .channel-featured,
  .category-preview {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 32px 22px;
    border-radius: 24px;
  }

  .ranking-card,
  .rank-row {
    grid-template-columns: 44px 72px 1fr;
  }

  .ranking-card b,
  .rank-row em {
    display: none;
  }

  .video-frame {
    min-height: 240px;
  }

  .detail-copy,
  .detail-section {
    padding: 20px;
    border-radius: 22px;
  }
}
