:root {
  --bg: #030712;
  --bg-soft: #0f172a;
  --card: rgba(17, 24, 39, 0.72);
  --card-strong: rgba(31, 41, 55, 0.88);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --blue: #2563eb;
  --blue-2: #60a5fa;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #030712 0%, #0b1120 48%, #030712 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background 0.28s ease, box-shadow 0.28s ease, backdrop-filter 0.28s ease;
}

.site-header.is-scrolled,
.site-header:focus-within {
  background: rgba(3, 7, 18, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

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

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

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
}

.logo-mark span {
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid white;
  margin-left: 4px;
}

.logo-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo-copy strong {
  font-size: 24px;
  letter-spacing: 0.03em;
}

.logo-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.nav-link,
.mobile-nav-link {
  color: #d1d5db;
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
  font-size: 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: white;
  background: rgba(37, 99, 235, 0.88);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(31, 41, 55, 0.86);
  color: white;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-button span {
  width: 21px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.96);
  padding: 12px 16px 18px;
}

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

.mobile-nav-link {
  display: block;
  padding: 12px 16px;
}

.page-root {
  min-height: 70vh;
}

.page-offset {
  padding-top: 96px;
}

.hero-carousel {
  position: relative;
  height: 78vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.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-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #030712 0%, rgba(3, 7, 18, 0.72) 38%, rgba(3, 7, 18, 0.18) 100%);
}

.hero-content {
  position: absolute;
  inset: auto 0 88px 0;
  margin: 0 auto;
}

.hero-kicker,
.inner-hero span,
.section-head span,
.home-search-panel span,
.category-tile-body span {
  display: inline-flex;
  color: white;
  background: var(--blue);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.06em;
}

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

.hero-actions,
.detail-meta-row,
.filter-pills,
.tag-row,
.detail-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.home-search-form button,
.inline-search button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 12px 20px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.primary-button,
.home-search-form button,
.inline-search button {
  background: var(--blue);
  color: white;
}

.ghost-button {
  background: rgba(15, 23, 42, 0.64);
  border-color: rgba(255, 255, 255, 0.18);
  color: white;
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.home-search-form button:hover,
.inline-search button:hover {
  transform: translateY(-2px);
  background: #1d4ed8;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.44);
  color: white;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.hero-prev {
  left: 26px;
}

.hero-next {
  right: 26px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

.home-search-panel {
  position: relative;
  z-index: 6;
  margin-top: -46px;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 460px);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-search-panel h2,
.inner-hero h1,
.section-head h2 {
  margin: 14px 0 10px;
  color: var(--text);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.home-search-panel h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.home-search-panel p,
.inner-hero p,
.category-tile-body p,
.detail-section p {
  color: var(--muted-2);
  line-height: 1.8;
}

.home-search-form,
.inline-search {
  display: flex;
  gap: 10px;
  width: 100%;
}

.home-search-form input,
.inline-search input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(3, 7, 18, 0.76);
  color: white;
  padding: 0 16px;
  outline: none;
}

.home-search-form input:focus,
.inline-search input:focus {
  border-color: rgba(96, 165, 250, 0.72);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

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

.wide-section {
  margin-top: 76px;
  padding: 68px 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.9), rgba(31, 41, 55, 0.84), rgba(15, 23, 42, 0.9));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.section-head h2 {
  font-size: clamp(30px, 4vw, 46px);
}

.section-head a {
  color: var(--blue-2);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

.movie-card a {
  display: block;
  height: 100%;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card a:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.34);
}

.movie-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

.movie-cover img,
.large-feature-card img,
.category-preview img,
.horizontal-card img,
.player-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-cover img {
  transition: transform 0.55s ease;
}

.movie-card a:hover .movie-cover img {
  transform: scale(1.08);
}

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.02) 56%);
}

.play-float,
.player-play {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.36);
}

.play-float {
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card a:hover .play-float {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.play-float i,
.player-play i {
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid white;
  margin-left: 4px;
}

.year-pill,
.region-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.year-pill {
  right: 12px;
  top: 12px;
  padding: 6px 9px;
  background: rgba(0, 0, 0, 0.68);
  color: white;
}

.region-pill {
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  background: var(--blue);
  color: white;
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f97316, #facc15);
  color: #111827;
}

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

.movie-card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  min-height: 46px;
}

.movie-card-body p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  min-height: 48px;
}

.tag-row span,
.detail-tags span,
.detail-meta-row span {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(31, 41, 55, 0.9);
  color: #cbd5e1;
  font-size: 12px;
}

.scroll-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 0 max(16px, calc((100vw - 1180px) / 2)) 8px;
  scrollbar-width: thin;
}

.scroll-row .movie-card {
  flex: 0 0 252px;
}

