* {
  box-sizing: border-box;
}

:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-solid: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --brand: #10b981;
  --brand-2: #34d399;
  --brand-dark: #064e3b;
  --gold: #fbbf24;
  --shadow: 0 22px 70px rgba(2, 6, 23, 0.45);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1420px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #042f2e;
  background: linear-gradient(135deg, var(--brand-2), #a7f3d0);
  box-shadow: 0 12px 35px rgba(16, 185, 129, 0.35);
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--soft);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  border-color: rgba(16, 185, 129, 0.28);
  background: rgba(16, 185, 129, 0.12);
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 190px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--soft);
}

.dropdown-menu a:hover {
  color: #fff;
  background: rgba(16, 185, 129, 0.12);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 310px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

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

.header-search button,
.big-search button,
.btn-primary {
  color: #04111f;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.28);
}

.header-search button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
}

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

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  border-radius: 2px;
}

.hero-shell {
  position: relative;
  width: min(1420px, calc(100% - 32px));
  min-height: 650px;
  margin: 28px auto 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 34px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-track,
.hero-slide {
  min-height: 650px;
}

.hero-slide {
  display: none;
  position: relative;
  grid-template-columns: minmax(0, 1fr) 390px;
  align-items: center;
  gap: 56px;
  padding: 78px 82px;
  background-position: center;
  background-size: cover;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeUp 0.6s ease both;
}

.hero-copy {
  max-width: 720px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--brand-2);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0 0 22px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  color: #fff;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.9;
}

.hero-tags,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.hero-tags span,
.detail-meta span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.58);
}

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

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

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

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.58);
}

.btn-ghost:hover {
  border-color: rgba(52, 211, 153, 0.50);
}

.hero-poster {
  display: block;
  border-radius: 30px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.20), rgba(255, 255, 255, 0.04));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.9);
}

.hero-control {
  position: absolute;
  right: 34px;
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(14px);
}

.hero-control button {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  cursor: pointer;
}

.hero-control > button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 24px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.55;
}

.hero-dot.is-active {
  width: 30px;
  opacity: 1;
  background: var(--brand-2);
}

.section-pad {
  width: min(1420px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
}

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

.section-heading h2,
.search-card-large h2,
.panel-card h2,
.detail-section h2,
.side-card h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.2;
  color: #fff;
}

.link-more {
  color: var(--brand-2);
  font-weight: 700;
}

.search-card-large,
.panel-card,
.filter-panel,
.category-overview-card,
.side-card,
.detail-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 55px rgba(2, 6, 23, 0.25);
  backdrop-filter: blur(18px);
}

.search-card-large {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.7fr);
  align-items: center;
  gap: 28px;
  padding: 32px;
}

.search-card-large p,
.panel-card p,
.detail-section p,
.category-overview-card p {
  color: var(--muted);
  line-height: 1.85;
}

.big-search {
  display: flex;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.48);
}

.big-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 0 14px;
}

.big-search button {
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 800;
}

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

.category-tile {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background-position: center;
  background-size: cover;
  box-shadow: 0 16px 42px rgba(2, 6, 23, 0.25);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 211, 153, 0.42);
}

.category-tile span {
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 800;
}

.category-tile strong {
  color: #fff;
  font-size: 22px;
}

.category-tile em {
  color: var(--soft);
  font-style: normal;
  font-size: 14px;
  line-height: 1.6;
}

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

.movie-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 45px rgba(2, 6, 23, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.poster-wrap {
  position: relative;
  display: block;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.18), rgba(15, 23, 42, 0.9));
}

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

.poster-score,
.rank-badge {
  position: absolute;
  top: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.poster-score {
  right: 10px;
  color: #042f2e;
  background: var(--brand-2);
}

.rank-badge {
  left: 10px;
  color: #111827;
  background: var(--gold);
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 17px;
  line-height: 1.35;
}

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

.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-pill {
  display: inline-flex;
  padding: 5px 8px;
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.08);
  font-size: 12px;
}

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

.panel-card {
  padding: 28px;
}

.accent-panel {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.20), rgba(15, 23, 42, 0.78));
}

.mini-list,
.rank-strip {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.mini-list a,
.rank-strip a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.38);
}

