* {
  box-sizing: border-box;
}

:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.84);
  --panel-solid: #111827;
  --line: rgba(148, 163, 184, 0.16);
  --muted: #94a3b8;
  --text: #f8fafc;
  --text-soft: #cbd5e1;
  --emerald: #10b981;
  --emerald-strong: #059669;
  --yellow: #facc15;
  --orange: #f97316;
  --blue: #3b82f6;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(30, 41, 59, 0.95));
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.96));
  box-shadow: 0 14px 35px rgba(2, 6, 23, 0.32);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald), #34d399);
  color: #052e2b;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.32);
}

.brand-text {
  font-size: 21px;
}

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

.nav-link,
.nav-drop-button {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-drop-button:hover {
  color: #ffffff;
  background: rgba(148, 163, 184, 0.12);
}

.nav-dropdown {
  position: relative;
}

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

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

.dropdown-panel a,
.mobile-categories a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-soft);
}

.dropdown-panel a:hover,
.mobile-categories a:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #ffffff;
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  width: min(330px, 30vw);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
  overflow: hidden;
}

.header-search input,
.mobile-search input,
.filter-input,
.filter-select {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
}

.header-search input {
  padding: 10px 14px;
}

.header-search button {
  width: 42px;
  border: 0;
  color: var(--emerald);
  background: transparent;
  cursor: pointer;
  font-size: 21px;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  color: #ffffff;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 16px 18px;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-link {
  display: block;
  padding: 12px 8px;
  color: var(--text-soft);
}

.mobile-link.is-active {
  color: #ffffff;
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.mobile-search input {
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.8);
}

.mobile-search button,
.primary-button,
.secondary-button,
.filter-button,
.play-trigger {
  border: 0;
  cursor: pointer;
}

.mobile-search button {
  padding: 0 16px;
  border-radius: 12px;
  background: var(--emerald);
  color: #ffffff;
}

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

.hero-slider {
  position: relative;
  min-height: 560px;
  margin: 0 0 56px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.52);
}

.hero-track {
  position: relative;
  height: min(74vh, 650px);
  min-height: 540px;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.72) 38%, rgba(2, 6, 23, 0.24) 72%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, transparent 45%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1280px) / 2 + 32px));
  right: max(32px, calc((100vw - 1280px) / 2 + 32px));
  bottom: 64px;
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.92);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-content p {
  margin: 0 0 22px;
  max-width: 680px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-soft);
}

.hero-meta {
  margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span,
.card-stats span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.56);
}

.hero-actions,
.section-head,
.category-card-head,
.breadcrumbs,
.detail-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  background: var(--emerald);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(16, 185, 129, 0.28);
}

.secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.65);
  color: #ffffff;
}

.primary-button:hover,
.secondary-button:hover,
.filter-button:hover {
  transform: translateY(-2px);
}

.primary-button:hover {
  background: var(--emerald-strong);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 42px;
  display: flex;
  gap: 10px;
}

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

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

.section {
  margin: 56px 0;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.54);
  box-shadow: 0 22px 52px rgba(2, 6, 23, 0.45);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

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

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

.poster-badge,
.poster-score {
  position: absolute;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.poster-badge {
  left: 10px;
  top: 10px;
  background: rgba(16, 185, 129, 0.86);
}

.poster-score {
  right: 10px;
  bottom: 10px;
  background: rgba(2, 6, 23, 0.78);
}

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

.movie-card-meta {
  color: var(--muted);
  font-size: 13px;
}

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

.movie-card h3 a:hover {
  color: #6ee7b7;
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 13px;
  overflow: hidden;
  color: var(--text-soft);
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-soft);
  font-size: 12px;
}

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

.category-card {
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.82));
  box-shadow: 0 16px 46px rgba(2, 6, 23, 0.26);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.5);
}

.category-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--emerald), var(--blue));
  color: #ffffff;
  font-weight: 900;
}

.category-card h2,
.category-card h3 {
  margin: 18px 0 8px;
}

.category-card p {
  margin: 0 0 12px;
  color: var(--text-soft);
  line-height: 1.7;
}

