:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --violet: #8b5cf6;
  --rose: #f43f5e;
  --gold: #f59e0b;
  --green: #10b981;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.14), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-weight: 900;
  letter-spacing: 0.02em;
  font-size: 1.25rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 30px rgba(59, 130, 246, 0.35);
}

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

.desktop-nav a,
.mobile-panel a {
  color: #cbd5e1;
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-panel a:hover {
  color: #60a5fa;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
}

.header-search input {
  width: 210px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 8px 12px;
}

.header-search button,
.big-search button,
.primary-button {
  border: 0;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
  padding: 8px 14px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
}

.header-search button:hover,
.big-search button:hover,
.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(37, 99, 235, 0.38);
}

.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid rgba(226, 232, 240, 0.3);
  border-radius: 999px;
  color: #e2e8f0;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.45);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.75);
  background: rgba(37, 99, 235, 0.16);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.65);
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 99px;
  background: #e2e8f0;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.96);
}

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

.mobile-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 8px;
}

.mobile-cats a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.86);
}

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  isolation: isolate;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.34) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.35) 0%, rgba(2, 6, 23, 0.92) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.55fr);
  gap: 54px;
  align-items: center;
  min-height: 650px;
  padding: 82px 0 64px;
}

.hero-kicker,
.page-hero p,
.section-title p {
  margin: 0 0 12px;
  color: #67e8f9;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.hero h2,
.page-hero h1 {
  margin: 0;
  max-width: 820px;
  font-weight: 950;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5.8rem);
}

.hero h2 {
  margin-top: 16px;
  color: #dbeafe;
  font-size: clamp(1.6rem, 3vw, 3rem);
}

.hero-copy p {
  max-width: 720px;
  margin: 22px 0 0;
  color: #d6e3f3;
  font-size: 1.12rem;
}

.hero-tags,
.tag-row,
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-tags span,
.tag-row span,
.quick-links a {
  color: #dbeafe;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
}

.hero-tags span,
.tag-row span {
  padding: 7px 12px;
  font-size: 0.86rem;
  font-weight: 800;
}

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

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.24);
  border-radius: 30px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
  transition: transform 0.26s ease;
}

.hero-poster:hover {
  transform: rotate(0deg) translateY(-6px);
}

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

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(12px);
}

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

.hero-dots button {
  width: 32px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(226, 232, 240, 0.36);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.section-block {
  padding: 58px 0;
}

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

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

.big-search input,
.tools-row input,
.tools-row select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  outline: 0;
  background: rgba(2, 6, 23, 0.42);
  padding: 0 16px;
}

.big-search button {
  padding: 0 26px;
}

.quick-links {
  margin-top: 18px;
}

.quick-links a {
  padding: 8px 14px;
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.55rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 42px 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(-7px);
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.58);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

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

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

.quality-label,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.quality-label {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.rank-badge {
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  background: rgba(244, 63, 94, 0.82);
}

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

.card-meta-line,
.card-bottom,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 0.86rem;
}

.movie-card h3 {
  margin: 10px 0 8px;
  color: #fff;
  font-size: 1.08rem;
  line-height: 1.34;
}

.movie-card h3 a:hover {
  color: #60a5fa;
}

.movie-card p {
  min-height: 4.7em;
  margin: 0 0 14px;
  color: #b6c2d2;
  font-size: 0.93rem;
}

.card-bottom {
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.movie-card.large .poster-link img {
  aspect-ratio: 16 / 10;
}

.movie-card.horizontal {
  display: grid;
  grid-template-columns: 150px 1fr;
}

.movie-card.horizontal .poster-link img {
  height: 100%;
  aspect-ratio: auto;
}

.category-card {
  position: relative;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  overflow: hidden;
  min-height: 188px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.75);
  box-shadow: 0 20px 48px rgba(2, 6, 23, 0.25);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.55);
}

.category-card img {
  width: 150px;
  height: 148px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.42);
}

.category-card span {
  color: #93c5fd;
  font-weight: 900;
  font-size: 0.84rem;
}

.category-card h3 {
  margin: 8px 0 10px;
  font-size: 1.45rem;
}

.category-card p {
  margin: 0;
  color: #cbd5e1;
}

