:root {
  --bg: #f6fafb;
  --surface: #ffffff;
  --surface-2: #eefdfa;
  --text: #102027;
  --muted: #5b6b72;
  --primary: #059669;
  --primary-dark: #065f46;
  --secondary: #0891b2;
  --border: rgba(15, 118, 110, 0.14);
  --shadow: 0 20px 48px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, #065f46, #0f766e 48%, #155e75);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #065f46;
  background: #ecfdf5;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 22px;
  letter-spacing: 0.5px;
}

.brand-text small {
  margin-top: 4px;
  color: #bbf7d0;
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  border-radius: 999px;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: #fff;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

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

.hero-track,
.hero-slide {
  min-height: 650px;
}

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

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

.hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  filter: saturate(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 44, 34, 0.94) 0%, rgba(6, 95, 70, 0.72) 42%, rgba(8, 145, 178, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.12));
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: center;
  min-height: 650px;
  gap: 56px;
  padding: 88px 0 110px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #34d399;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-intro h1 {
  margin: 0 0 20px;
  line-height: 1.08;
  font-size: clamp(38px, 6vw, 72px);
  letter-spacing: -0.05em;
}

.hero-desc,
.page-hero p,
.detail-one-line {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #047857;
  background: #d1fae5;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span,
.detail-tags span {
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #064e3b;
  background: #fff;
  box-shadow: 0 16px 34px rgba(255, 255, 255, 0.18);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
  z-index: 4;
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  font-size: 26px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 28px;
  background: #fff;
}

.hero-stats {
  position: absolute;
  left: 50%;
  bottom: 94px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(720px, calc(100% - 32px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.hero-stats a {
  padding: 16px 22px;
  text-align: center;
}

.hero-stats strong {
  display: block;
  font-size: 24px;
}

.hero-stats span {
  color: #ccfbf1;
  font-size: 13px;
}

.search-band {
  margin-top: -26px;
  position: relative;
  z-index: 9;
}

.search-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-panel h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.search-box {
  display: flex;
  width: min(520px, 100%);
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8fffe;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 16px;
  font-size: 16px;
  background: transparent;
}

.search-box button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  font-weight: 800;
}

.slim-search {
  margin-top: -18px;
}

.section {
  padding: 78px 0;
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}

.section-title a,
.text-link {
  color: var(--primary);
  font-weight: 800;
}

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

.category-card,
.channel-card,
.story-card,
.side-card,
.player-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.category-card {
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-icon,
.channel-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  font-size: 24px;
  font-weight: 900;
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.category-card p,
.channel-card p,
.movie-card p,
.rank-info p,
.story-card p,
.side-card dd {
  color: var(--muted);
}

.category-mini-links,
.channel-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-mini-links a,
.channel-links a {
  padding: 5px 9px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 12px;
  font-weight: 700;
}

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

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

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

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #d1fae5, #cffafe);
}

.poster img,
.rank-cover img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.58));
  opacity: 0.75;
}

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

.movie-meta {
  color: #059669;
  font-size: 12px;
  font-weight: 800;
}

.movie-card h2 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.movie-card p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  margin: 0;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
}

.ranking-preview {
  color: #fff;
  background: linear-gradient(135deg, #064e3b, #0f766e 55%, #164e63);
}

.light-title .eyebrow,
.light-title a {
  color: #bbf7d0;
}

.light-title h2 {
  color: #fff;
}

.page-hero {
  color: #fff;
  background: radial-gradient(circle at 20% 10%, rgba(52, 211, 153, 0.45), transparent 28%), linear-gradient(135deg, #064e3b, #155e75);
}

.compact-hero {
  padding: 86px 0 110px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.breadcrumb a {
  color: #bbf7d0;
  font-weight: 800;
}

.channel-card {
  padding: 28px;
}

.channel-head {
  display: flex;
  gap: 18px;
}

.channel-head span {
  flex: 0 0 48px;
  margin-bottom: 0;
}

.channel-head h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 96px minmax(0, 1fr) 70px;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  font-size: 20px;
  font-weight: 900;
}

.rank-cover {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
}

.rank-info h2 {
  margin: 0 0 4px;
  font-size: 24px;
}

.rank-info p {
  margin: 4px 0 0;
}

.score-pill {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: #fff;
  background: #f97316;
  font-size: 20px;
  font-weight: 900;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background-image: var(--detail-bg);
  background-size: cover;
  background-position: center;
}

.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 44, 34, 0.95), rgba(6, 78, 59, 0.74), rgba(2, 6, 23, 0.44)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.1));
  backdrop-filter: blur(4px);
}

