:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --teal-500: #14b8a6;
  --white: #ffffff;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow-soft: 0 18px 55px rgba(15, 23, 42, 0.14);
  --shadow-card: 0 14px 40px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--slate-900);
  background: var(--slate-50);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: var(--white);
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--emerald-400), var(--teal-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand {
  font-size: 22px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-950);
  border-radius: 10px;
  background: linear-gradient(135deg, var(--emerald-400), var(--teal-500));
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.25);
}

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

.desktop-nav a,
.nav-dropdown button,
.mobile-panel a {
  border: 0;
  color: var(--slate-200);
  border-radius: 12px;
  background: transparent;
  padding: 10px 14px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.nav-dropdown button:hover,
.mobile-panel a:hover {
  color: var(--white);
  background: rgba(51, 65, 85, 0.95);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 210px;
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 16px;
  background: var(--slate-800);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  padding: 9px 12px;
}

.nav-search {
  display: flex;
  overflow: hidden;
  width: 260px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: var(--slate-800);
}

.nav-search input,
.mobile-search input {
  min-width: 0;
  width: 100%;
  color: var(--white);
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 12px;
}

.nav-search input::placeholder,
.mobile-search input::placeholder {
  color: var(--slate-300);
}

.nav-search button,
.mobile-search button {
  border: 0;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--emerald-400), var(--teal-500));
  padding: 0 14px;
  cursor: pointer;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: var(--white);
  border: 0;
  border-radius: 12px;
  background: var(--slate-800);
  padding: 10px 12px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-search {
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  background: var(--slate-800);
}

.hero-slider {
  position: relative;
  height: 78vh;
  min-height: 560px;
  overflow: hidden;
  color: var(--white);
  background: var(--slate-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  transform: scale(1.02);
  background-position: center;
  background-size: cover;
  transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 72px;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 36px;
  align-items: end;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--emerald-400);
  border: 1px solid rgba(52, 211, 153, 0.35);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
}

.hero-title {
  max-width: 780px;
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-desc {
  max-width: 760px;
  color: var(--slate-200);
  font-size: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--emerald-400), var(--teal-500));
  box-shadow: 0 14px 34px rgba(20, 184, 166, 0.32);
}

.btn-secondary {
  color: var(--white);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.22);
}

.hero-panel {
  padding: 22px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.hero-panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.hero-mini-list {
  display: grid;
  gap: 12px;
}

.hero-mini-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(51, 65, 85, 0.62);
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-mini-item:hover {
  transform: translateX(4px);
  background: rgba(51, 65, 85, 0.92);
}

.hero-mini-item img {
  width: 64px;
  height: 84px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-mini-item strong,
.hero-mini-item em {
  display: block;
}

.hero-mini-item em {
  color: var(--slate-300);
  font-size: 13px;
  font-style: normal;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-controls button {
  width: 42px;
  height: 42px;
  color: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

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

.hero-dots button {
  width: 28px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.5);
}

.hero-dots button.is-active {
  background: var(--emerald-400);
}

.page-hero,
.detail-hero {
  color: var(--white);
  background: radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.22), transparent 28%), linear-gradient(135deg, var(--slate-900), var(--slate-950));
}

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

.page-hero-inner {
  padding: 70px 0 64px;
}

.page-hero h1,
.detail-copy h1 {
  max-width: 850px;
  margin: 10px 0 14px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.page-hero p,
.detail-copy p {
  max-width: 820px;
  color: var(--slate-200);
  font-size: 17px;
}

.section {
  padding: 70px 0;
}

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

.section-title {
  margin: 12px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-subtitle {
  max-width: 660px;
  color: var(--slate-600);
  margin-top: 8px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--slate-200);
}

.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-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  color: var(--slate-950);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald-400), var(--teal-500));
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--slate-500);
  font-size: 13px;
}

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

.card-body h3 a:hover {
  color: var(--emerald-600);
}

.card-body p {
  min-height: 52px;
  margin: 0 0 12px;
  color: var(--slate-600);
  font-size: 14px;
}

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

.tag-list span,
.meta-chip {
  color: var(--slate-700);
  border-radius: 999px;
  background: var(--slate-100);
  padding: 4px 8px;
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  align-items: end;
  border-radius: var(--radius-md);
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow-card);
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(2, 6, 23, 0.82));
}

.category-card span {
  position: relative;
  z-index: 1;
  display: block;
  padding: 18px;
  color: var(--white);
}

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

