:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(30, 41, 59, 0.78);
  --panel-strong: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --blue: #2563eb;
  --blue-light: #60a5fa;
  --cyan: #38bdf8;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 45%, #0f172a 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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: 80;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.4);
}

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

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

.main-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  background: rgba(37, 99, 235, 0.22);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.72);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #fff;
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
}

.hero-stage {
  position: relative;
  height: 70vh;
  min-height: 560px;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 28%, rgba(37, 99, 235, 0.25), transparent 28%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, #0f172a 0%, transparent 32%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: max(24px, calc((100vw - 1200px) / 2));
  transform: translateY(-50%);
  max-width: 680px;
  padding-right: 24px;
}

.hero-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(37, 99, 235, 0.86);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.28);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.card-meta,
.compact-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--subtle);
}

.hero-meta span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 18px;
  margin-left: 12px;
  vertical-align: middle;
  background: rgba(148, 163, 184, 0.45);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.primary-btn,
.secondary-btn,
.filter-panel button,
.hero-search button {
  border: 0;
  border-radius: 14px;
  padding: 12px 22px;
  font-weight: 800;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 14px 38px rgba(37, 99, 235, 0.35);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.secondary-btn {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.primary-btn:hover,
.secondary-btn:hover,
.filter-panel button:hover,
.hero-search button:hover {
  transform: translateY(-2px);
  background: #1d4ed8;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(10px);
  font-size: 38px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(37, 99, 235, 0.72);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.hero-search-card {
  position: relative;
  z-index: 8;
  width: min(1200px, calc(100% - 32px));
  margin: -74px auto 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-search,
.filter-panel,
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-search input,
.search-box input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.9);
  outline: none;
}

.hero-search input,
.search-box input {
  padding: 0 16px;
}

.filter-panel select {
  width: auto;
  padding: 0 14px;
}

.hero-search input:focus,
.search-box input:focus,
.filter-panel select:focus {
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

.hero-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.hero-category-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(30, 41, 59, 0.9);
  transition: color 0.2s ease, background 0.2s ease;
}

.hero-category-links a:hover {
  color: #fff;
  background: rgba(37, 99, 235, 0.6);
}

main,
.page-shell {
  min-height: 70vh;
}

.content-section {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.feature-panel,
.ranking-panel {
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(30, 41, 59, 0.52);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.04em;
}

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

.section-heading a {
  color: var(--blue-light);
  font-weight: 700;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.76);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(30, 41, 59, 0.95);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #020617;
}

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

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.movie-card:hover img,
.compact-item:hover img,
.side-item:hover img {
  opacity: 0.82;
  transform: scale(1.06);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 28%, rgba(0, 0, 0, 0.72) 100%);
}

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  font-size: 12px;
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(37, 99, 235, 0.86);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

.card-body {
  padding: 18px;
}

.card-body h3,
.compact-item h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover,
.compact-item h3 a:hover,
.side-item strong:hover {
  color: var(--blue-light);
}

.card-body p,
.compact-item p {
  display: -webkit-box;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--subtle);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.compact-meta {
  font-size: 13px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-list span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.78);
  font-size: 12px;
}

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

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

.category-tile {
  min-height: 190px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(circle at 85% 20%, rgba(37, 99, 235, 0.24), transparent 36%),
    rgba(30, 41, 59, 0.76);
  transition: transform 0.22s ease, border 0.22s ease, background 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 165, 250, 0.54);
  background:
    radial-gradient(circle at 85% 20%, rgba(56, 189, 248, 0.28), transparent 40%),
    rgba(30, 41, 59, 0.96);
}

.category-tile span {
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.category-tile strong {
  margin: 14px 0;
  color: var(--muted);
  font-weight: 500;
}

.category-tile em {
  color: var(--blue-light);
  font-style: normal;
  font-size: 13px;
}

.ranking-list,
.latest-list,
.side-list {
  display: grid;
  gap: 16px;
}

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

.compact-item {
  display: grid;
  grid-template-columns: auto 132px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.58);
  transition: border 0.22s ease, transform 0.22s ease, background 0.22s ease;
}

.compact-item:not(:has(.rank-number)) {
  grid-template-columns: 132px 1fr;
}

