:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.82);
  --line: rgba(148, 163, 184, 0.2);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --emerald: #10b981;
  --emerald-dark: #047857;
  --amber: #f59e0b;
  --rose: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.22), transparent 34rem),
    radial-gradient(circle at 80% 12%, rgba(245, 158, 11, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, rgba(5, 150, 105, 0.95), rgba(15, 23, 42, 0.92));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

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

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #064e3b;
  font-weight: 900;
  background: linear-gradient(135deg, #fef3c7, #34d399);
  box-shadow: 0 16px 36px rgba(16, 185, 129, 0.35);
}

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

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

.brand-text small {
  color: #d1fae5;
  font-size: 12px;
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  white-space: nowrap;
  padding: 25px 0 21px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  border-color: #ffffff;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.header-search input,
.local-filter input {
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  font: inherit;
}

.header-search input::placeholder,
.local-filter input::placeholder {
  color: rgba(226, 232, 240, 0.72);
}

.header-search button {
  border: 0;
  color: #064e3b;
  background: #d1fae5;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 20px;
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.mobile-panel a {
  display: block;
  padding: 12px 10px;
  color: #e2e8f0;
  border-radius: 10px;
}

.mobile-panel a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hero-carousel {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 48px;
  width: 100%;
  padding: 90px max(28px, calc((100vw - 1240px) / 2)) 110px;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.9s ease;
}

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: saturate(1.18) blur(1px);
}

.hero-shade,
.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), #020617 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 15px;
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.24);
  border: 1px solid rgba(52, 211, 153, 0.34);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-content h1 {
  margin: 0 0 20px;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

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

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

.hero-tags span,
.tag-list span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 12px;
}

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

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  color: #052e2b;
  background: linear-gradient(135deg, #6ee7b7, #fef3c7);
  box-shadow: 0 18px 42px rgba(16, 185, 129, 0.34);
}

.ghost-btn,
.section-more {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.movie-card:hover,
.channel-tile:hover,
.rank-item:hover {
  transform: translateY(-3px);
}

.hero-poster {
  position: relative;
  z-index: 2;
  align-self: center;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(15, 23, 42, 0.9));
}

.hero-poster img,
.poster-frame img,
.rank-cover img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.2s ease;
}

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 800;
}

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

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

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

.quick-entry,
.content-section,
.detail-content,
.player-section {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-entry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  transform: translateY(-42px);
  position: relative;
  z-index: 8;
}

.quick-entry a {
  padding: 24px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

.quick-entry strong,
.quick-entry span {
  display: block;
}

.quick-entry strong {
  font-size: 20px;
  margin-bottom: 8px;
}

.quick-entry span {
  color: var(--subtle);
}

.content-section {
  padding: 44px 0;
}

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

.section-title-row h2,
.page-hero h1,
.detail-copy h1,
.story-card h2,
.info-card h2 {
  margin: 0;
  line-height: 1.1;
}

.section-title-row h2 {
  font-size: clamp(26px, 4vw, 42px);
}

.section-title-row p {
  margin: 10px 0 0;
  color: var(--subtle);
  line-height: 1.7;
}

.center-title {
  justify-content: center;
  text-align: center;
}

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

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

.movie-card {
  min-width: 0;
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(15, 23, 42, 0.95);
}

.card-link,
.card-body {
  display: block;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.25), transparent 50%),
    linear-gradient(135deg, #0f172a, #111827);
}

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

.year-badge,
.play-chip {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.year-badge {
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.play-chip {
  right: 10px;
  bottom: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #d1fae5;
}

.card-body {
  padding: 16px;
}

.card-body strong {
  display: block;
  min-height: 44px;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.35;
}

.card-meta,
.card-desc {
  display: block;
  color: var(--subtle);
  font-size: 13px;
  line-height: 1.55;
}

.card-desc {
  height: 42px;
  margin: 8px 0 12px;
  overflow: hidden;
}

.tag-list span {
  font-size: 11px;
  padding: 5px 8px;
}

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

.compact .card-desc {
  display: none;
}

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

.channel-tile {
  min-height: 230px;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.86), rgba(4, 120, 87, 0.42));
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.tile-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 18px;
}

.tile-covers img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: #0f172a;
}

.channel-tile strong,
.channel-tile em {
  display: block;
}

