:root {
  --bg: #f7fbff;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.09);
  --brand: #06b6d4;
  --brand-dark: #0891b2;
  --accent: #f43f5e;
  --accent-soft: rgba(244, 63, 94, 0.14);
  --cyan-soft: rgba(6, 182, 212, 0.16);
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(6, 182, 212, 0.16), transparent 34%),
    radial-gradient(circle at 86% 4%, rgba(244, 63, 94, 0.14), transparent 30%),
    linear-gradient(180deg, #f8fdff 0%, #eef7fb 52%, #ffffff 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent 78%);
}

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

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

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

.header-inner,
.footer-inner,
.section,
.hero,
.breadcrumbs {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), #2563eb 56%, var(--accent));
  box-shadow: 0 12px 26px rgba(6, 182, 212, 0.35);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 12px 22px rgba(8, 145, 178, 0.2);
}

.mobile-menu-button {
  display: none;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.hero {
  position: relative;
  overflow: hidden;
  margin-top: 28px;
  min-height: 560px;
  border-radius: 36px;
  background:
    linear-gradient(135deg, rgba(8, 145, 178, 0.95), rgba(37, 99, 235, 0.86) 52%, rgba(244, 63, 94, 0.88)),
    #0f172a;
  color: #ffffff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(4px);
  opacity: 0.7;
}

.hero::before {
  width: 420px;
  height: 420px;
  right: -160px;
  top: -130px;
  background: rgba(255, 255, 255, 0.22);
}

.hero::after {
  width: 300px;
  height: 300px;
  left: -80px;
  bottom: -100px;
  background: rgba(34, 211, 238, 0.26);
}

.hero-track {
  position: relative;
  z-index: 1;
  min-height: 560px;
}

.hero-slide {
  display: none;
  min-height: 560px;
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.74fr);
  gap: 36px;
  align-items: center;
  padding: 58px;
}

.hero-slide.active {
  display: grid;
  animation: fade-in 0.55s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: #e0fbff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  margin: 22px 0 16px;
  max-width: 780px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero p {
  margin: 0;
  max-width: 700px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 17px;
  line-height: 1.85;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #fb7185);
  box-shadow: 0 16px 34px rgba(244, 63, 94, 0.28);
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.button.secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.button.light {
  color: var(--brand-dark);
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.10);
}

.hero-poster-shell {
  position: relative;
  min-height: 450px;
}

.hero-poster {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06));
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.30);
  transform: rotate(2deg);
}

.hero-poster img,
.cover-wrap img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster.cover-fallback,
.cover-wrap.cover-fallback,
.detail-poster.cover-fallback {
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.45), transparent 30%),
    linear-gradient(145deg, rgba(6, 182, 212, 0.86), rgba(37, 99, 235, 0.88) 55%, rgba(244, 63, 94, 0.82));
}

.poster-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  padding: 9px 13px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
  font-size: 13px;
  font-weight: 900;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 58px;
  bottom: 34px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dot.active {
  width: 34px;
  background: #ffffff;
}

.section {
  margin-top: 54px;
}

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

.section-kicker {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-title {
  margin: 6px 0 0;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-subtitle {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

.movie-card,
.category-card,
.stat-card,
.detail-panel,
.player-card,
.search-panel,
.rank-row {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.movie-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-row:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.15);
}

.cover-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(circle at 35% 22%, rgba(255,255,255,0.68), transparent 25%),
    linear-gradient(145deg, rgba(6, 182, 212, 0.78), rgba(37, 99, 235, 0.82) 55%, rgba(244, 63, 94, 0.70));
}

.cover-rank {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.70);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 900;
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.movie-title {
  margin: 9px 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 950;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: var(--cyan-soft);
  font-size: 12px;
  font-weight: 800;
}

.card-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
}

.text-link {
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 900;
}

.text-link.muted {
  color: var(--muted);
}

.category-card {
  position: relative;
  min-height: 190px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.94), rgba(255,255,255,0.72)),
    radial-gradient(circle at 90% 10%, rgba(6, 182, 212, 0.24), transparent 30%);
}

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

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

.category-count {
  position: absolute;
  right: 18px;
  bottom: 16px;
  color: var(--accent);
  font-size: 26px;
  font-weight: 950;
}

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

.stat-card {
  padding: 18px;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stat-card strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
}

.search-panel {
  padding: 18px;
  margin-bottom: 20px;
}

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

.input,
.select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: #ffffff;
  font: inherit;
  outline: none;
}

.input:focus,
.select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.16);
}

.result-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 72px 86px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--brand));
  font-size: 18px;
  font-weight: 950;
}

.rank-thumb {
  position: relative;
  overflow: hidden;
  width: 86px;
  aspect-ratio: 3 / 4;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(6, 182, 212, 0.78), rgba(244, 63, 94, 0.72));
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.rank-score {
  text-align: right;
  color: var(--muted);
  font-weight: 900;
}

.rank-score strong {
  display: block;
  color: var(--accent);
  font-size: 24px;
}

.breadcrumbs {
  margin-top: 26px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--brand-dark);
  font-weight: 800;
}

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

.detail-poster {
  overflow: hidden;
  min-height: 430px;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(6, 182, 212, 0.78), rgba(244, 63, 94, 0.72));
  box-shadow: var(--shadow);
}

.detail-panel {
  padding: 28px;
}

.detail-panel h1 {
  margin: 8px 0 12px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-weight: 800;
}

.detail-summary {
  margin-top: 18px;
  color: #334155;
  line-height: 1.9;
  font-size: 16px;
}

.player-card {
  padding: 18px;
  background: #0f172a;
}

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

.video-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

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

.article-box,
.info-box {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.article-box h2,
.info-box h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.article-box p {
  margin: 0 0 14px;
  color: #334155;
  line-height: 1.95;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.info-list dt {
  color: var(--muted);
  font-weight: 800;
}

.info-list dd {
  margin: 0;
  font-weight: 800;
}

.sitemap-list {
  columns: 4 240px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.sitemap-list a {
  display: block;
  break-inside: avoid;
  padding: 6px 0;
  color: #334155;
  font-weight: 700;
}

.site-footer {
  margin-top: 70px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
}

.footer-inner strong {
  color: var(--text);
  font-size: 18px;
}

.footer-inner p {
  margin: 8px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-weight: 800;
}

.hidden-by-filter {
  display: none !important;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .hero-poster-shell {
    min-height: 360px;
  }

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

@media (max-width: 740px) {
  .header-inner,
  .footer-inner,
  .section,
  .hero,
  .breadcrumbs {
    width: min(100% - 22px, 1180px);
  }

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

  .site-nav {
    position: absolute;
    top: 70px;
    left: 11px;
    right: 11px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .nav-link {
    text-align: center;
  }

  .hero,
  .hero-track,
  .hero-slide {
    min-height: auto;
  }

  .hero-slide {
    padding: 32px 22px 76px;
  }

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

  .hero-dots {
    left: 24px;
  }

  .movie-grid,
  .category-grid,
  .stats-grid,
  .search-controls {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 46px 70px 1fr;
  }

  .rank-number {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 15px;
  }

  .rank-thumb {
    width: 70px;
  }

  .rank-score {
    grid-column: 2 / -1;
    text-align: left;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
