:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.84);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --purple: #8b5cf6;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.38);
}

* {
  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 34rem),
    radial-gradient(circle at 85% 15%, rgba(34, 211, 238, 0.14), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body.nav-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: 100;
  border-bottom: 1px solid rgba(59, 130, 246, 0.28);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.92), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.36);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.22);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  color: transparent;
  white-space: nowrap;
}

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

.nav-link {
  padding: 9px 13px;
  color: #cbd5e1;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(255, 255, 255, 0.09);
}

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

.header-search input,
.quick-form input,
.search-page-form input,
.filter-tools input,
.filter-tools select,
.mobile-panel input {
  color: white;
  border: 1px solid rgba(148, 163, 184, 0.25);
  outline: none;
  background: rgba(15, 23, 42, 0.64);
  border-radius: 999px;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  width: 250px;
  padding: 10px 14px;
}

.header-search input:focus,
.quick-form input:focus,
.search-page-form input:focus,
.filter-tools input:focus,
.filter-tools select:focus,
.mobile-panel input:focus {
  border-color: rgba(96, 165, 250, 0.78);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

.header-search button,
.quick-form button,
.search-page-form button,
.mobile-panel button {
  border: 0;
  color: white;
  padding: 10px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.22);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.74);
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: white;
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.mobile-panel a {
  display: block;
  padding: 12px 0;
  color: #dbeafe;
}

.mobile-panel form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.mobile-panel input {
  width: 100%;
  padding: 11px 14px;
}

.section-shell,
.hero-carousel {
  width: min(1240px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.26);
  border-radius: 34px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.hero-track {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 64px;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.9s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(710px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: #67e8f9;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.hero-desc,
.page-hero p,
.quick-copy p,
.detail-copy .lead,
.article-section p,
.site-footer p {
  color: #cbd5e1;
}

.hero-desc {
  width: min(660px, 100%);
  margin: 20px 0 0;
  font-size: 18px;
}

.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;
  padding: 5px 10px;
  color: #bfdbfe;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.54);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 42px rgba(59, 130, 246, 0.26);
}

.btn.ghost {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn.line {
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.38);
  background: rgba(2, 6, 23, 0.24);
}

.hero-side-panel {
  position: absolute;
  z-index: 3;
  right: 24px;
  top: 50%;
  width: 260px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: rgba(2, 6, 23, 0.58);
  backdrop-filter: blur(18px);
  transform: translateY(-50%);
}

.panel-title {
  margin: 0 0 12px;
  color: white;
  font-weight: 800;
}

.hero-mini-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  color: #dbeafe;
  border-radius: 16px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-mini-card:hover {
  background: rgba(255, 255, 255, 0.09);
  transform: translateX(-3px);
}

.hero-mini-card img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-mini-card span {
  font-weight: 700;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 64px;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dots button.active {
  width: 34px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.quick-search,
.page-hero,
.content-section,
.split-section,
.category-list,
.filter-shell,
.ranking-shell,
.detail-hero,
.player-section,
.article-section {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.18);
}

.quick-search {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  align-items: center;
  padding: 30px;
}

.quick-copy h2,
.section-heading h2,
.category-board h2,
.article-section h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.quick-copy p {
  margin: 10px 0 0;
}

.quick-form,
.search-page-form {
  display: flex;
  gap: 10px;
}

.quick-form input,
.search-page-form input {
  width: 100%;
  padding: 14px 18px;
}

.category-pills {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-pills a {
  padding: 9px 13px;
  color: #dbeafe;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.48);
}

.content-section,
.category-list,
.filter-shell,
.ranking-shell,
.article-section {
  padding: 28px;
}

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

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

.section-more {
  color: #67e8f9;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.62);
  transition: transform 0.22s ease, border 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.48);
  box-shadow: 0 18px 50px rgba(59, 130, 246, 0.16);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #0f172a;
}

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

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

.rating-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 30px;
  padding: 0 9px;
  color: white;
  font-weight: 900;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.24);
}

.rating-badge.big {
  min-width: 58px;
  height: 40px;
  font-size: 18px;
}

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

.movie-card h3 {
  margin: 0;
  color: white;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover {
  color: #67e8f9;
}

.meta,
.desc,
.rank-info p,
.category-card p {
  color: var(--muted);
}

.meta {
  min-height: 42px;
  margin: 7px 0 0;
  font-size: 13px;
}

.desc {
  min-height: 48px;
  margin: 9px 0 12px;
  font-size: 14px;
}

.tag-row span {
  font-size: 12px;
}

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

.compact h3 {
  font-size: 16px;
}

.compact .desc {
  display: none;
}

.split-section {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
  padding: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 82px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.32);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: #67e8f9;
  font-weight: 900;
  border-radius: 16px;
  background: rgba(59, 130, 246, 0.14);
}

.rank-thumb img {
  width: 82px;
  height: 108px;
  object-fit: cover;
  border-radius: 14px;
}

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

.rank-info p {
  margin: 5px 0 0;
  font-size: 14px;
}

.rank-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 36px;
  color: white;
  font-weight: 900;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.22);
}

