:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #eefdf6;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #059669;
  --accent-strong: #047857;
  --accent-soft: rgba(16, 185, 129, 0.14);
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.12), transparent 34rem), var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #047857 55%, #0f172a);
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.32);
}

.logo-text {
  font-size: 22px;
}

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

.nav-link,
.mobile-panel a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  font-size: 15px;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-panel a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
}

.nav-search input {
  width: 220px;
  border: 0;
  outline: 0;
  padding: 8px 4px 8px 12px;
  color: var(--text);
}

.nav-search button,
.wide-search button,
.primary-btn,
.ghost-btn,
.rank-more {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.nav-search button,
.wide-search button,
.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.24);
}

.nav-search button:hover,
.wide-search button:hover,
.primary-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #059669, #047857);
}

.ghost-btn,
.rank-more {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

.ghost-btn:hover,
.rank-more:hover {
  background: rgba(255, 255, 255, 0.2);
}

.menu-toggle {
  display: none;
  border: 0;
  background: var(--accent);
  color: #ffffff;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 22px;
}

.mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
  gap: 8px;
  flex-wrap: wrap;
}

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

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: var(--dark);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72) 46%, rgba(15, 23, 42, 0.18)), linear-gradient(0deg, rgba(15, 23, 42, 0.85), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 40px));
  margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  padding: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.46);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
}

.hero-kicker,
.section-eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  color: #34d399;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 640px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
}

.hero-tags,
.detail-tags,
.tag-line,
.card-badges,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.tag-line span,
.card-badges span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span {
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.14);
}

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

.hero-control {
  position: absolute;
  z-index: 5;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 36px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(14px);
}

.hero-control button {
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.hero-control > button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
}

.hero-dot.active {
  width: 28px;
  border-radius: 999px;
  background: #34d399;
}

.section-wrap {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0;
}

.quick-search {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 24px;
  align-items: center;
}

.quick-search h2,
.section-head h2,
.rank-title h2,
.page-hero h1,
.article-section h2,
.player-section h2,
.related-categories h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.wide-search {
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.wide-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 12px 16px;
  color: var(--text);
  font-size: 17px;
}

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

.section-head a {
  color: var(--accent);
  font-weight: 900;
}

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

.category-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  min-height: 190px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  transition: 0.22s ease;
}

.category-card:hover,
.movie-card:hover,
.rank-feature:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.14);
}

.category-cover {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--dark-soft);
}

.category-cover img {
  width: 100%;
  height: 82px;
  object-fit: cover;
}

.category-card span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.category-card h2 {
  margin: 8px 0;
  font-size: 24px;
  line-height: 1.15;
}

.category-card p,
.movie-card p,
.page-hero p,
.article-section p,
.footer-inner p,
.detail-one-line {
  color: var(--muted);
}

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

.movie-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  transition: 0.22s ease;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--dark-soft);
  aspect-ratio: 2 / 3;
}

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

.movie-card:hover .poster-link img,
.rank-feature:hover img {
  transform: scale(1.06);
}

.play-chip,
.rank-num {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  background: rgba(5, 150, 105, 0.92);
}

.rank-num {
  top: 12px;
  left: 12px;
  padding: 7px 11px;
  background: rgba(15, 23, 42, 0.86);
  font-style: normal;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

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

.movie-card h3 a:hover {
  color: var(--accent);
}

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

.tag-line {
  margin-top: auto;
}

.tag-line span {
  font-size: 12px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 94px;
  padding: 24px;
  border-radius: 28px;
  color: #ffffff;
  background: linear-gradient(160deg, #0f172a, #064e3b 72%, #047857);
  box-shadow: var(--shadow);
}

.rank-title span {
  color: #34d399;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.rank-title h2 {
  color: #ffffff;
  margin-top: 4px;
}

.rank-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.rank-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.rank-row span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.22);
  color: #a7f3d0;
  font-weight: 900;
}

.rank-row strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-row em {
  color: #a7f3d0;
  font-style: normal;
}

.rank-more {
  display: inline-flex;
  margin-top: 18px;
}

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

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

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

.movie-card.compact p,
.movie-card.compact .tag-line {
  display: none;
}

