:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --teal: #14b8a6;
  --emerald: #34d399;
  --accent: linear-gradient(135deg, #06b6d4, #14b8a6);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 5%, rgba(20, 184, 166, 0.16), transparent 32rem),
    radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.12), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

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

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

main {
  min-height: 70vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(30, 41, 59, 0.9);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(20, 184, 166, 0.24);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 18px 34px rgba(34, 211, 238, 0.28);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.03em;
}

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 0;
}

.nav-link {
  color: var(--soft);
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  transition: color 0.2s ease;
}

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

.nav-category {
  color: var(--muted);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.large-search input,
.catalog-tools input {
  width: 240px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.88);
  color: var(--text);
  outline: none;
  padding: 11px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.large-search input:focus,
.catalog-tools input:focus {
  border-color: rgba(34, 211, 238, 0.74);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.header-search button,
.large-search button,
.mobile-nav button {
  border: 0;
  border-radius: 14px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 700;
  padding: 11px 16px;
}

.mobile-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
  font-size: 28px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-nav a {
  color: var(--soft);
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.mobile-nav form {
  display: flex;
  gap: 8px;
}

.mobile-nav input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  padding: 10px 12px;
}

.hero {
  position: relative;
}

.hero-stage {
  position: relative;
  height: 72vh;
  min-height: 560px;
  overflow: hidden;
  background: #0f172a;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.02) contrast(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.92) 34%, rgba(2, 6, 23, 0.46) 68%, rgba(2, 6, 23, 0.12) 100%),
    linear-gradient(0deg, #020617 0%, transparent 28%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  bottom: 80px;
  width: min(660px, calc(100% - 64px));
  z-index: 2;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(36px, 5.2vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-movie-name {
  display: block;
  margin-top: 14px;
  color: #e2e8f0;
  font-size: clamp(20px, 2.2vw, 32px);
}

.hero-content p {
  max-width: 620px;
  margin: 20px 0 0;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.8;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.12);
  color: #a5f3fc;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 11px;
}

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

.primary-button,
.ghost-button,
.tool-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 800;
  padding: 12px 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  background: var(--accent);
  color: white;
  box-shadow: 0 18px 36px rgba(20, 184, 166, 0.24);
}

.ghost-button,
.tool-link {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.66);
  color: var(--soft);
}

.primary-button:hover,
.ghost-button:hover,
.tool-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  color: white;
  cursor: pointer;
  font-size: 30px;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.36);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.quick-panel,
.content-section,
.catalog-tools,
.detail-main,
.footer-grid,
.footer-bottom,
.page-hero,
.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 24px;
  margin-top: -46px;
  position: relative;
  z-index: 8;
}

.quick-search-card,
.home-category-card,
.article-card,
.side-card,
.player-card,
.category-overview-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.quick-search-card {
  padding: 28px;
}

.quick-search-card h2,
.section-head h2,
.article-card h2,
.side-card h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.quick-search-card p,
.section-head p,
.page-hero p,
.article-card p,
.site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

.large-search {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.large-search input {
  flex: 1;
  width: auto;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
}

.category-pills a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.86);
  color: var(--soft);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 13px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.category-pills a:hover {
  background: rgba(34, 211, 238, 0.14);
  color: var(--cyan);
  transform: translateY(-2px);
}

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

.section-head,
.mini-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-head a,
.mini-head a {
  color: var(--cyan);
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  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.32);
  transform: translateY(-6px);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
}

.poster-link {
  display: block;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
}

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

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.play-chip {
  right: 10px;
  bottom: 10px;
  min-height: 28px;
  background: rgba(8, 145, 178, 0.88);
  padding: 6px 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.25);
}

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

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 10px;
}

.movie-meta span:first-child {
  color: var(--cyan);
  font-weight: 800;
}

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

.movie-card h3 a:hover {
  color: var(--cyan);
}

.movie-card p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.compact-card h3 {
  font-size: 15px;
}

.compact-card p {
  display: none;
}

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

.home-category-card {
  padding: 22px;
}

.home-category-card h3 {
  margin: 0;
  font-size: 22px;
}

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

.page-hero {
  margin-top: 38px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(8, 145, 178, 0.16), rgba(20, 184, 166, 0.08)),
    rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
}

.compact-hero {
  padding: clamp(34px, 5vw, 64px);
}

.page-hero h1 {
  font-size: clamp(34px, 4.5vw, 58px);
}

.catalog-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
}

.catalog-tools input {
  width: min(520px, 100%);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 22px;
  overflow: hidden;
  padding: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

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

.category-covers img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.category-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.category-copy strong {
  font-size: 24px;
  margin-bottom: 10px;
}

.category-copy em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.65;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 46px 0 50px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.24;
  filter: blur(18px);
  transform: scale(1.06);
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.74) 55%, rgba(2, 6, 23, 0.92) 100%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

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

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

.detail-copy h1 {
  font-size: clamp(34px, 4.6vw, 62px);
}

.detail-one-line {
  max-width: 760px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.75;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--soft);
  font-weight: 700;
  padding: 8px 12px;
}

.detail-tags {
  margin-bottom: 24px;
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding: 0 0 60px;
}

.detail-content,
.detail-side {
  display: grid;
  align-content: start;
  gap: 22px;
}

.player-card {
  padding: 16px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
}

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

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.12), rgba(2, 6, 23, 0.76));
  color: white;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.video-shell.is-playing .video-overlay {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.big-play {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 20px 44px rgba(34, 211, 238, 0.26);
}

.article-card,
.side-card {
  padding: 24px;
}

.article-card p {
  margin: 16px 0 0;
  color: #cbd5e1;
  font-size: 16px;
}

.side-card dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.side-card dl div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  padding-bottom: 12px;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  color: var(--soft);
}

.side-recommend {
  display: grid;
  gap: 14px;
}

.side-recommend .movie-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  align-items: stretch;
}

.side-recommend .poster-frame {
  height: 100%;
}

.side-recommend .tag-row {
  display: none;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.7);
  margin-top: 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
  padding: 42px 0 26px;
}

.footer-brand {
  font-size: 18px;
  font-weight: 900;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted);
  font-size: 13px;
  padding: 18px 0 26px;
}

.is-hidden {
  display: none !important;
}

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

  .mobile-toggle {
    display: block;
  }

  .header-search {
    display: none;
  }

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

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

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

@media (max-width: 820px) {
  .hero-stage {
    height: 76vh;
    min-height: 620px;
  }

  .hero-content {
    left: 22px;
    bottom: 74px;
    width: calc(100% - 44px);
  }

  .hero-control {
    display: none;
  }

  .quick-panel,
  .home-category-grid,
  .category-overview-grid,
  .footer-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 240px;
  }

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

  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .catalog-tools {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .header-inner {
    width: min(100% - 22px, 1180px);
  }

  .brand-text small {
    display: none;
  }

  .brand-text strong {
    font-size: 17px;
  }

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

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

  .large-search,
  .mobile-nav form {
    flex-direction: column;
  }

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

  .quick-search-card,
  .home-category-card,
  .article-card,
  .side-card {
    padding: 18px;
  }

  .side-recommend .movie-card {
    grid-template-columns: 78px 1fr;
  }
}