.tone-blue { background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(15, 23, 42, 0.78)); }
.tone-cyan { background: linear-gradient(135deg, rgba(8, 145, 178, 0.22), rgba(15, 23, 42, 0.78)); }
.tone-violet { background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(15, 23, 42, 0.78)); }
.tone-rose { background: linear-gradient(135deg, rgba(225, 29, 72, 0.22), rgba(15, 23, 42, 0.78)); }
.tone-amber { background: linear-gradient(135deg, rgba(217, 119, 6, 0.22), rgba(15, 23, 42, 0.78)); }
.tone-emerald { background: linear-gradient(135deg, rgba(5, 150, 105, 0.22), rgba(15, 23, 42, 0.78)); }
.tone-pink { background: linear-gradient(135deg, rgba(219, 39, 119, 0.22), rgba(15, 23, 42, 0.78)); }
.tone-indigo { background: linear-gradient(135deg, rgba(79, 70, 229, 0.22), rgba(15, 23, 42, 0.78)); }
.tone-orange { background: linear-gradient(135deg, rgba(234, 88, 12, 0.22), rgba(15, 23, 42, 0.78)); }
.tone-teal { background: linear-gradient(135deg, rgba(13, 148, 136, 0.22), rgba(15, 23, 42, 0.78)); }

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

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

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  padding: 54px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 20% 0%, rgba(59, 130, 246, 0.28), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.68));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(2.2rem, 6vw, 4.6rem);
}

.category-hero-text {
  max-width: 820px;
  margin-top: 18px;
  color: #cbd5e1;
  font-size: 1.08rem;
}

.tools-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: end;
  padding-top: 42px;
  padding-bottom: 10px;
}

.tools-row label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-weight: 800;
}

.empty-state {
  display: none;
  margin-top: 28px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: #cbd5e1;
  text-align: center;
  background: rgba(15, 23, 42, 0.7);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 20px 0;
  color: #94a3b8;
  font-size: 0.94rem;
}

.breadcrumb a:hover {
  color: #60a5fa;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.22), rgba(2, 6, 23, 0.72));
}

.player-start span {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  padding-left: 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.42);
  font-size: 2rem;
}

.player-start strong {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(10px);
}

.player-start.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.detail-article,
.side-panel,
.side-poster {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.23);
}

.detail-article {
  margin-top: 24px;
  padding: 30px;
}

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

.detail-article h2,
.side-panel h2 {
  margin: 30px 0 12px;
  font-size: 1.45rem;
}

.detail-article p {
  margin: 0 0 18px;
  color: #d1d9e6;
  font-size: 1.04rem;
}

.detail-tags {
  margin: 20px 0 4px;
}

.detail-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
}

.side-poster {
  overflow: hidden;
  padding: 16px;
}

.side-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 20px;
}

.side-poster .primary-button {
  width: 100%;
  margin-top: 16px;
}

.side-panel {
  padding: 22px;
}

.side-panel h2 {
  margin-top: 0;
}

.side-panel dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px 14px;
  margin: 0;
}

.side-panel dt {
  color: #94a3b8;
}

.side-panel dd {
  margin: 0;
  color: #e2e8f0;
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 36px;
  padding: 48px 0;
}

.footer-brand {
  margin-bottom: 14px;
}

.site-footer p,
.footer-links a {
  color: #94a3b8;
}

.site-footer h3 {
  margin: 0 0 12px;
}

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

.footer-links a:hover {
  color: #60a5fa;
}

.footer-bottom {
  padding: 18px;
  border-top: 1px solid var(--line);
  color: #94a3b8;
  text-align: center;
}

@media (max-width: 1040px) {
  .header-search {
    display: none;
  }

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

  .feature-grid,
  .category-grid,
  .ranking-list,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

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

  .hero,
  .hero-content {
    min-height: 760px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 54px;
  }

  .hero-poster {
    max-width: 220px;
    transform: none;
  }

  .search-panel,
  .page-hero,
  .detail-article {
    padding: 22px;
  }

  .big-search,
  .tools-row,
  .movie-card.horizontal,
  .category-card {
    grid-template-columns: 1fr;
  }

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

  .category-card img {
    width: 100%;
    height: 210px;
  }

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

@media (max-width: 480px) {
  .site-shell {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 1rem;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero h2 {
    font-size: 1.45rem;
  }

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

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

  .section-title {
    align-items: stretch;
    flex-direction: column;
  }
}