.compact-item:hover {
  transform: translateY(-3px);
  border-color: rgba(96, 165, 250, 0.46);
  background: rgba(30, 41, 59, 0.92);
}

.rank-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 900;
}

.compact-poster {
  display: block;
  height: 82px;
  overflow: hidden;
  border-radius: 14px;
  background: #020617;
}

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

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

.page-shell .content-section {
  width: 100%;
}

.page-hero {
  margin: 36px 0 8px;
  padding: clamp(32px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 82% 18%, rgba(37, 99, 235, 0.26), transparent 30%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 760px;
  margin: 18px 0 12px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  color: var(--subtle);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

.filter-panel {
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.62);
}

.search-box {
  flex: 1 1 280px;
}

.search-box span {
  color: var(--blue-light);
  font-size: 24px;
}

.empty-state {
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--muted);
  background: rgba(30, 41, 59, 0.55);
  text-align: center;
}

.detail-shell {
  width: min(1240px, calc(100% - 32px));
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  margin-top: 24px;
}

.detail-main {
  display: grid;
  gap: 24px;
}

.player-card,
.detail-info-card,
.story-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(30, 41, 59, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.player-card {
  overflow: hidden;
  background: #020617;
}

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  color: #fff;
  background: #000;
  overflow: hidden;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
}

.player-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.24), rgba(0, 0, 0, 0.65));
}

.big-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  color: #fff;
  background: rgba(37, 99, 235, 0.9);
  box-shadow: 0 18px 48px rgba(37, 99, 235, 0.5);
  font-size: 34px;
}

.player-message {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.86);
}

.detail-info-card,
.story-card,
.side-card {
  padding: 26px;
}

.detail-info-card h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-one-line {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 20px;
}

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

.detail-facts div {
  padding: 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-facts span {
  display: block;
  color: var(--subtle);
  font-size: 12px;
}

.detail-facts strong {
  display: block;
  margin-top: 4px;
  color: #fff;
}

.story-card h2,
.side-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.story-card h2:not(:first-child) {
  margin-top: 28px;
}

.story-card p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

.sticky-card {
  position: sticky;
  top: 96px;
}

.side-item {
  display: grid;
  grid-template-columns: 124px 1fr;
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 124px;
  height: 78px;
  object-fit: cover;
  border-radius: 14px;
  background: #020617;
  transition: opacity 0.25s ease, transform 0.3s ease;
}

.side-item strong {
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.side-item em {
  display: block;
  margin-top: 5px;
  color: var(--subtle);
  font-style: normal;
  font-size: 13px;
}

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

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  color: var(--subtle);
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

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

.copyright {
  margin-top: 18px;
  font-size: 13px;
}

@media (max-width: 1080px) {
  .grid-large,
  .grid-cards,
  .category-grid,
  .category-grid.full {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .sticky-card {
    position: static;
  }
}

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

  .nav-toggle {
    display: block;
  }

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

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

  .hero-stage {
    height: 76vh;
    min-height: 620px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    padding-right: 0;
  }

  .hero-arrow {
    display: none;
  }

  .hero-dots {
    bottom: 138px;
  }

  .hero-search-card {
    margin-top: -96px;
  }

  .hero-search,
  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-panel select,
  .filter-panel button,
  .hero-search button {
    width: 100%;
  }

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

  .feature-panel,
  .ranking-panel {
    padding: 22px;
    border-radius: 24px;
  }

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

  .grid-large,
  .grid-cards,
  .category-grid,
  .category-grid.full,
  .ranking-list.wide {
    grid-template-columns: 1fr;
  }

  .compact-item,
  .compact-item:not(:has(.rank-number)) {
    grid-template-columns: 96px 1fr;
  }

  .compact-item .rank-number {
    display: none;
  }

  .compact-poster {
    height: 68px;
  }

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

  .side-item {
    grid-template-columns: 104px 1fr;
  }

  .side-item img {
    width: 104px;
    height: 68px;
  }

  .brand-text {
    max-width: 230px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}

@media (max-width: 460px) {
  .hero h1 {
    font-size: 36px;
  }

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

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn {
    text-align: center;
  }

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