.category-count {
  color: #6ee7b7;
  font-weight: 800;
}

.page-hero {
  margin: 32px 0 34px;
  padding: 44px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(59, 130, 246, 0.08)),
    rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 5vw, 54px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 860px;
  margin: 0;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.85;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
  gap: 12px;
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
}

.filter-input,
.filter-select {
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.86);
}

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

.filter-button {
  padding: 0 18px;
  border-radius: 12px;
  background: var(--emerald);
  color: #ffffff;
  font-weight: 800;
}

.result-line {
  margin: 0 0 18px;
  color: var(--muted);
}

.empty-state {
  display: none;
  padding: 32px;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  border-radius: 18px;
  color: var(--text-soft);
  text-align: center;
}

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

.ranking-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.82);
}

.ranking-row {
  display: grid;
  grid-template-columns: 54px 110px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease;
}

.ranking-row:last-child {
  border-bottom: 0;
}

.ranking-row:hover {
  background: rgba(148, 163, 184, 0.08);
}

.rank-number {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--text-soft);
  font-weight: 900;
}

.rank-number.top-rank {
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  color: #111827;
}

.ranking-row img {
  width: 110px;
  height: 68px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-info {
  min-width: 0;
}

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

.rank-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info em {
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

.rank-score {
  color: var(--yellow);
  font-weight: 900;
}

.breadcrumbs {
  width: min(1280px, calc(100% - 32px));
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: #6ee7b7;
}

.detail-page {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 64px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(310px, 0.92fr);
  gap: 28px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 28px 78px rgba(2, 6, 23, 0.5);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.68));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-trigger {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.95);
  color: #ffffff;
  font-size: 34px;
  box-shadow: 0 18px 42px rgba(16, 185, 129, 0.36);
}

.detail-card,
.content-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 18px 46px rgba(2, 6, 23, 0.26);
}

.content-panel {
  margin-top: 24px;
  padding: 28px;
}

.content-panel h1,
.content-panel h2 {
  margin-top: 0;
}

.content-panel h1 {
  margin-bottom: 12px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.content-panel p {
  color: var(--text-soft);
  line-height: 1.9;
}

.detail-card {
  overflow: hidden;
}

.detail-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.detail-card-body {
  padding: 22px;
}

.detail-card-body h2 {
  margin: 0 0 12px;
}

.detail-card-body p {
  color: var(--text-soft);
  line-height: 1.8;
}

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

.mini-movie {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.55);
}

.mini-movie:hover {
  border-color: rgba(16, 185, 129, 0.5);
}

.mini-movie img {
  width: 88px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
}

.mini-movie span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-movie em {
  color: var(--yellow);
  font-style: normal;
  font-weight: 900;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.98));
}

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

.footer-inner h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

.footer-inner p,
.footer-inner li {
  color: var(--muted);
  line-height: 1.8;
}

.footer-inner ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-inner a:hover {
  color: #6ee7b7;
}

.footer-logo {
  margin-bottom: 16px;
}

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

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

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

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

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

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

@media (max-width: 760px) {
  .main,
  .detail-page,
  .breadcrumbs,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1280px);
  }

  .hero-slider {
    margin-left: -12px;
    margin-right: -12px;
    min-height: 520px;
  }

  .hero-track {
    min-height: 520px;
  }

  .hero-content {
    left: 22px;
    right: 22px;
    bottom: 70px;
  }

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

  .hero-dots {
    left: 22px;
    right: auto;
    bottom: 32px;
  }

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

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

  .page-hero,
  .content-panel {
    padding: 24px;
  }

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

  .ranking-row {
    grid-template-columns: 36px 82px minmax(0, 1fr);
  }

  .ranking-row img {
    width: 82px;
    height: 54px;
  }

  .rank-score {
    grid-column: 3;
  }

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

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

@media (max-width: 460px) {
  .brand-text {
    font-size: 18px;
  }

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

  .hero-content h1,
  .hero-content h2 {
    font-size: 34px;
  }

  .mini-movie {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .mini-movie em {
    grid-column: 2;
  }
}