.channel-tile strong {
  margin-bottom: 8px;
  font-size: 20px;
}

.channel-tile em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  line-height: 1.6;
}

.split-section {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 32px;
  align-items: start;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-num {
  font-size: 24px;
  font-weight: 900;
  color: #34d399;
}

.rank-cover {
  width: 58px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: #0f172a;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  color: #ffffff;
  margin-bottom: 4px;
}

.rank-info em {
  color: var(--subtle);
  font-style: normal;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-score {
  color: #111827;
  background: #fef3c7;
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 900;
}

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

.page-main,
.detail-main {
  padding-bottom: 70px;
}

.page-hero {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: 48px;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.26), rgba(15, 23, 42, 0.92)),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 34%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.small-hero h1,
.category-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
  max-width: 800px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 17px;
}

.local-filter {
  margin-top: 26px;
  width: min(620px, 100%);
  padding: 15px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.local-filter input {
  width: 100%;
  font-size: 16px;
}

.empty-state {
  display: none;
  margin: 28px 0;
  padding: 26px;
  text-align: center;
  color: var(--subtle);
  border: 1px dashed var(--line);
  border-radius: 18px;
}

.category-overview-list {
  width: min(1240px, calc(100% - 32px));
  margin: 34px auto;
  display: grid;
  gap: 24px;
}

.category-overview-card {
  padding: 24px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid var(--line);
}

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.category-overview-head span {
  font-size: 24px;
  font-weight: 900;
}

.category-overview-head a {
  color: #d1fae5;
  font-weight: 800;
}

.category-overview-card p {
  color: var(--subtle);
  line-height: 1.7;
}

.overview-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.detail-hero {
  position: relative;
  min-height: 610px;
  overflow: hidden;
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 610px;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
  padding: 72px 0;
}

.detail-poster {
  border-radius: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: #6ee7b7;
}

.detail-copy h1 {
  font-size: clamp(42px, 7vw, 82px);
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 820px;
  margin: 22px 0;
  color: #e2e8f0;
  font-size: 20px;
  line-height: 1.8;
}

.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.detail-facts span {
  padding: 9px 12px;
  border-radius: 12px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.player-section {
  margin-top: -54px;
  position: relative;
  z-index: 5;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(16, 185, 129, 0.2), transparent 40%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.5), rgba(2, 6, 23, 0.88));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: #064e3b;
  background: linear-gradient(135deg, #ffffff, #6ee7b7);
  box-shadow: 0 20px 60px rgba(16, 185, 129, 0.42);
  font-size: 34px;
  cursor: pointer;
}

.player-cover strong {
  font-size: 24px;
}

.player-cover span {
  color: var(--muted);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
  margin-top: 36px;
}

.story-card,
.info-card {
  padding: 28px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
}

.story-card {
  grid-column: 1;
}

.story-card p {
  color: var(--muted);
  line-height: 1.95;
  font-size: 16px;
}

.info-card {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: sticky;
  top: 94px;
}

.info-card dl {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 18px 0 0;
}

.info-card dt {
  color: var(--subtle);
}

.info-card dd {
  margin: 0;
  color: #ffffff;
  line-height: 1.55;
}

.info-card a {
  color: #6ee7b7;
}

.site-footer {
  margin-top: 50px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.7);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--subtle);
}

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

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

.footer-links a:hover {
  color: #6ee7b7;
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    min-height: 720px;
  }

  .hero-poster {
    display: none;
  }

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

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

  .split-section,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .info-card,
  .story-card {
    grid-column: auto;
    grid-row: auto;
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    height: 64px;
  }

  .brand-text small {
    display: none;
  }

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

  .hero-slide {
    padding-top: 62px;
    padding-bottom: 86px;
  }

  .hero-content h1,
  .detail-copy h1 {
    letter-spacing: -0.04em;
  }

  .quick-entry {
    grid-template-columns: 1fr;
    transform: translateY(-28px);
  }

  .section-title-row,
  .footer-inner,
  .category-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .detail-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 44px 0 96px;
  }

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

  .detail-hero {
    min-height: auto;
  }

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

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

  .rank-score {
    grid-column: 3;
    width: fit-content;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .wide-grid,
  .channel-grid,
  .overview-strip {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body strong {
    min-height: 40px;
    font-size: 14px;
  }

  .card-desc,
  .tag-list {
    display: none;
  }
}
