:root {
  color-scheme: dark;
  --page-bg: #030712;
  --panel-bg: rgba(17, 24, 39, 0.82);
  --card-bg: rgba(15, 23, 42, 0.82);
  --card-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(34, 211, 238, 0.28);
  --cyan: #22d3ee;
  --pink: #f472b6;
  --purple: #a78bfa;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 24px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 10%, rgba(34, 211, 238, 0.12), transparent 34%),
    radial-gradient(circle at 86% 18%, rgba(244, 114, 182, 0.12), transparent 32%),
    linear-gradient(180deg, #020617 0%, #030712 48%, #080b18 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(3, 7, 18, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--cyan), var(--pink), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-logo {
  font-size: 24px;
}

.site-logo-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.6);
  border-radius: 50%;
  color: var(--cyan);
  background: rgba(8, 145, 178, 0.16);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.25);
  font-size: 13px;
  -webkit-text-fill-color: var(--cyan);
}

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

.nav-link,
.mobile-nav-link {
  color: var(--muted-strong);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--cyan);
}

.header-search,
.mobile-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input,
.mobile-search input,
.quick-search-panel input,
.filter-controls input,
.filter-controls select {
  width: 100%;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  width: 248px;
  padding: 10px 72px 10px 16px;
}

.header-search input:focus,
.mobile-search input:focus,
.quick-search-panel input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
  background: rgba(15, 23, 42, 0.95);
}

.header-search button,
.mobile-search button {
  position: absolute;
  right: 4px;
  top: 4px;
  bottom: 4px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #03101a;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  cursor: pointer;
  font-weight: 800;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--cyan);
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(34, 211, 238, 0.2);
  padding: 16px;
  background: rgba(3, 7, 18, 0.98);
}

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

.mobile-search {
  margin-bottom: 12px;
}

.mobile-search input {
  padding: 12px 72px 12px 16px;
}

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

.mobile-nav-link {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
}

main {
  overflow: hidden;
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
  margin-top: 68px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 45%, rgba(34, 211, 238, 0.12), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 45%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 40%);
}

.hero-content {
  position: relative;
  width: min(var(--max), calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 78px 0;
  max-width: 1180px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 16px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  box-shadow: 0 16px 32px rgba(34, 211, 238, 0.18);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.hero-content h1,
.page-hero h1 {
  margin: 18px 0 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.38);
}

.hero-content h2 {
  margin: 18px 0 0;
  font-size: clamp(28px, 4vw, 54px);
  line-height: 1.05;
  max-width: 760px;
}

.hero-content p,
.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted-strong);
  font-size: clamp(16px, 2vw, 21px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-meta span,
.detail-meta span {
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  background: rgba(15, 23, 42, 0.68);
  color: var(--muted-strong);
}

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

.primary-button,
.secondary-button,
.quick-search-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button,
.quick-search-panel button {
  color: #020617;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  box-shadow: 0 18px 46px rgba(34, 211, 238, 0.18);
}

.secondary-button {
  color: var(--text);
  border: 1px solid rgba(34, 211, 238, 0.36);
  background: rgba(15, 23, 42, 0.65);
}

.primary-button:hover,
.secondary-button:hover,
.quick-search-panel button:hover,
.movie-card:hover,
.category-tile:hover,
.category-panel:hover {
  transform: translateY(-3px);
}

.primary-button.full {
  width: 100%;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(34, 211, 238, 0.38);
  border-radius: 50%;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
  cursor: pointer;
  font-size: 34px;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 28px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.36);
  cursor: pointer;
}

.hero-dot.active {
  background: linear-gradient(90deg, var(--cyan), var(--pink));
}

.quick-search-panel,
.filter-panel,
.content-section,
.detail-layout {
  width: min(var(--max), calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-search-panel {
  margin-top: -34px;
  position: relative;
  z-index: 6;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search-panel form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.quick-search-panel input {
  min-height: 50px;
  padding: 0 18px;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.quick-links a {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.72);
  color: var(--muted-strong);
}

.content-section {
  margin-top: 76px;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading span {
  color: var(--cyan);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 8px 0 8px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.movie-grid,
.rank-grid,
.category-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.68));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(34, 211, 238, 0.56);
  box-shadow: 0 24px 70px rgba(34, 211, 238, 0.12);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.8);
}

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

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

.poster-play {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #02111b;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  box-shadow: 0 14px 36px rgba(34, 211, 238, 0.22);
  font-size: 14px;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  font-weight: 900;
}

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

.movie-card-title {
  display: block;
  min-height: 52px;
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.78);
}