.page-hero {
  width: min(1280px, calc(100% - 40px));
  margin: 38px auto 0;
  padding: 56px;
  border-radius: 34px;
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(52, 211, 153, 0.36), transparent 24rem), linear-gradient(135deg, #0f172a, #064e3b 68%, #047857);
  box-shadow: var(--shadow);
}

.page-hero h1,
.page-hero p {
  max-width: 820px;
  color: #ffffff;
}

.page-hero p {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.filter-panel {
  width: min(1280px, calc(100% - 40px));
  margin: 34px auto 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(180px, 240px) minmax(180px, 240px);
  gap: 14px;
  align-items: end;
}

.filter-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  outline: 0;
  padding: 12px 14px;
  color: var(--text);
  background: #ffffff;
}

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

.empty-state {
  margin: 16px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.related-categories {
  padding-top: 18px;
}

.related-categories div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.related-categories a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 900;
}

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

.rank-feature {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  border-radius: 28px;
  color: #ffffff;
  background: var(--dark-soft);
  box-shadow: var(--shadow);
  transition: 0.22s ease;
}

.rank-feature img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.rank-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), transparent 58%);
}

.rank-feature span,
.rank-feature strong,
.rank-feature em {
  position: absolute;
  z-index: 2;
  left: 18px;
}

.rank-feature span {
  top: 18px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #10b981;
  font-weight: 900;
}

.rank-feature strong {
  right: 18px;
  bottom: 54px;
  font-size: 22px;
  line-height: 1.2;
}

.rank-feature em {
  right: 18px;
  bottom: 24px;
  overflow: hidden;
  color: #a7f3d0;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-style: normal;
}

.detail-layout {
  width: min(1280px, calc(100% - 40px));
  margin: 34px auto 0;
}

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

.breadcrumb a {
  color: var(--accent);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 30px;
  padding: 30px;
  border-radius: 34px;
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(52, 211, 153, 0.34), transparent 26rem), linear-gradient(135deg, #0f172a, #064e3b 68%, #047857);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.32);
}

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

.detail-info {
  align-self: center;
}

.detail-meta span,
.detail-tags span {
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.14);
}

.detail-info h1 {
  margin: 20px 0 0;
  color: #ffffff;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-one-line {
  margin: 18px 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
}

.player-section {
  padding-bottom: 24px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  margin-top: 22px;
  border-radius: 30px;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.34);
  cursor: pointer;
}

.player-overlay[hidden] {
  display: none;
}

.player-overlay span {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 50%;
  padding-left: 6px;
  background: linear-gradient(135deg, #10b981, #047857);
  box-shadow: 0 18px 42px rgba(5, 150, 105, 0.42);
  font-size: 34px;
}

.article-section {
  display: grid;
  gap: 18px;
  padding-top: 22px;
}

.article-section p {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #ffffff;
  font-size: 17px;
}

.site-footer {
  margin-top: 60px;
  color: #cbd5e1;
  background: linear-gradient(145deg, #0f172a, #020617);
}

.footer-inner {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
}

.footer-logo {
  color: #34d399;
  font-size: 24px;
}

.footer-inner p {
  max-width: 520px;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #d1fae5;
  font-weight: 800;
}

.copyright {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 28px;
  color: #64748b;
}

@media (max-width: 1180px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .rank-panel {
    position: static;
  }
}

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

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

  .hero-carousel {
    min-height: 600px;
  }

  .hero-content {
    margin: 0 auto;
    padding: 28px;
  }

  .hero-control {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .quick-search,
  .footer-inner,
  .detail-hero,
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    padding: 22px;
  }

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

  .page-hero {
    padding: 36px 24px;
  }
}

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

  .section-wrap,
  .detail-layout,
  .page-hero,
  .filter-panel,
  .footer-inner,
  .copyright {
    width: min(100% - 28px, 1280px);
  }

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

  .category-card {
    grid-template-columns: 1fr;
  }

  .home-category-grid {
    grid-template-columns: 1fr;
  }

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

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

  .hero-content h1 {
    font-size: 38px;
  }

  .hero-content p,
  .detail-one-line {
    font-size: 17px;
  }

  .detail-info h1 {
    font-size: 38px;
  }

  .rank-feature {
    min-height: 280px;
  }
}

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

  .logo-text {
    font-size: 19px;
  }

  .hero-content {
    width: calc(100% - 24px);
    padding: 22px;
  }

  .hero-control {
    bottom: 18px;
  }
}