.category-board {
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.2), rgba(8, 47, 73, 0.32));
}

.category-board p {
  color: #cbd5e1;
}

.board-links {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.board-links a {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.26);
}

.board-links span {
  color: #94a3b8;
  font-size: 13px;
}

.page-hero,
.detail-hero {
  padding: 38px;
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 62px);
}

.page-hero p {
  max-width: 860px;
  margin: 14px 0 0;
  font-size: 18px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
  color: #93c5fd;
  font-size: 14px;
}

.crumbs span:last-child {
  color: #cbd5e1;
}

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

.category-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: #0f172a;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-card:hover img {
  transform: scale(1.08);
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 1;
}

.category-card span {
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  font-size: 14px;
}

.filter-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.filter-tools input,
.filter-tools select {
  min-width: 210px;
  padding: 12px 14px;
}

.search-page-form {
  max-width: 760px;
  margin-top: 20px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 34px;
  align-items: center;
  margin-top: 24px;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
}

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

.detail-copy h1 {
  font-size: clamp(36px, 5vw, 68px);
}

.detail-copy .lead {
  margin: 18px 0 0;
  font-size: 20px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-meta span {
  padding: 7px 12px;
  color: #dbeafe;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.14);
}

.large-tags {
  margin-top: 18px;
}

.player-section {
  padding: 18px;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-poster {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  color: white;
  border: 0;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.16), rgba(2, 6, 23, 0.54));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.movie-player.is-playing .player-poster {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 22px 54px rgba(59, 130, 246, 0.34);
  position: relative;
}

.play-icon::after {
  content: "";
  position: absolute;
  left: 34px;
  top: 25px;
  border-left: 24px solid white;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
}

.player-poster strong {
  font-size: clamp(20px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.article-section h2 + p {
  margin-top: 12px;
}

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

.article-section p {
  font-size: 17px;
}

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

.site-footer {
  margin-top: 42px;
  padding: 34px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.48);
}

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
}

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

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

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

.footer-links a {
  color: #bfdbfe;
}

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

@media (max-width: 1180px) {
  .header-search input {
    width: 190px;
  }

  .hero-side-panel {
    display: none;
  }

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

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

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

  .mobile-toggle {
    display: flex;
    margin-left: auto;
  }

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

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

  .hero-slide {
    padding: 34px 24px 70px;
    align-items: flex-end;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 38px;
  }

  .hero-desc {
    font-size: 16px;
  }

  .hero-dots {
    left: 24px;
    bottom: 24px;
  }

  .quick-search,
  .split-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .detail-layout {
    gap: 22px;
  }

  .detail-poster {
    width: min(330px, 100%);
  }

  .rank-item {
    grid-template-columns: 42px 64px 1fr;
  }

  .rank-score {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .rank-number {
    width: 38px;
    height: 38px;
  }

  .rank-thumb img {
    width: 64px;
    height: 86px;
  }

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

@media (max-width: 560px) {
  .header-inner,
  .section-shell,
  .hero-carousel,
  .footer-inner,
  .mobile-panel {
    width: min(100% - 22px, 1240px);
  }

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

  .hero-carousel {
    min-height: 590px;
    margin-top: 14px;
  }

  .hero-slide {
    padding: 28px 18px 68px;
  }

  .hero-actions,
  .quick-form,
  .search-page-form,
  .filter-tools {
    flex-direction: column;
  }

  .btn,
  .quick-form button,
  .search-page-form button,
  .filter-tools input,
  .filter-tools select {
    width: 100%;
  }

  .quick-search,
  .page-hero,
  .content-section,
  .split-section,
  .category-list,
  .filter-shell,
  .ranking-shell,
  .detail-hero,
  .article-section {
    padding: 18px;
    border-radius: 22px;
  }

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

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .mobile-panel form {
    flex-direction: column;
  }
}