.mini-list span,
.rank-strip span {
  color: #fff;
  font-weight: 700;
}

.mini-list em,
.rank-strip em {
  color: var(--brand-2);
  font-style: normal;
  white-space: nowrap;
}

.rank-strip strong {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #052e2b;
  background: var(--brand-2);
}

.page-main,
.detail-main {
  min-height: 70vh;
}

.page-hero {
  width: min(1420px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: 70px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(34px, 5vw, 64px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.9;
}

.compact-hero,
.ranking-hero {
  background:
    radial-gradient(circle at 18% 0%, rgba(16, 185, 129, 0.28), transparent 30rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
}

.category-cover {
  min-height: 220px;
  border-radius: 18px;
  background-position: center;
  background-size: cover;
}

.category-overview-card h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 26px;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.category-samples a {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--soft);
  background: rgba(2, 6, 23, 0.44);
}

.filter-panel {
  margin-bottom: 26px;
  padding: 18px;
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(140px, 0.7fr));
  gap: 14px;
}

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

.filter-grid input,
.filter-grid select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #fff;
  outline: 0;
  background: rgba(2, 6, 23, 0.58);
  padding: 0 12px;
}

.empty-state {
  display: none;
  padding: 40px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

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

.detail-hero {
  min-height: 620px;
  display: flex;
  align-items: center;
  background-position: center;
  background-size: cover;
}

.detail-hero-inner {
  width: min(1420px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  padding: 9px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.20), rgba(255, 255, 255, 0.04));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.50);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.9);
}

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

.breadcrumb a {
  color: var(--brand-2);
}

.breadcrumb em {
  color: var(--soft);
  font-style: normal;
}

.detail-copy h1 {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(38px, 7vw, 80px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.detail-line {
  max-width: 850px;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.9;
}

.player-section {
  width: min(1180px, calc(100% - 32px));
  margin: -90px auto 0;
  position: relative;
  z-index: 4;
}

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

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-trigger {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #fff;
  border: 0;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.22), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #042f2e;
  background: var(--brand-2);
  box-shadow: 0 18px 48px rgba(16, 185, 129, 0.36);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

.detail-content,
.detail-side {
  display: grid;
  gap: 18px;
  align-content: start;
}

.detail-section,
.side-card {
  padding: 28px;
}

.detail-section p {
  color: #cbd5e1;
  font-size: 17px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 18px 0 0;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  color: #fff;
}

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

.card-small .card-desc {
  display: none;
}

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

.footer-grid {
  width: min(1420px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.7fr 1fr;
  gap: 32px;
  padding: 42px 0;
  color: var(--muted);
}

.footer-logo {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 12px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

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

.footer-links a {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.82);
}

.footer-links a:hover {
  color: var(--brand-2);
}

.footer-bottom {
  width: min(1420px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .header-search {
    display: none;
  }

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

  .hero-slide {
    grid-template-columns: 1fr 300px;
    padding: 58px 44px;
  }

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

@media (max-width: 860px) {
  .header-inner {
    min-height: 64px;
  }

  .site-nav {
    position: fixed;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

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

  .nav-dropdown,
  .dropdown-menu {
    display: none;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-shell,
  .hero-track,
  .hero-slide {
    min-height: auto;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 42px 24px 86px;
  }

  .hero-poster {
    width: min(260px, 80%);
    margin: 0 auto;
  }

  .hero-control {
    right: 50%;
    transform: translateX(50%);
  }

  .search-card-large,
  .split-section,
  .category-overview-card,
  .detail-hero-inner,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .page-hero {
    padding: 42px 24px;
  }

  .detail-hero {
    padding: 40px 0 120px;
  }

  .detail-poster {
    width: min(280px, 80%);
    margin: 0 auto;
  }

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

@media (max-width: 520px) {
  .site-logo span:last-child {
    font-size: 17px;
  }

  .section-pad,
  .hero-shell,
  .page-hero,
  .detail-hero-inner,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 20px, 1420px);
  }

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

  .big-search {
    flex-direction: column;
    border-radius: 20px;
  }

  .big-search input {
    min-height: 44px;
  }

  .hero-copy p,
  .detail-line,
  .page-hero p {
    font-size: 16px;
  }
}
