* {
  box-sizing: border-box;
}

:root {
  --bg-deep: #020617;
  --bg-main: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --gold: #fbbf24;
  --rose: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 30rem),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.16), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #111827 100%);
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.92));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: white;
  box-shadow: 0 14px 30px rgba(34, 211, 238, 0.25);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-3deg);
}

.brand-text strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

.site-nav a {
  color: #cbd5e1;
  font-weight: 700;
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--cyan);
  transform: translateY(-1px);
}

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

.header-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
  outline: none;
  min-height: 42px;
  padding: 0 16px;
}

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

.header-search button,
.filter-panel button,
.btn,
.card-link,
.rank-action {
  border: 0;
  border-radius: 999px;
  min-height: 42px;
  padding: 0 18px;
  color: #06101f;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, #60a5fa, #22d3ee);
  box-shadow: 0 16px 32px rgba(34, 211, 238, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.filter-panel button:hover,
.btn:hover,
.card-link:hover,
.rank-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(34, 211, 238, 0.28);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 22px;
}

.main {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-carousel {
  position: relative;
  min-height: 76vh;
  margin: 24px auto 52px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: #020617;
}

.hero-stage {
  position: relative;
  min-height: 76vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 36px;
  align-items: center;
  padding: clamp(32px, 6vw, 86px);
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.8s ease;
}

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

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(1.06);
}

.hero-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.54)),
    radial-gradient(circle at 72% 22%, rgba(34, 211, 238, 0.28), transparent 20rem);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 1;
}

.hero-eyebrow,
.section-eyebrow,
.movie-kicker,
.detail-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}

.hero-content h1 {
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.95;
  letter-spacing: -0.08em;
  margin: 18px 0 22px;
  max-width: 850px;
}

.hero-content p {
  max-width: 720px;
  color: #dbeafe;
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.85;
  margin: 0 0 24px;
}

.hero-tags,
.detail-tags,
.inline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 28px;
}

.hero-tags span,
.detail-tags span,
.inline-tags span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(103, 232, 249, 0.24);
  background: rgba(8, 47, 73, 0.44);
  color: #cffafe;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn.secondary {
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.hero-poster a {
  display: block;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transform: rotate(1deg);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.72);
  color: white;
  font-size: 34px;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

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

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

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

.section {
  margin: 58px 0;
}

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

.section-title h2,
.page-title h1,
.detail-title h1 {
  margin: 10px 0 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.section-title p,
.page-title p,
.detail-title p {
  max-width: 820px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 16px;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  padding: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.22), transparent 12rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.82));
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

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

.category-card h2 {
  margin: 0 0 10px;
  font-size: 25px;
}

.category-card p {
  color: #cbd5e1;
  line-height: 1.75;
  margin: 0 0 18px;
}

.category-card span {
  color: var(--cyan);
  font-weight: 900;
}

.poster-strip {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.poster-strip img {
  width: 58px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.2);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.36);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

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

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

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

.poster-year,
.poster-type {
  position: absolute;
  top: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.poster-year {
  left: 12px;
  background: rgba(251, 191, 36, 0.9);
  color: #111827;
}

.poster-type {
  right: 12px;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.movie-body {
  padding: 16px;
}

.movie-body h2 {
  font-size: 18px;
  line-height: 1.3;
  margin: 8px 0 9px;
}

.movie-body h2 a:hover,
.rank-info h2 a:hover,
.detail-content a:hover {
  color: var(--cyan);
}

.movie-body p {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.65;
  min-height: 69px;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}

.movie-meta span,
.rank-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(148, 163, 184, 0.1);
}

.card-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 66px 86px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
}

.rank-number {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #111827;
  font-size: 20px;
  font-weight: 950;
  background: linear-gradient(135deg, #fde68a, #22d3ee);
}

.rank-thumb img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-info p {
  color: #cbd5e1;
  line-height: 1.7;
  margin: 0 0 10px;
}

.page-hero,
.detail-hero {
  margin: 32px 0 36px;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: 34px;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 20%, rgba(34, 211, 238, 0.22), transparent 22rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(2, 6, 23, 0.82));
  box-shadow: var(--shadow);
}

.detail-hero {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster img {
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  box-shadow: 0 30px 72px rgba(0, 0, 0, 0.34);
}

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

.breadcrumb a {
  color: #bae6fd;
}

.player-section,
.detail-content,
.related-section,
.filter-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.player-section {
  padding: 24px;
  margin-bottom: 34px;
}

.player-section h2,
.detail-content h2,
.related-section h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: white;
  background: radial-gradient(circle at center, rgba(34, 211, 238, 0.2), rgba(2, 6, 23, 0.72));
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-overlay span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #06101f;
  font-size: 36px;
  background: linear-gradient(135deg, #60a5fa, #22d3ee);
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.42);
}

.video-shell.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
}

.detail-content {
  padding: clamp(22px, 4vw, 38px);
  margin-bottom: 34px;
}

.detail-content p {
  color: #dbeafe;
  line-height: 2;
  font-size: 17px;
  margin: 0 0 26px;
}

.related-section {
  padding: 24px;
  margin-bottom: 54px;
}

.filter-panel {
  padding: 18px;
  margin: 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.filter-panel input {
  min-width: min(360px, 100%);
  flex: 1;
}

.empty-state {
  display: none;
  padding: 30px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 20px;
}

.empty-state.show {
  display: block;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.6), rgba(2, 6, 23, 0.96));
}

.footer-inner {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 34px;
}

.footer-brand p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.9;
}

.footer-column h2 {
  font-size: 18px;
  margin: 0 0 16px;
}

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

.footer-links a {
  color: #cbd5e1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(15, 23, 42, 0.58);
}

.footer-links a:hover {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.36);
}

.footer-bottom {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

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

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

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
}

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

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

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
  }

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

  .site-nav a {
    padding: 13px 12px;
  }

  .hero-carousel,
  .hero-stage {
    min-height: 780px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 32px 24px 70px;
    align-items: end;
  }

  .hero-poster {
    max-width: 260px;
  }

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

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

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

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

  .rank-item {
    grid-template-columns: 48px 72px minmax(0, 1fr);
  }

  .rank-action {
    grid-column: 3;
    justify-self: start;
  }

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

@media (max-width: 540px) {
  .main,
  .header-inner,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 20px, 1440px);
  }

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

  .brand-text small {
    display: none;
  }

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

  .hero-control {
    display: none;
  }

  .section-head {
    display: block;
  }

  .rank-info h2 {
    font-size: 18px;
  }
}
