:root {
  --bg: #070b14;
  --panel: #0f172a;
  --panel-soft: #111827;
  --card: #101827;
  --line: rgba(148, 163, 184, 0.22);
  --text: #eef2ff;
  --muted: #a5b4c8;
  --green: #10b981;
  --teal: #0d9488;
  --gold: #f59e0b;
  --red: #ef4444;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(16, 185, 129, 0.2), transparent 34rem),
    radial-gradient(circle at 90% 20%, rgba(14, 165, 233, 0.16), transparent 32rem),
    linear-gradient(180deg, #050812 0%, #0b1120 42%, #070b14 100%);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 11, 20, 0.8);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green), var(--teal));
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.25);
}

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

.nav-link {
  padding: 9px 14px;
  color: var(--muted);
  border-radius: 999px;
  transition: background 0.25s ease, color 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-toggle {
  display: none;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 14px;
}

.mobile-nav {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 18px;
}

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

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.mobile-category-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-image:
    linear-gradient(90deg, rgba(4, 8, 18, 0.96), rgba(4, 8, 18, 0.68), rgba(4, 8, 18, 0.25)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.7s ease, transform 1.4s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, var(--bg) 0%, transparent 34%),
    radial-gradient(circle at 65% 50%, transparent, rgba(0, 0, 0, 0.34));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, calc(100% - 44px));
  margin-left: max(22px, calc((100vw - 1240px) / 2 + 22px));
  padding: 92px 0;
}

.hero-kicker,
.rank-meta,
.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.hero-kicker span,
.detail-meta li,
.card-meta a,
.card-meta span,
.rank-meta span {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 9px;
  border-radius: 999px;
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero-content p {
  max-width: 620px;
  margin: 0;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  color: #b7f7dd;
  padding: 5px 10px;
  font-size: 12px;
}

.tag-row.large span {
  font-size: 13px;
  padding: 7px 12px;
}

.hero-actions,
.detail-info .primary-btn {
  margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.filter-reset,
.home-search-strip button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 18px;
  min-height: 44px;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn,
.home-search-strip button {
  color: #04110c;
  background: linear-gradient(135deg, #34d399, #14b8a6);
  box-shadow: 0 14px 36px rgba(20, 184, 166, 0.24);
}

.ghost-btn,
.section-link,
.filter-reset {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.primary-btn:hover,
.ghost-btn:hover,
.filter-reset:hover,
.home-search-strip button:hover,
.section-link:hover {
  transform: translateY(-2px);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

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

.home-search-strip {
  width: min(1180px, calc(100% - 32px));
  margin: -38px auto 0;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.home-search-strip form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.home-search-strip input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 12px 16px;
  outline: none;
}

.home-search-strip a {
  display: grid;
  place-items: center;
  padding: 0 18px;
  border-radius: 999px;
  color: #b7f7dd;
  background: rgba(16, 185, 129, 0.12);
}

.content-section,
.page-main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

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

.page-main {
  padding: 34px 0 74px;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.player-section h2,
.detail-copy h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

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

.section-heading p,
.page-hero p,
.detail-copy p,
.category-card p,
.category-tile strong {
  margin: 6px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.035));
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, 0.38);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.26);
}

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

.poster-link img,
.rank-cover img,
.detail-cover img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(245, 158, 11, 0.88);
  font-weight: 800;
  font-size: 12px;
}

.card-body {
  padding: 16px;
}

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

.card-body p {
  margin: 0 0 14px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card.compact .card-body p {
  -webkit-line-clamp: 2;
}

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

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

.category-tile,
.category-card a {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.25), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card a {
  min-height: 210px;
}

.category-tile:hover,
.category-card a:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.34);
}

.category-tile span,
.category-card span {
  color: #b7f7dd;
  font-weight: 800;
}

.category-card h2 {
  margin: 0;
  font-size: 28px;
}

.rank-section {
  padding-top: 86px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 96px 1fr;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.055);
}

.rank-number {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #052e1f;
  background: linear-gradient(135deg, #facc15, #34d399);
  font-weight: 900;
}

.rank-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

.rank-content h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-content p {
  margin: 0 0 10px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-hero,
.detail-hero {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.2), transparent 40%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  box-shadow: var(--shadow);
}

.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: clamp(28px, 5vw, 56px);
}

.page-hero.slim {
  min-height: 240px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  color: #86efac;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
}

.breadcrumb a {
  color: #a7f3d0;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 220px auto;
  gap: 12px;
  margin: 26px 0 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.055);
}

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

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

.empty-result {
  display: none;
  margin: 34px 0 0;
  color: var(--muted);
  text-align: center;
}

.empty-result.is-visible {
  display: block;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: clamp(22px, 4vw, 54px);
  padding: clamp(20px, 4vw, 42px);
}

.detail-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  background: #111827;
}

.detail-info h1 {
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.05;
}

.detail-info .lead {
  margin: 16px 0 22px;
  color: #dbeafe;
  font-size: 20px;
}

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

.detail-meta li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.detail-meta span {
  color: var(--muted);
}

.player-section,
.detail-copy,
.related-section {
  margin-top: 48px;
}

.player-section h2,
.detail-copy h2 {
  font-size: clamp(24px, 4vw, 38px);
  margin-bottom: 18px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  color: #ffffff;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.64));
  cursor: pointer;
  z-index: 4;
}

.player-box.is-playing .play-overlay {
  display: none;
}

.play-icon {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: linear-gradient(135deg, #34d399, #14b8a6);
  box-shadow: 0 16px 44px rgba(20, 184, 166, 0.34);
  position: relative;
}

.play-icon::after {
  content: "";
  position: absolute;
  top: 24px;
  left: 31px;
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 22px solid #042015;
}

.detail-copy {
  padding: clamp(24px, 5vw, 46px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.055);
}

.detail-copy p {
  font-size: 18px;
  margin-bottom: 26px;
}

.site-footer {
  margin-top: 78px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
}

.footer-inner p {
  color: var(--muted);
  margin: 10px 0 0;
}

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

.footer-links a {
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

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

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

  .rank-list {
    grid-template-columns: 1fr;
  }

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

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

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

  .header-inner {
    padding-inline: 16px;
  }

  .hero-carousel {
    min-height: 76vh;
  }

  .hero-slide {
    background-image:
      linear-gradient(180deg, rgba(4, 8, 18, 0.6), rgba(4, 8, 18, 0.95)),
      var(--hero-image);
  }

  .hero-content {
    width: calc(100% - 32px);
    margin: 0 auto;
    padding-top: 120px;
  }

  .hero-actions {
    display: grid;
    gap: 10px;
  }

  .home-search-strip,
  .home-search-strip form,
  .page-hero,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .home-search-strip {
    margin-top: -26px;
  }

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

  .card-body {
    padding: 13px;
  }

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

  .rank-item {
    grid-template-columns: 46px 72px 1fr;
    gap: 10px;
  }

  .rank-number {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

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

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

  .player-box {
    border-radius: 18px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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

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