.category-card strong {
  font-size: 22px;
  line-height: 1.1;
}

.category-card em {
  color: var(--slate-200);
  margin-top: 8px;
  font-size: 13px;
  font-style: normal;
}

.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 170px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.filters input,
.filters select,
.search-main input {
  width: 100%;
  border: 1px solid var(--slate-200);
  border-radius: 13px;
  outline: 0;
  background: var(--white);
  padding: 11px 13px;
}

.filters input:focus,
.filters select:focus,
.search-main input:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.rank-section {
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.9), rgba(240, 253, 250, 0.95));
}

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

.rank-card {
  display: grid;
  grid-template-columns: auto 72px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(16, 185, 129, 0.16);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-number {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-950);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald-400), var(--teal-500));
  font-weight: 950;
}

.rank-card img {
  width: 72px;
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
}

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

.rank-card strong {
  line-height: 1.25;
}

.rank-card em {
  color: var(--slate-500);
  margin-top: 5px;
  font-size: 13px;
  font-style: normal;
}

.detail-hero {
  position: relative;
  overflow: hidden;
}

.detail-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  padding: 64px 0;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--emerald-400);
  font-size: 14px;
  font-weight: 700;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-meta span {
  color: var(--slate-100);
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.56);
  padding: 7px 12px;
  font-size: 14px;
}

.player-wrap {
  overflow: hidden;
  border-radius: 24px;
  background: var(--slate-950);
  box-shadow: var(--shadow-soft);
}

.player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--slate-950);
}

.player-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--slate-950);
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.75));
  cursor: pointer;
  z-index: 4;
}

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

.play-icon {
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald-400), var(--teal-500));
  box-shadow: 0 20px 42px rgba(16, 185, 129, 0.36);
  color: var(--slate-950);
  font-size: 34px;
  text-indent: 4px;
}

.player-title {
  padding: 18px 20px;
  color: var(--white);
  border-top: 1px solid rgba(226, 232, 240, 0.08);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 340px;
  gap: 28px;
  align-items: start;
}

.article-panel,
.side-panel,
.search-main {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.article-panel {
  padding: 28px;
}

.article-panel h2,
.side-panel h2,
.search-main h2 {
  margin: 0 0 14px;
  font-size: 24px;
  line-height: 1.2;
}

.article-panel p {
  color: var(--slate-700);
  margin: 0 0 18px;
}

.side-panel {
  padding: 20px;
}

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

.related-card a {
  display: block;
}

.related-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
}

.related-card span {
  display: block;
  margin-top: 8px;
  font-weight: 800;
  line-height: 1.25;
}

.search-main {
  padding: 24px;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 22px;
}

.search-box button {
  border: 0;
  border-radius: 13px;
  padding: 0 20px;
  background: linear-gradient(135deg, var(--emerald-400), var(--teal-500));
  font-weight: 900;
  cursor: pointer;
}

.no-result {
  display: none;
  color: var(--slate-500);
  padding: 26px;
  text-align: center;
}

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

.site-footer {
  color: var(--slate-300);
  background: var(--slate-900);
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
  padding: 44px 0 28px;
}

.footer-brand {
  font-size: 22px;
}

.site-footer h2 {
  color: var(--white);
  margin: 0 0 12px;
  font-size: 16px;
}

.site-footer p,
.site-footer ul {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: var(--emerald-400);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(226, 232, 240, 0.12);
  color: var(--slate-500);
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-panel {
    display: none;
  }

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

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

@media (max-width: 760px) {
  .hero-slider {
    height: 72vh;
    min-height: 560px;
  }

  .hero-content {
    align-items: center;
  }

  .hero-desc,
  .page-hero p,
  .detail-copy p {
    font-size: 15px;
  }

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

  .rank-card {
    grid-template-columns: auto 64px minmax(0, 1fr);
  }

  .section-header {
    display: block;
  }

  .detail-shell {
    padding: 38px 0;
  }

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

  .article-panel {
    padding: 20px;
  }

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

  .search-box button {
    min-height: 44px;
  }
}

@media (max-width: 520px) {
  .nav-shell {
    min-height: 64px;
  }

  .brand {
    font-size: 18px;
  }

  .hero-title,
  .page-hero h1,
  .detail-copy h1 {
    letter-spacing: -0.03em;
  }

  .hero-actions,
  .detail-actions {
    display: grid;
  }
}
