:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5edf8;
  --muted: #94a3b8;
  --blue: #2563eb;
  --cyan: #22d3ee;
  --gold: #facc15;
  --red: #ef4444;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.45);
  --radius: 24px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 6%, rgba(34, 211, 238, 0.16), transparent 28rem),
    radial-gradient(circle at 86% 0%, rgba(37, 99, 235, 0.22), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

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

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

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

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  box-shadow: 0 12px 34px rgba(37, 99, 235, 0.35);
}

.logo-text,
.footer-logo {
  font-size: 1.25rem;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: transform 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.menu-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: white;
}

.mobile-nav {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px 16px;
  border-top: 1px solid var(--line);
}

.mobile-nav a {
  display: block;
  padding: 12px 8px;
  color: var(--muted);
  border-radius: 12px;
}

.mobile-nav a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.06);
}

.mobile-nav.open {
  display: block;
}

main {
  overflow: hidden;
}

.hero-section {
  position: relative;
  min-height: 680px;
  display: grid;
  align-items: center;
  isolation: isolate;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.36), rgba(2, 6, 23, 0.88));
}

.hero-slider {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity 0.6s ease, transform 1.1s ease;
}

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62) 45%, rgba(2, 6, 23, 0.78)),
    linear-gradient(0deg, rgba(2, 6, 23, 1), transparent 36%);
}

.hero-content {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 86px 20px 70px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
  gap: 44px;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #bfdbfe;
  padding: 8px 12px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.16);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(2.5rem, 6vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.gradient-text {
  background: linear-gradient(90deg, #ffffff, #93c5fd 48%, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-title {
  margin: 0 0 16px;
  font-size: clamp(1.65rem, 3.3vw, 3.2rem);
  line-height: 1.08;
}

.hero-desc {
  max-width: 660px;
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 1.05rem;
}

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

.button,
.search-button {
  border: 0;
  border-radius: 14px;
  padding: 13px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button.primary,
.search-button {
  background: linear-gradient(135deg, var(--blue), #0ea5e9);
  color: white;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.3);
}

.button.secondary {
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.button:hover,
.search-button:hover {
  transform: translateY(-2px);
}

.hero-search {
  display: flex;
  max-width: 620px;
  margin-top: 28px;
  padding: 8px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.hero-search input,
.search-panel input,
.filter-input {
  width: 100%;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
  padding: 13px 14px;
  font-size: 1rem;
}

.hero-search input::placeholder,
.search-panel input::placeholder,
.filter-input::placeholder {
  color: #64748b;
}

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

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

.hero-tags a,
.tag-row span,
.meta-row span,
.detail-tag,
.category-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 0.82rem;
}

.hero-focus {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 32px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-focus img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 24px;
}

.hero-focus-body {
  padding: 20px 6px 2px;
}

.hero-focus-body h2 {
  margin: 0 0 10px;
  font-size: 1.55rem;
}

.hero-focus-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.hero-arrow,
.hero-dot {
  border: 0;
  color: white;
  background: rgba(15, 23, 42, 0.68);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.45rem;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
  opacity: 0.48;
}

.hero-dot.active {
  width: 28px;
  border-radius: 999px;
  opacity: 1;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.page-hero,
.detail-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 70px 20px 34px;
}

.page-hero h1,
.detail-title h1 {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.page-hero p,
.detail-title p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.content-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 20px;
}

.section-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
  padding: 28px;
  backdrop-filter: blur(18px);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.section-heading a {
  color: #7dd3fc;
  white-space: nowrap;
}

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

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

.movie-card {
  min-width: 0;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 24px 50px rgba(2, 6, 23, 0.38);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(34, 211, 238, 0.12));
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.score-badge,
.play-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.score-badge {
  top: 12px;
  left: 12px;
  min-width: 48px;
  height: 30px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, var(--gold));
}

.play-badge {
  right: 12px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: white;
  background: rgba(37, 99, 235, 0.86);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #93c5fd;
  font-size: 0.78rem;
  margin-bottom: 10px;
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  line-height: 1.36;
}

.movie-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.category-pill {
  margin-top: 12px;
  color: #7dd3fc;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  padding: 24px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.2), transparent 40%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.76));
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.4);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 1.45rem;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.category-count {
  display: inline-flex;
  margin-top: 20px;
  color: #bfdbfe;
  font-size: 0.9rem;
}

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

.compact-card {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 188px;
  background: #111827;
}

.compact-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  opacity: 0.7;
}

.compact-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.compact-card span,
.compact-card em {
  position: absolute;
  z-index: 2;
}

.compact-card span {
  left: 14px;
  right: 14px;
  bottom: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.compact-card em {
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  color: #111827;
  background: var(--gold);
  border-radius: 999px;
  font-style: normal;
  font-weight: 800;
}

.filter-bar,
.search-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-bottom: 24px;
}

.search-panel {
  max-width: 760px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 76px 84px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.7);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-row:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.38);
}

