:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #10b981;
  --brand-dark: #0f766e;
  --accent: #f97316;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(18px);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.logo-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 10px 26px rgba(16, 185, 129, 0.35);
}

.logo strong {
  display: block;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.1;
}

.logo small {
  color: #94a3b8;
  font-size: 12px;
}

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

.nav-links a {
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: #ffffff;
  transform: translateY(-1px);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(280px, 30vw);
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
}

.nav-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
  padding: 8px 8px 8px 14px;
}

.nav-search input::placeholder {
  color: #94a3b8;
}

.nav-search button,
.button,
.card-action,
.hero-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button {
  padding: 8px 14px;
}

.button,
.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
}

.card-action {
  display: inline-flex;
  padding: 9px 15px;
  font-size: 14px;
}

.button:hover,
.card-action:hover,
.hero-button:hover,
.nav-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(16, 185, 129, 0.34);
}

.button.secondary,
.hero-button.secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 13px;
  color: #ffffff;
  background: rgba(148, 163, 184, 0.14);
}

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

.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 {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 18%, rgba(16, 185, 129, 0.3), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.86) 0%, rgba(15, 23, 42, 0.65) 46%, rgba(15, 23, 42, 0.1) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.72) 0%, transparent 48%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 70vh;
  display: flex;
  align-items: center;
  padding: 94px 0 84px;
}

.hero-copy {
  width: min(650px, 100%);
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px 13px;
  border-radius: 999px;
  color: #ecfdf5;
  background: rgba(16, 185, 129, 0.88);
  font-size: 14px;
  font-weight: 800;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  font-size: clamp(34px, 4.5vw, 62px);
}

.hero-copy p {
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 20px);
  max-width: 720px;
}

.hero-meta,
.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin-bottom: 24px;
}

.pill,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
  background: #ecfdf5;
  color: #047857;
}

.hero-meta .pill {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.hero-controls {
  position: absolute;
  z-index: 4;
  right: calc((100% - min(1180px, calc(100% - 32px))) / 2);
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
}

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

.hero-dot.is-active {
  width: 28px;
  border-radius: 999px;
  opacity: 1;
  background: var(--brand);
}

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

.section {
  padding: 70px 0 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--soft-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.movie-card.wide .poster-link,
.movie-grid.featured .poster-link {
  aspect-ratio: 16 / 9;
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.92);
  font-size: 12px;
  font-weight: 900;
}

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.75), transparent);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.28;
}

.card-body h3 a:hover {
  color: var(--brand-dark);
}

.card-body p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.meta-row {
  margin-bottom: 10px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.tag-row {
  margin-bottom: 14px;
}

.tag {
  padding: 4px 9px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
}

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

.category-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--radius);
  padding: 24px;
  color: #ffffff;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.24), transparent 30%),
    linear-gradient(135deg, #0f172a, #115e59 58%, #047857);
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: #d1fae5;
}

.category-card span {
  display: inline-flex;
  margin-top: 20px;
  font-weight: 900;
}

.page-hero {
  padding: 70px 0 46px;
  background:
    radial-gradient(circle at 78% 18%, rgba(16, 185, 129, 0.22), transparent 28%),
    linear-gradient(135deg, #0f172a, #1e293b 62%, #0f766e);
  color: #ffffff;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

.filter-panel {
  margin: 30px 0 0;
  padding: 14px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  display: flex;
  gap: 12px;
}

.filter-panel input {
  width: 100%;
  border: 1px solid var(--line);
  outline: 0;
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--ink);
}

.filter-panel input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 72px 110px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), #ef4444);
}

.ranking-item img {
  width: 110px;
  height: 72px;
  object-fit: cover;
  border-radius: 14px;
}

.ranking-item h2,
.ranking-item h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.ranking-item p {
  margin: 0;
  color: var(--muted);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #d1fae5;
  font-weight: 800;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 70px 0;
  color: #ffffff;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.35;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(14px);
  transform: scale(1.08);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.42));
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 38px;
  align-items: center;
}

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

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

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-copy p {
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 18px;
}

.player-section {
  padding: 58px 0 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.24);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.28));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 16px 38px rgba(16, 185, 129, 0.34);
  font-size: 40px;
  padding-left: 6px;
}

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

.article-panel {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 28px;
  padding-top: 44px;
}

.content-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 28px;
  box-shadow: var(--soft-shadow);
}

.content-card h2 {
  margin: 0 0 15px;
  font-size: 26px;
}

.content-card p {
  margin: 0 0 18px;
  color: #334155;
}

.side-list {
  display: grid;
  gap: 14px;
}

.side-link {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.side-link img {
  width: 82px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
}

.side-link strong {
  display: block;
  line-height: 1.25;
}

.side-link small {
  color: var(--muted);
}

.site-footer {
  margin-top: 80px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b, #0f172a);
}

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

.footer-inner h2,
.footer-inner h3 {
  margin: 0 0 12px;
  color: #ffffff;
}

.footer-inner p {
  margin: 0;
  color: #94a3b8;
}

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

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

.copyright {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 18px 0;
  text-align: center;
  color: #94a3b8;
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: 20px;
  background: #ffffff;
  color: var(--muted);
  box-shadow: var(--soft-shadow);
}

@media (max-width: 980px) {
  .nav-wrap {
    flex-wrap: wrap;
    padding: 14px 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links,
  .nav-search {
    display: none;
    width: 100%;
  }

  .nav-links.is-open,
  .nav-search.is-open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 10px;
    margin-left: 0;
  }

  .nav-search {
    width: 100%;
  }

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

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

  .detail-layout,
  .article-panel {
    grid-template-columns: 1fr;
  }

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

  .ranking-item {
    grid-template-columns: 52px 86px 1fr;
  }

  .ranking-item .card-action {
    grid-column: 3;
    justify-self: start;
  }

  .ranking-item img {
    width: 86px;
    height: 62px;
  }

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

@media (max-width: 640px) {
  .hero-carousel,
  .hero-inner {
    min-height: 78vh;
  }

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

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

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

  .ranking-item {
    grid-template-columns: 48px 1fr;
  }

  .ranking-item img {
    display: none;
  }

  .ranking-item .card-action {
    grid-column: 2;
  }

  .content-card {
    padding: 22px;
  }
}