.feature-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.large-feature-card a {
  position: relative;
  display: block;
  min-height: 520px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111827;
}

.large-feature-card img {
  position: absolute;
  inset: 0;
}

.large-feature-card a:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.08));
}

.large-feature-card div {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 32px;
  z-index: 2;
}

.large-feature-card span,
.large-feature-card em {
  color: var(--blue-2);
  font-weight: 900;
  font-style: normal;
}

.large-feature-card h2 {
  margin: 10px 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
}

.large-feature-card p {
  max-width: 720px;
  color: #d1d5db;
  line-height: 1.8;
}

.feature-side-list,
.related-list,
.rank-list {
  display: grid;
  gap: 16px;
}

.horizontal-card a {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  align-items: center;
  border-radius: 18px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.horizontal-card a:hover {
  background: rgba(31, 41, 55, 0.86);
  border-color: rgba(96, 165, 250, 0.42);
}

.horizontal-card img {
  height: 82px;
  border-radius: 12px;
}

.horizontal-card strong {
  display: inline-flex;
  margin-bottom: 4px;
  color: #facc15;
  font-size: 18px;
}

.horizontal-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.horizontal-card p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.horizontal-card span {
  color: #93c5fd;
  font-size: 12px;
}

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

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

.category-tile {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  min-height: 220px;
  padding: 16px;
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 165, 250, 0.42);
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 6px;
  min-height: 188px;
}

.category-preview img {
  border-radius: 14px;
  background: #111827;
}

.category-tile-body h2 {
  margin: 18px 0 10px;
  font-size: 28px;
}

.inner-hero {
  padding: 54px 0 20px;
}

.inner-hero h1 {
  font-size: clamp(36px, 6vw, 64px);
}

.inner-hero p {
  max-width: 820px;
  font-size: 18px;
}

.inline-search {
  max-width: 760px;
  margin-top: 24px;
}

.filter-pills {
  margin-top: 18px;
}

.filter-pills button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(31, 41, 55, 0.72);
  color: #cbd5e1;
  cursor: pointer;
}

.filter-pills button.is-active,
.filter-pills button:hover {
  background: var(--blue);
  color: white;
}

.movie-card.is-hidden {
  display: none;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  padding-bottom: 20px;
}

.breadcrumb a {
  color: #bfdbfe;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 380px;
  gap: 30px;
  align-items: start;
}

.detail-main,
.detail-side {
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  overflow: hidden;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: black;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.24);
  cursor: pointer;
  overflow: hidden;
}

.player-overlay.is-hidden {
  display: none;
}

.player-poster {
  position: absolute;
  inset: 0;
  filter: brightness(0.68);
}

.player-play {
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 82px;
  height: 82px;
  transform: translate(-50%, -50%);
}

.detail-info {
  padding: 26px;
}

.detail-meta-row {
  margin-bottom: 16px;
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
}

.one-line {
  margin: 0 0 26px;
  color: #93c5fd;
  font-size: 18px;
  line-height: 1.8;
}

.detail-section {
  padding-top: 22px;
  border-top: 1px solid var(--line);
  margin-top: 22px;
}

.detail-section h2,
.detail-side h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.genre-line {
  color: #dbeafe;
}

.detail-tags {
  margin-top: 14px;
}

.detail-side {
  padding: 22px;
}

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

.site-footer {
  margin-top: 88px;
  background: rgba(3, 7, 18, 0.95);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

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

.footer-logo {
  margin-bottom: 16px;
}

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

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

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

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

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 20px 16px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

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

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

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

  .detail-layout,
  .feature-layout,
  .home-search-panel,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-side {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .container,
  .site-header-inner {
    width: min(100% - 24px, 1180px);
  }

  .site-header-inner {
    min-height: 66px;
  }

  .logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .logo-copy strong {
    font-size: 20px;
  }

  .logo-copy small {
    display: none;
  }

  .hero-carousel {
    height: 68vh;
    min-height: 520px;
  }

  .hero-content {
    bottom: 72px;
  }

  .hero-actions,
  .home-search-form,
  .inline-search {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-arrow {
    display: none;
  }

  .home-search-panel {
    margin-top: -30px;
    padding: 20px;
  }

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

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

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

  .large-feature-card a {
    min-height: 430px;
  }

  .horizontal-card a {
    grid-template-columns: 92px 1fr;
  }

  .horizontal-card img {
    height: 74px;
  }

  .detail-info,
  .detail-side {
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .movie-grid-four {
    gap: 14px;
  }

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

  .movie-card-body h3 {
    font-size: 15px;
    min-height: 42px;
  }

  .movie-card-body p,
  .tag-row {
    display: none;
  }

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