:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #0f172a;
  --muted: #94a3b8;
  --text: #f8fafc;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #10b981;
  --accent-strong: #059669;
  --accent-soft: rgba(16, 185, 129, 0.16);
  --amber: #f59e0b;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.08));
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
}

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

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

.brand {
  font-size: 24px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.32);
  font-size: 14px;
}

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

.nav-link,
.mobile-link {
  color: #e2e8f0;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #34d399;
}

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

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
}

.mobile-panel.is-open {
  display: grid;
  gap: 14px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
  z-index: 2;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.58) 44%, rgba(0, 0, 0, 0.08) 100%), linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 38%);
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-top: 72px;
  max-width: 760px;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.14);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 650;
}

.hero-content h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 6.3vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

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

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #cbd5e1;
}

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
}

.hero-actions,
.detail-categories {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.btn,
.section-more,
.rank-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.section-more:hover,
.rank-play:hover {
  transform: translateY(-2px);
}

.btn.primary,
.rank-play {
  color: white;
  background: var(--accent);
  box-shadow: 0 16px 34px rgba(16, 185, 129, 0.28);
}

.btn.primary:hover,
.rank-play:hover {
  background: var(--accent-strong);
}

.btn.ghost,
.section-more {
  border: 1px solid var(--line);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  position: absolute;
  z-index: 20;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: white;
  background: rgba(0, 0, 0, 0.48);
  cursor: pointer;
  transform: translateY(-50%);
  font-size: 40px;
  line-height: 1;
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: var(--accent);
}

.hero-search {
  position: absolute;
  z-index: 25;
  left: 50%;
  bottom: 28px;
  width: min(680px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  transform: translateX(-50%);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(18px);
}

.hero-search input,
.filter-bar input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: white;
  background: rgba(2, 6, 23, 0.72);
  outline: none;
  padding: 0 16px;
}

.hero-search input:focus,
.filter-bar input:focus {
  border-color: rgba(52, 211, 153, 0.6);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.hero-search button {
  min-height: 48px;
  border: 0;
  border-radius: 13px;
  color: white;
  background: var(--accent);
  padding: 0 24px;
  font-weight: 800;
  cursor: pointer;
}

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

.category-entrance {
  padding-top: 72px;
}

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

.eyebrow {
  margin: 0 0 8px;
  color: #34d399;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head h2,
.page-hero h1,
.detail-copy h1,
.text-panel h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-head span,
.page-hero p,
.card-meta,
.card-desc,
.text-panel p,
.rank-info p,
.site-footer p,
.category-card em,
.detail-one-line {
  color: var(--muted);
}

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 158px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.85), rgba(14, 165, 233, 0.52));
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.38);
}

.category-card strong {
  position: relative;
  z-index: 2;
  margin-bottom: 10px;
  font-size: 24px;
}

.category-card em {
  position: relative;
  z-index: 2;
  font-style: normal;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
}

.category-glow {
  position: absolute;
  right: -42px;
  top: -42px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.category-new,
.category-romance,
.category-family {
  background: linear-gradient(135deg, rgba(219, 39, 119, 0.86), rgba(245, 158, 11, 0.55));
}

.category-classic,
.category-western,
.category-documentary {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.86), rgba(14, 165, 233, 0.55));
}

.category-series,
.category-suspense,
.category-crime {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(16, 185, 129, 0.58));
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(15, 23, 42, 0.94);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: rgba(2, 6, 23, 0.72);
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
}

.year-badge,
.play-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
}

.year-badge {
  left: 10px;
  top: 10px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(10px);
  font-size: 12px;
}

.play-badge {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 14px 28px rgba(16, 185, 129, 0.35);
}

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

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

.movie-card h3 a:hover,
.rank-info h2 a:hover {
  color: #34d399;
}

.card-meta,
.card-desc {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.65;
}

.card-desc {
  min-height: 42px;
}

.movie-card.compact .card-desc {
  display: none;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 90px 0 72px;
  background: radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.22), transparent 36%), radial-gradient(circle at 80% 0%, rgba(14, 165, 233, 0.2), transparent 40%), linear-gradient(180deg, #0f172a 0%, #020617 100%);
}

.page-hero h1 {
  font-size: clamp(38px, 5vw, 64px);
}

.page-hero p {
  max-width: 740px;
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  max-width: 680px;
  margin-top: 26px;
}

.rank-section {
  padding: 48px 0 72px;
  display: grid;
  gap: 16px;
}

.rank-item {
  display: grid;
  grid-template-columns: 86px 58px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-cover {
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.72);
}

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

.rank-number {
  color: #34d399;
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-info p {
  margin: 0 0 10px;
  line-height: 1.68;
}

.detail-main {
  background: #020617;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 720px;
  padding-top: 96px;
  background: #020617;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.95)), var(--cover-image);
  background-size: cover;
  background-position: center;
  filter: blur(2px);
  transform: scale(1.04);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
  margin: 18px 0 38px;
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 44px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.7);
  box-shadow: var(--shadow);
}

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

.detail-copy h1 {
  margin-top: 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1;
}

.detail-one-line {
  max-width: 860px;
  font-size: 20px;
  line-height: 1.8;
}

.detail-categories a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(52, 211, 153, 0.32);
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.14);
}

.player-section {
  margin-top: -110px;
  position: relative;
  z-index: 4;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 30px;
  background: #000000;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

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

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

.play-overlay span {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 20px 60px rgba(16, 185, 129, 0.42);
  font-size: 24px;
}

.play-overlay strong {
  font-size: 22px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding: 64px 0 10px;
}

.text-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  padding: 28px;
}

.text-panel h2 {
  margin-bottom: 14px;
  font-size: 28px;
}

.text-panel p {
  margin: 0;
  line-height: 1.9;
}

.related-section {
  padding-bottom: 80px;
}

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

.footer-inner {
  min-height: 150px;
  display: grid;
  gap: 18px;
  align-content: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: #cbd5e1;
}

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

.site-footer p {
  margin: 0;
}

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

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .hero-content {
    width: min(100% - 32px, 680px);
    padding-top: 80px;
  }

  .hero-meta span:nth-child(3) {
    display: none;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

  .rank-number {
    position: absolute;
    margin: 10px;
    color: white;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
  }

  .rank-play {
    grid-column: 2;
    justify-self: start;
  }

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

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

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

@media (max-width: 560px) {
  .container,
  .nav-wrap,
  .mobile-panel {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 20px;
  }

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

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

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

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

  .movie-grid,
  .all-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

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

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

  .card-desc,
  .tag-row {
    display: none;
  }

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

  .rank-item {
    gap: 14px;
    padding: 12px;
  }

  .detail-hero {
    min-height: auto;
    padding-bottom: 140px;
  }

  .player-section {
    margin-top: -96px;
  }

  .text-panel {
    padding: 22px;
  }
}
