:root {
  --emerald: #059669;
  --emerald-deep: #047857;
  --teal: #0d9488;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
  --soft-shadow: 0 14px 35px rgba(15, 23, 42, 0.10);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.28);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, var(--emerald), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--slate-700);
  font-weight: 700;
}

.nav-links a,
.nav-dropdown button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active,
.nav-dropdown button:hover {
  color: var(--emerald);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 34px;
  right: 0;
  width: 180px;
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--slate-100);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--slate-800);
}

.hero {
  position: relative;
  min-height: 720px;
  padding-top: 68px;
  overflow: hidden;
  background: var(--slate-950);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 32%, rgba(20, 184, 166, 0.56), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58) 52%, rgba(2, 6, 23, 0.32)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.84), transparent 48%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 68px 0 96px;
  color: var(--white);
}

.hero-pill,
.kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-pill {
  color: #d1fae5;
  border: 1px solid rgba(209, 250, 229, 0.34);
  background: rgba(5, 150, 105, 0.22);
  backdrop-filter: blur(12px);
}

.hero h1,
.hero h2 {
  width: min(760px, 100%);
  margin: 18px 0 0;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero h2 + p,
.hero h1 + h2 + p {
  margin-top: 20px;
}

.hero p {
  width: min(680px, 100%);
  font-size: 19px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.88);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  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: var(--white);
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 18px 30px rgba(5, 150, 105, 0.32);
}

.btn.ghost {
  color: var(--slate-900);
  background: rgba(255, 255, 255, 0.9);
}

.btn.text {
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  right: max(24px, calc((100% - 1180px) / 2));
  bottom: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-controls button {
  border: 0;
  cursor: pointer;
}

.hero-controls > button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  font-size: 28px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
}

.hero-dots button.active {
  width: 28px;
  background: var(--white);
}

.page-main {
  padding-top: 68px;
}

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

.page-hero {
  padding: 72px 0 44px;
}

.page-hero h1,
.detail-info h1 {
  margin: 16px 0 12px;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.page-hero p,
.detail-lead {
  max-width: 760px;
  margin: 0;
  color: var(--slate-600);
  font-size: 18px;
  line-height: 1.85;
}

.channel-hero,
.rank-hero,
.search-hero {
  padding: 86px 40px 58px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  color: var(--white);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.24), transparent 28%),
    linear-gradient(135deg, var(--emerald), var(--teal));
}

.channel-hero .kicker,
.rank-hero .kicker,
.search-hero .kicker {
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.16);
}

.channel-hero p,
.rank-hero p,
.search-hero p {
  color: rgba(255, 255, 255, 0.9);
}

.inline-actions {
  margin-top: 24px;
}

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

.soft-bg {
  width: 100%;
  padding: 72px max(16px, calc((100% - 1180px) / 2));
  background: rgba(255, 255, 255, 0.56);
}

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

.section-heading h2,
.article-section h2 {
  margin: 12px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.035em;
}

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

.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--emerald-deep);
  background: #d1fae5;
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(226, 232, 240, 0.82);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
}

.poster-frame img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

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

.poster-year,
.rank-badge {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  color: var(--white);
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.poster-year {
  right: 12px;
  padding: 5px 10px;
  background: rgba(15, 23, 42, 0.64);
}

.rank-badge {
  left: 12px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

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

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--slate-500);
  font-size: 13px;
  font-weight: 800;
}

.card-category {
  color: var(--emerald-deep);
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 20px;
  line-height: 1.25;
}

.movie-card p {
  display: -webkit-box;
  min-height: 72px;
  margin: 0;
  overflow: hidden;
  color: var(--slate-600);
  line-height: 1.6;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--slate-700);
  background: var(--slate-100);
  font-size: 12px;
  font-weight: 700;
}

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

.channel-card,
.category-overview-card {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(226, 232, 240, 0.82);
  overflow: hidden;
}

.channel-card > a,
.category-overview-card > a {
  display: block;
  padding: 24px;
}

.channel-card h3,
.category-overview-card h2 {
  margin: 14px 0;
  font-size: 26px;
  letter-spacing: -0.03em;
}

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

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

.compact-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border-radius: 16px;
  background: var(--slate-50);
  transition: background 0.2s ease, transform 0.2s ease;
}

.compact-item:hover {
  background: #ecfdf5;
  transform: translateX(3px);
}

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

.compact-item strong,
.compact-item em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-item strong {
  font-size: 16px;
}

.compact-item em {
  margin-top: 5px;
  color: var(--slate-500);
  font-size: 13px;
  font-style: normal;
}

.compact-rank {
  position: absolute;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--emerald);
  font-weight: 900;
  transform: translate(-4px, -26px);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(160px, 0.5fr));
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--soft-shadow);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--slate-600);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--slate-900);
  background: var(--white);
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(5, 150, 105, 0.5);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.empty-state {
  padding: 22px;
  border-radius: 18px;
  color: var(--slate-600);
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 44px;
  padding: 92px 0 52px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--emerald), var(--teal));
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--slate-500);
  font-weight: 800;
}

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

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

.detail-meta span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--slate-700);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  font-weight: 800;
}

.detail-tags .tag {
  color: var(--emerald-deep);
  background: #d1fae5;
}

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

.compact-heading {
  margin-bottom: 18px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--slate-950);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--slate-950);
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.16));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 22px 44px rgba(5, 150, 105, 0.35);
  font-size: 32px;
  padding-left: 5px;
}

.player-overlay strong {
  font-size: 20px;
}

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

.article-section p {
  margin: 0 0 28px;
  color: var(--slate-700);
  font-size: 18px;
  line-height: 1.95;
}

.site-footer {
  margin-top: 42px;
  padding: 54px max(16px, calc((100% - 1180px) / 2)) 34px;
  color: #cbd5e1;
  background: var(--slate-950);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 0.8fr;
  gap: 36px;
}

.footer-grid p {
  max-width: 520px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: 18px;
}

.footer-links {
  display: flex;
  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 {
  background: rgba(16, 185, 129, 0.26);
}

.copyright {
  margin: 42px 0 0;
  color: #64748b;
}

@media (max-width: 980px) {
  .menu-toggle {
    display: inline-block;
  }

  .nav-links {
    position: absolute;
    top: 68px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a,
  .nav-dropdown button {
    padding: 12px;
    text-align: left;
  }

  .nav-dropdown:hover .dropdown-panel,
  .nav-dropdown:focus-within .dropdown-panel {
    display: grid;
  }

  .dropdown-panel {
    position: static;
    display: none;
    width: 100%;
    box-shadow: none;
    background: var(--slate-50);
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

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

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

  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }

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

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

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

@media (max-width: 640px) {
  .brand-text {
    font-size: 17px;
  }

  .hero,
  .hero-content {
    min-height: 620px;
  }

  .hero h1,
  .hero h2,
  .page-hero h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .hero-controls {
    left: 16px;
    right: auto;
    bottom: 24px;
  }

  .content-section,
  .soft-bg,
  .player-section {
    padding-top: 44px;
    padding-bottom: 44px;
  }

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

  .movie-grid,
  .large-grid,
  .related-grid,
  .channel-grid,
  .category-overview-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .channel-hero,
  .rank-hero,
  .search-hero {
    padding-left: 22px;
    padding-right: 22px;
  }

  .player-shell {
    border-radius: 18px;
  }
}
