:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.74);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --subtle: #64748b;
  --cyan: #06b6d4;
  --cyan-soft: #22d3ee;
  --blue: #3b82f6;
  --yellow: #eab308;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(6, 182, 212, 0.22), transparent 34rem),
    radial-gradient(circle at 90% 8%, rgba(59, 130, 246, 0.18), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(20px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: #ffffff;
  box-shadow: 0 12px 36px rgba(6, 182, 212, 0.32);
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(360px, 26vw);
}

.header-search input,
.mobile-search input,
.wide-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.26);
  outline: none;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  color: var(--text);
  padding: 11px 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(34, 211, 238, 0.9);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
  background: rgba(15, 23, 42, 0.95);
}

.header-search button,
.mobile-search button,
.wide-search button {
  border: 0;
  border-radius: 14px;
  padding: 11px 17px;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  font-weight: 750;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.wide-search button:hover,
.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 99px;
  background: #e2e8f0;
}

.mobile-panel {
  display: none;
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto 18px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-panel nav {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

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

.hero-carousel {
  position: relative;
  height: min(72vh, 760px);
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.7) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.15) 45%, rgba(2, 6, 23, 0.08) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1480px) / 2));
  right: max(24px, calc((100vw - 1480px) / 2));
  bottom: 82px;
  max-width: 760px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 13px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
  font-size: 14px;
  font-weight: 750;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero-content p,
.page-hero p,
.detail-info p {
  margin: 22px 0 0;
  max-width: 760px;
  color: #cbd5e1;
  font-size: clamp(16px, 2.2vw, 21px);
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 15px;
  font-weight: 800;
  transition: transform 0.2s ease, filter 0.2s ease, border 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: #ffffff;
  box-shadow: 0 16px 40px rgba(6, 182, 212, 0.26);
}

.ghost-btn {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.58);
  color: #e2e8f0;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.44);
  color: #ffffff;
  font-size: 32px;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(6, 182, 212, 0.7);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
  width: 34px;
  background: #22d3ee;
}

.hero-search-panel,
.content-section,
.page-main,
.site-footer {
  width: min(1480px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.hero-search-panel {
  margin-top: -46px;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: center;
  gap: 24px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-search-panel span {
  color: #67e8f9;
  font-weight: 800;
}

.hero-search-panel h2 {
  margin: 4px 0 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.18;
}

.wide-search {
  display: flex;
  gap: 10px;
}

.content-section {
  padding: 72px 0 0;
}

.page-main {
  padding-top: 36px;
}

.section-head,
.feature-head,
.category-card-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.section-head h2,
.feature-head h2,
.category-card-head h2,
.detail-article h2,
.detail-side h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-head a,
.feature-head a,
.category-card-head a {
  color: #67e8f9;
  font-weight: 800;
  white-space: nowrap;
}

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

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.38));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border 0.22s ease, box-shadow 0.22s ease;
}

.card-link:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.58);
  box-shadow: 0 24px 60px rgba(6, 182, 212, 0.16);
}

.poster-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

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

.card-link:hover .poster-frame img,
.small-tile:hover img,
.ranking-item a:hover img {
  transform: scale(1.06);
  filter: saturate(1.15);
}

.poster-glow {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 40px;
  background: rgba(2, 6, 23, 0);
  opacity: 0;
  transition: opacity 0.22s ease, background 0.22s ease;
}

.card-link:hover .poster-glow {
  opacity: 1;
  background: rgba(2, 6, 23, 0.34);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  min-width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #eab308, #f97316);
  color: #0f172a;
  font-weight: 900;
}

.card-body {
  padding: 18px;
}

.card-meta,
.ranking-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta span,
.ranking-meta span,
.detail-meta span,
.detail-meta strong {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
}

.detail-meta strong,
.ranking-meta strong {
  color: #fde68a;
  background: rgba(234, 179, 8, 0.14);
}

.card-body h2 {
  margin: 12px 0 8px;
  font-size: 19px;
  line-height: 1.32;
}

.card-body p {
  display: -webkit-box;
  min-height: 52px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.card-tags span,
.tag-cloud span {
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.12);
  color: #67e8f9;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
}

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

.category-feature,
.category-overview-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.58);
  padding: 22px;
}