.rank-number {
  font-weight: 900;
  font-size: 1.4rem;
  text-align: center;
  color: #67e8f9;
}

.ranking-row img {
  width: 84px;
  height: 112px;
  object-fit: cover;
  border-radius: 14px;
}

.ranking-row h2,
.ranking-row h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.ranking-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.ranking-score {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--gold);
  padding-right: 12px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: #7dd3fc;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

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

.detail-title .meta-row {
  margin: 18px 0;
}

.detail-layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 20px 50px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.player-card,
.detail-card,
.related-card {
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-card {
  padding: 16px;
}

.movie-player {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: black;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.62));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-start {
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-size: 2.2rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 20px 48px rgba(37, 99, 235, 0.35);
}

.player-error {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: white;
  background: rgba(239, 68, 68, 0.8);
  padding: 10px 14px;
  border-radius: 12px;
}

.player-error[hidden] {
  display: none;
}

.detail-card {
  padding: 28px;
  margin-top: 24px;
}

.detail-card h2,
.related-card h2 {
  margin: 0 0 18px;
  font-size: 1.55rem;
}

.detail-card p {
  color: #cbd5e1;
  line-height: 1.96;
  margin: 0 0 18px;
}

.detail-card .tag-row {
  margin-top: 20px;
}

.related-card {
  padding: 22px;
  position: sticky;
  top: 90px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.related-item img {
  width: 68px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
}

.related-item h3 {
  margin: 0 0 6px;
  font-size: 0.98rem;
}

.related-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

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

.no-results {
  color: var(--muted);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
}

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

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 20px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 38px;
}

.footer-grid p {
  max-width: 430px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-grid h2 {
  font-size: 1rem;
  margin: 0 0 16px;
}

.footer-grid a:not(.footer-logo) {
  display: block;
  color: var(--muted);
  margin: 10px 0;
}

.footer-grid a:hover {
  color: white;
}

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 20px 30px;
  color: #64748b;
  border-top: 1px solid var(--line);
}

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

  .menu-button {
    display: inline-flex;
  }

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

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

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

  .related-card {
    position: static;
  }
}

@media (max-width: 720px) {
  .hero-section {
    min-height: 760px;
  }

  .hero-content {
    padding-top: 56px;
    gap: 28px;
  }

  .hero-search,
  .filter-bar,
  .search-panel {
    flex-direction: column;
    align-items: stretch;
  }

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

  .movie-grid,
  .movie-grid.small,
  .search-results,
  .category-grid,
  .compact-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ranking-row img {
    width: 72px;
    height: 96px;
  }

  .ranking-score {
    grid-column: 2 / 4;
    padding: 0 0 4px;
  }

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

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

  .header-inner,
  .content-section,
  .page-hero,
  .detail-hero,
  .detail-layout {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-controls {
    bottom: 16px;
  }
}
