:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.76);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-light: #cbd5e1;
  --emerald: #10b981;
  --emerald-soft: rgba(16, 185, 129, 0.16);
  --amber: #f59e0b;
  --radius: 22px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
  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 20% 0%, rgba(16, 185, 129, 0.18), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
}

body.menu-open {
  overflow: hidden;
}

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

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

.site-header {
  position: fixed;
  z-index: 60;
  top: 0;
  right: 0;
  left: 0;
  transition: background 0.28s ease, box-shadow 0.28s ease, backdrop-filter 0.28s ease;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0));
}

.site-header.is-solid {
  background: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981, #22c55e);
  color: #042f2e;
  font-size: 15px;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.36);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #e2e8f0;
  font-weight: 700;
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #34d399;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 99px;
}

main {
  min-height: 72vh;
}

.hero {
  position: relative;
  height: 84vh;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 1s ease, transform 1.1s ease;
  pointer-events: none;
}

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.72) 36%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0) 46%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: max(24px, calc((100vw - 1180px) / 2));
  width: min(680px, calc(100% - 48px));
  transform: translateY(-46%);
}

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

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, #10b981, #22c55e);
  color: #022c22;
  box-shadow: 0 16px 36px rgba(16, 185, 129, 0.28);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.58);
  color: #e2e8f0;
  backdrop-filter: blur(16px);
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: #fff;
  font-size: 34px;
  cursor: pointer;
  backdrop-filter: blur(16px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(16, 185, 129, 0.72);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 24px;
  transform: translateY(-50%);
}

.hero-next {
  right: 24px;
  transform: translateY(-50%);
}

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

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

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

.page-hero,
.detail-hero {
  padding: 136px 0 48px;
}

.container,
.content-section,
.page-hero-inner,
.detail-wrap,
.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.page-hero-inner,
.detail-hero-inner {
  border: 1px solid var(--border);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(30, 41, 59, 0.78)),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.page-hero-inner {
  padding: 46px;
}

.page-hero h1,
.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.page-hero p,
.detail-copy p {
  margin: 0;
  color: var(--muted-light);
  font-size: 18px;
  line-height: 1.85;
}

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 8px 0 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  flex: 0 0 auto;
  color: #34d399;
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.34);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #020617);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 44%, rgba(2, 6, 23, 0.9));
  opacity: 0.9;
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.92);
  color: #052e26;
  font-size: 14px;
  box-shadow: 0 12px 26px rgba(16, 185, 129, 0.26);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
}

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

.movie-card h3 a:hover {
  color: #34d399;
}

.movie-card p {
  min-height: 4.9em;
  margin: 0 0 14px;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.65;
}

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

.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 999px;
  background: var(--emerald-soft);
  color: #86efac;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: #0f172a;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-card:hover img {
  transform: scale(1.08);
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.92));
}

.category-copy {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
}

.category-copy strong,
.category-copy em {
  display: block;
}

.category-copy strong {
  margin-bottom: 8px;
  font-size: 24px;
}

.category-copy em {
  color: #cbd5e1;
  font-style: normal;
  line-height: 1.7;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 70px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 106px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(16, 185, 129, 0.42);
}

.rank-number {
  color: var(--amber);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 70px;
  height: 82px;
  border-radius: 14px;
  object-fit: cover;
}

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

.rank-copy strong {
  margin-bottom: 8px;
  font-size: 18px;
}

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

.filter-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}

.filter-input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  outline: none;
  background: rgba(2, 6, 23, 0.8);
  color: var(--text);
  font: inherit;
}

.filter-input:focus {
  border-color: rgba(16, 185, 129, 0.62);
}

.filter-chip {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #cbd5e1;
  font-weight: 800;
  cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
  border-color: rgba(16, 185, 129, 0.54);
  background: rgba(16, 185, 129, 0.18);
  color: #86efac;
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted-light);
  background: rgba(15, 23, 42, 0.72);
  text-align: center;
}

.empty-state.visible {
  display: block;
}

.detail-hero {
  padding-bottom: 0;
}

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

.detail-cover {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 2 / 3;
  background: #0f172a;
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 700;
}

.breadcrumbs a:hover {
  color: #34d399;
}

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

.detail-meta span {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.5);
  color: #cbd5e1;
  font-weight: 800;
}

.player-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(2, 6, 23, 0.78);
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-overlay span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.94);
  color: #022c22;
  font-size: 30px;
  box-shadow: 0 18px 42px rgba(16, 185, 129, 0.28);
}

.article-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
  line-height: 1.95;
  color: #dbeafe;
}

.article-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.article-card p {
  margin: 0 0 18px;
}

.article-card p:last-child {
  margin-bottom: 0;
}

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

.footer-inner {
  padding: 34px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 20px;
  color: #cbd5e1;
  font-weight: 700;
}

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

.footer-inner p {
  margin: 0;
}

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

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

@media (max-width: 820px) {
  .site-nav {
    width: min(100% - 24px, 1180px);
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 72px;
    right: 12px;
    left: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
  }

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

  .nav-links a {
    padding: 14px;
    border-radius: 14px;
  }

  .nav-links a:hover,
  .nav-links a.active {
    background: rgba(16, 185, 129, 0.14);
  }

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

  .hero-content {
    top: 54%;
  }

  .hero-control {
    display: none;
  }

  .page-hero-inner {
    padding: 30px;
  }

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

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

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

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

  .detail-cover {
    max-width: 420px;
  }
}

@media (max-width: 560px) {
  .logo,
  .footer-logo {
    font-size: 22px;
  }

  .hero {
    min-height: 620px;
  }

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

  .hero-actions,
  .filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn,
  .filter-chip {
    width: 100%;
  }

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

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

  .rank-item {
    grid-template-columns: 44px 64px 1fr;
  }
}