:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --accent: #059669;
  --accent-dark: #047857;
  --accent-soft: #d1fae5;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 46%, #f8fafc 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 16px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #10b981, #047857);
  color: #fff;
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.24);
}

.brand-text {
  font-size: 20px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 14px;
  color: #334155;
  font-weight: 700;
  transition: 0.2s ease;
}

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #f1f5f9;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: #0f172a;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.mobile-nav-link {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  font-weight: 700;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 540px;
  overflow: hidden;
  background: #111827;
}

.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-bg,
.detail-bg {
  position: absolute;
  inset: -28px;
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.45);
  transform: scale(1.12);
}

.hero-overlay,
.detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.68) 48%, rgba(15, 23, 42, 0.24) 100%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #fff;
  max-width: 1180px;
}

.hero-kicker,
.detail-tags,
.meta-line,
.detail-actions,
.hero-actions,
.player-head,
.section-heading,
.compact-heading,
.breadcrumb,
.info-list div {
  display: flex;
  align-items: center;
}

.hero-kicker {
  gap: 12px;
  color: #e2e8f0;
  margin-bottom: 20px;
}

.hero-kicker span:first-child,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.hero-content h1,
.hero-content h2 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.hero-content p {
  max-width: 700px;
  margin: 22px 0 0;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-actions,
.detail-actions {
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

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

.primary-btn {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 14px 32px rgba(5, 150, 105, 0.3);
}

.primary-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

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

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(12px);
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-arrow.prev {
  left: max(18px, calc((100vw - 1180px) / 2));
}

.hero-arrow.next {
  right: max(18px, calc((100vw - 1180px) / 2));
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
}

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

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

.search-band {
  width: min(1180px, calc(100% - 32px));
  margin: -44px auto 0;
  position: relative;
  z-index: 3;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  backdrop-filter: blur(18px);
}

.search-band h2,
.search-band p,
.section-heading h2,
.page-hero h1,
.article-panel h2,
.player-head h2 {
  margin: 0;
}

.search-band p,
.page-hero p,
.category-card p,
.movie-card p,
.wide-card p,
.article-panel p,
.detail-lead,
.site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 74px;
}

.home-shell {
  display: grid;
  gap: 80px;
}

.content-section,
.highlight-section,
.article-panel,
.player-section,
.page-hero {
  border-radius: var(--radius);
}

.highlight-section {
  background: linear-gradient(135deg, #ecfdf5, #eff6ff);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.section-heading {
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading h2,
.page-hero h1 {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

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

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

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

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

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

.movie-card {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.poster-wrap {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  background: #e2e8f0;
}

.poster-wrap img,
.category-card img,
.wide-card img,
.rank-row img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-wrap img,
.category-card:hover img,
.wide-card:hover img {
  transform: scale(1.07);
}

.poster-badge,
.poster-type,
.wide-card-rank {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.poster-badge {
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(5, 150, 105, 0.92);
}

.poster-type {
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
}

.movie-card-body h3,
.wide-card h3,
.category-card h2,
.rank-title {
  margin: 0;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.35;
}

.movie-card-body p,
.wide-card p {
  margin: 6px 0 0;
  font-size: 14px;
}

.meta-line {
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  margin-top: 9px;
  font-size: 13px;
}

.movie-card:hover h3,
.wide-card:hover h3,
.rank-row:hover .rank-title,
.category-card:hover h2 {
  color: var(--accent);
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.wide-card-list,
.home-rank-list,
.rank-list {
  display: grid;
  gap: 12px;
}

.wide-card,
.rank-row {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wide-card:hover,
.rank-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

.wide-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  padding: 12px;
}

.wide-card img {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background: #e2e8f0;
}

.wide-card-rank {
  top: 18px;
  left: 18px;
  padding: 4px 8px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
}

.rank-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: 54px 58px 1fr auto 58px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
}

.rank-num {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #10b981, #047857);
  font-weight: 900;
}

.rank-row img {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: #e2e8f0;
}

.rank-meta {
  color: var(--muted);
  font-size: 14px;
}

.rank-score {
  color: var(--accent);
  font-weight: 900;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 52px);
  background: linear-gradient(135deg, #0f172a, #064e3b 55%, #059669);
  color: #fff;
  box-shadow: var(--shadow);
}

.compact-hero p {
  max-width: 760px;
  color: #dbeafe;
  font-size: 17px;
}

.page-hero .eyebrow {
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.breadcrumb {
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

.filter-panel {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(150px, 1fr));
  gap: 14px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  font-size: 13px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  outline: none;
}

.filter-panel input::placeholder {
  color: rgba(255, 255, 255, 0.64);
}

.filter-panel select option {
  color: #0f172a;
}

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

.category-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 20px;
  align-items: center;
  min-height: 190px;
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.category-card img {
  height: 158px;
  border-radius: 18px;
  background: #e2e8f0;
}

.detail-page {
  background: #fff;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  color: #fff;
}

.detail-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 64px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
}

.detail-poster {
  margin: 0;
  aspect-ratio: 3 / 4;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  background: #334155;
}

.detail-copy h1 {
  margin: 18px 0 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.detail-lead {
  max-width: 780px;
  margin: 24px 0 0;
  color: #e2e8f0;
  font-size: 20px;
}

.detail-tags {
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.detail-tags span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}

.detail-content {
  display: grid;
  gap: 34px;
}

.player-section,
.article-panel {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.player-section {
  padding: clamp(18px, 3vw, 28px);
}

.player-head {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.player-head span {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 800;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 16 / 9;
  background: #020617;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(5, 150, 105, 0.28), rgba(2, 6, 23, 0.28));
  color: #fff;
}

.play-layer.is-hidden {
  display: none;
}

.play-circle {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(5, 150, 105, 0.94);
  box-shadow: 0 18px 48px rgba(5, 150, 105, 0.36);
  font-size: 32px;
  padding-left: 5px;
}

.article-panel {
  padding: clamp(24px, 4vw, 42px);
}

.article-panel h2 {
  margin-top: 26px;
  font-size: 28px;
}

.article-panel h2:first-child {
  margin-top: 0;
}

.article-panel p {
  font-size: 17px;
  margin: 12px 0 0;
}

.info-list {
  margin: 30px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.info-list div {
  display: block;
  padding: 16px;
  border-radius: 16px;
  background: #f8fafc;
}

.info-list dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.info-list dd {
  margin: 6px 0 0;
  font-weight: 800;
}

.empty-text {
  margin: 28px 0 0;
  padding: 18px 20px;
  border-radius: 18px;
  background: #f8fafc;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 34px;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 16px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

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

.footer-brand p {
  margin: 16px 0 0;
  max-width: 360px;
  color: #94a3b8;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  text-align: center;
}

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

  .nav-toggle {
    display: inline-flex;
  }

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

  .hero-arrow {
    display: none;
  }

  .search-band,
  .split-section,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .search-band {
    display: grid;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .small-grid,
  .category-page-grid,
  .search-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .detail-layout {
    align-items: start;
  }

  .detail-poster {
    width: min(320px, 100%);
  }

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

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

  .rank-meta {
    display: none;
  }
}

@media (max-width: 620px) {
  .site-nav,
  .mobile-nav,
  .page-shell,
  .search-band,
  .hero-content,
  .detail-inner,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .brand-text {
    font-size: 17px;
  }

  .hero-carousel {
    height: 78vh;
    min-height: 560px;
  }

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

  .hero-content p {
    font-size: 16px;
  }

  .hero-actions,
  .detail-actions {
    width: 100%;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .small-grid,
  .category-page-grid,
  .search-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

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

  .category-card img {
    height: 220px;
  }

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

  .detail-lead {
    font-size: 17px;
  }

  .rank-row {
    grid-template-columns: 42px 46px 1fr 48px;
    gap: 8px;
    padding: 10px;
  }

  .rank-row img {
    width: 46px;
    height: 46px;
  }
}