.category-feature p,
.category-overview-card p {
  color: var(--muted);
  margin: 0 0 18px;
}

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

.small-tile {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  min-height: 132px;
  background: #0f172a;
}

.small-tile img {
  width: 100%;
  height: 100%;
  min-height: 132px;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.small-tile span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 32px 12px 12px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), transparent);
}

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

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

.ranking-item a {
  display: grid;
  grid-template-columns: 42px 112px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 132px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.62);
  padding: 12px;
  transition: transform 0.22s ease, border 0.22s ease;
}

.ranking-item a:hover {
  transform: translateY(-3px);
  border-color: rgba(234, 179, 8, 0.48);
}

.ranking-number {
  font-size: 28px;
  font-weight: 900;
  color: #fde68a;
  text-align: center;
}

.ranking-item img {
  width: 112px;
  height: 92px;
  border-radius: 16px;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.ranking-item h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.ranking-item p {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-top: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 30px;
  padding: clamp(36px, 6vw, 76px);
  background:
    radial-gradient(circle at 88% 10%, rgba(34, 211, 238, 0.22), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.58));
  box-shadow: var(--shadow);
}

.compact-hero h1,
.category-hero h1 {
  font-size: clamp(34px, 4vw, 58px);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  margin-bottom: 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  margin: 12px 0 22px;
}

.breadcrumb a {
  color: #67e8f9;
  font-weight: 750;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: stretch;
}

.player-shell {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-video,
.player-cover,
.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  object-fit: contain;
  background: #000000;
}

.player-cover {
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: #020617;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  object-fit: cover;
  filter: brightness(0.58) saturate(1.12);
}

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

.play-ring {
  position: relative;
  z-index: 4;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: #ffffff;
  font-size: 34px;
  box-shadow: 0 20px 50px rgba(6, 182, 212, 0.36);
}

.detail-info {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.68);
  padding: clamp(24px, 4vw, 38px);
}

.detail-info h1 {
  font-size: clamp(30px, 4vw, 52px);
}

.detail-meta {
  margin-top: 24px;
}

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

.detail-article,
.detail-side {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.58);
  padding: clamp(22px, 4vw, 36px);
}

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

.detail-article p {
  margin: 14px 0 0;
  color: #cbd5e1;
  font-size: 18px;
}

.detail-side dl {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
}

.detail-side dt {
  color: var(--subtle);
  font-size: 13px;
}

.detail-side dd {
  margin: 3px 0 0;
  color: #e2e8f0;
  font-weight: 700;
}

.site-footer {
  margin-top: 86px;
  padding: 44px 0 32px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.site-footer p {
  max-width: 560px;
  color: var(--muted);
}

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

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: #67e8f9;
}

.footer-bottom {
  margin-top: 34px;
  color: var(--subtle);
  font-size: 14px;
}

.search-page-form {
  margin-top: 26px;
  max-width: 780px;
}

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

.empty-state {
  grid-column: 1 / -1;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  padding: 36px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.58);
}

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

  .header-search {
    width: min(460px, 42vw);
  }

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

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

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

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

  .header-search {
    display: none;
  }

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

  body.menu-open .mobile-panel {
    display: block;
  }

  .hero-carousel {
    height: 620px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 86px;
  }

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

  .wide-search,
  .mobile-search {
    flex-direction: column;
  }

  .section-head,
  .feature-head,
  .category-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .feature-grid,
  .overview-grid,
  .ranking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .player-shell {
    min-height: 260px;
  }

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

@media (max-width: 580px) {
  .header-inner,
  .mobile-panel,
  .hero-search-panel,
  .content-section,
  .page-main,
  .site-footer {
    width: min(100% - 24px, 1480px);
  }

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

  .logo-mark {
    width: 34px;
    height: 34px;
  }

  .hero-carousel {
    min-height: 560px;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .feature-grid,
  .overview-grid,
  .ranking-grid,
  .small-grid {
    grid-template-columns: 1fr;
  }

  .ranking-item a {
    grid-template-columns: 34px 86px minmax(0, 1fr);
  }

  .ranking-item img {
    width: 86px;
    height: 78px;
  }

  .card-body h2 {
    font-size: 18px;
  }
}