.movie-card-body p {
  display: -webkit-box;
  margin: 10px 0 14px;
  min-height: 66px;
  color: var(--muted-strong);
  font-size: 14px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 5px 9px;
  border: 1px solid rgba(244, 114, 182, 0.2);
  border-radius: 999px;
  color: #fbcfe8;
  background: rgba(244, 114, 182, 0.08);
  font-size: 12px;
}

.category-tile,
.category-panel,
.rich-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 211, 238, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.62));
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile a,
.category-panel-main {
  display: block;
  padding: 24px;
}

.category-tile span,
.category-panel span {
  color: var(--cyan);
  font-weight: 900;
}

.category-tile h2,
.category-panel h2,
.rich-card h2 {
  margin: 8px 0 8px;
  font-size: 28px;
}

.category-tile p,
.category-panel p,
.rich-card p {
  margin: 0;
  color: var(--muted-strong);
}

.category-preview-links,
.category-panel-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 24px 24px;
}

.category-preview-links a,
.category-panel-links a {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(30, 41, 59, 0.72);
  font-size: 13px;
}

.page-hero {
  margin: 120px auto 0;
  width: min(var(--max), calc(100% - 32px));
  min-height: 360px;
  display: flex;
  align-items: center;
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 72% 20%, rgba(244, 114, 182, 0.18), transparent 30%),
    radial-gradient(circle at 18% 80%, rgba(34, 211, 238, 0.16), transparent 30%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.8));
  box-shadow: var(--shadow);
}

.small-hero {
  min-height: 300px;
}

.filter-panel {
  margin-top: 26px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
}

.filter-title {
  margin-bottom: 14px;
  color: var(--cyan);
  font-weight: 900;
}

.filter-controls {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  min-height: 46px;
  padding: 0 14px;
}

.filter-status {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.full-library {
  align-items: start;
}

.detail-layout {
  margin-top: 98px;
}

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

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

.player-section {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 80% 10%, rgba(244, 114, 182, 0.14), transparent 30%),
    rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
}

.player-header {
  padding: 30px 30px 22px;
}

.player-header h1 {
  margin: 14px 0 8px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.1;
}

.player-header p {
  max-width: 820px;
  margin: 0;
  color: var(--muted-strong);
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.2), transparent 26%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.74));
  cursor: pointer;
}

.play-overlay span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #020617;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  box-shadow: 0 18px 54px rgba(34, 211, 238, 0.28);
  font-size: 28px;
}

.play-overlay strong {
  font-size: 18px;
  letter-spacing: 0.1em;
}

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

.detail-main {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  margin-top: 34px;
}

.detail-poster,
.detail-content {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
}

.detail-poster {
  padding: 16px;
  height: fit-content;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 16px;
}

.detail-content {
  padding: 28px;
}

.detail-content h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.detail-content h2:not(:first-child) {
  margin-top: 28px;
}

.detail-content p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 16px;
}

.detail-tags {
  margin: 16px 0 0;
}

.related-section {
  width: 100%;
}

.about-section .rich-card {
  padding: 34px;
}

.site-footer {
  margin-top: 90px;
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.86);
}

.footer-grid {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 34px;
}

.footer-logo {
  font-size: 20px;
}

.site-footer p {
  color: var(--muted);
}

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

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

.footer-bottom {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--muted);
  border-top: 1px solid rgba(34, 211, 238, 0.16);
}

.is-filter-hidden {
  display: none;
}

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

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

  .header-search {
    display: none;
  }
}

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

  .mobile-menu-button {
    display: block;
  }

  .site-header-inner {
    height: 64px;
  }

  .hero-carousel {
    min-height: 78vh;
    margin-top: 64px;
  }

  .hero-content {
    padding-top: 64px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-panel form,
  .filter-controls,
  .detail-main,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .page-hero {
    min-height: 300px;
    padding: 32px 24px;
  }
}

@media (max-width: 560px) {
  .site-logo {
    font-size: 20px;
  }

  .hero-content h1,
  .page-hero h1 {
    font-size: 42px;
  }

  .hero-content h2 {
    font-size: 30px;
  }

  .hero-actions,
  .quick-links {
    width: 100%;
  }

  .primary-button,
  .secondary-button,
  .quick-search-panel button {
    width: 100%;
  }

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

  .movie-card-title {
    min-height: auto;
  }

  .player-header {
    padding: 22px;
  }

  .play-overlay span {
    width: 68px;
    height: 68px;
  }
}