.detail-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: center;
  gap: 42px;
  min-height: 560px;
  padding: 72px 0 82px;
}

.detail-hero-inner .breadcrumb {
  grid-column: 1 / -1;
  margin-bottom: -6px;
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
}

.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-facts span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 800;
}

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

.detail-main > h2 {
  margin: 0 0 16px;
  font-size: 32px;
}

.player-card {
  padding: 14px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  background: #020617;
}

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(5, 150, 105, 0.42), rgba(2, 6, 23, 0.78));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: #064e3b;
  background: #fff;
  font-size: 34px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.play-cover strong {
  font-size: 22px;
}

.story-card,
.side-card {
  margin-top: 22px;
  padding: 26px;
}

.story-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.story-card p {
  margin: 0;
  font-size: 17px;
}

.side-card {
  position: sticky;
  top: 98px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}

.side-card dt {
  color: #059669;
  font-weight: 900;
}

.side-card dd {
  margin: 0;
}

.related-section {
  padding-top: 0;
}

.no-results {
  display: none;
  margin-top: 24px;
  padding: 24px;
  border-radius: 18px;
  color: var(--muted);
  background: #fff;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.no-results.is-visible {
  display: block;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  padding: 58px 0;
}

.footer-brand {
  color: #fff;
  margin-bottom: 16px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.footer-grid p {
  max-width: 460px;
  color: #9ca3af;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a:hover {
  color: #34d399;
}

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid #1f2937;
  color: #9ca3af;
  text-align: center;
  font-size: 14px;
}

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

  .nav-toggle {
    display: block;
  }

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

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

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

@media (max-width: 820px) {
  .hero-content {
    grid-template-columns: 1fr;
    min-height: 720px;
    padding-top: 58px;
  }

  .hero-poster {
    display: none;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    bottom: 88px;
  }

  .search-panel,
  .section-title,
  .rank-row,
  .detail-layout,
  .detail-hero-inner,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .search-panel,
  .section-title {
    align-items: stretch;
  }

  .search-panel {
    flex-direction: column;
  }

  .detail-hero-inner .breadcrumb {
    grid-column: auto;
  }

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

  .side-card {
    position: static;
  }
}

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

  .brand-text strong {
    font-size: 19px;
  }

  .brand-text small {
    display: none;
  }

  .hero-carousel,
  .hero-track,
  .hero-slide {
    min-height: 610px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-intro h1 {
    font-size: 38px;
  }

  .hero-desc,
  .page-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .hero-stats {
    display: none;
  }

  .hero-controls {
    bottom: 24px;
  }

  .section {
    padding: 52px 0;
  }

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

  .movie-card h2 {
    font-size: 16px;
  }

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

  .tag-row span {
    font-size: 11px;
  }

  .rank-row {
    grid-template-columns: 44px 78px 1fr;
  }

  .score-pill {
    grid-column: 3;
    justify-self: start;
    width: auto;
    height: auto;
    padding: 6px 12px;
    font-size: 14px;
  }

  .detail-hero-inner {
    padding: 42px 0 62px;
  }

  .video-shell {
    border-radius: 14px;
  }

  .story-card,
  .side-card,
  .player-card,
  .channel-card,
  .category-card {
    border-radius: 18px;
  }
}
