/*
  Static movie site stylesheet.
  Visual language: dark slate background, cyan-blue gradient accents,
  large hero slider, rounded media cards, soft shadows and responsive grids.
*/

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --blue: #3b82f6;
  --yellow: #facc15;
  --danger: #fb7185;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.16), transparent 34rem),
    radial-gradient(circle at 85% 10%, rgba(59, 130, 246, 0.12), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: 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 {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 24px;
}

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

.brand-text,
.footer-brand {
  font-size: 24px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.14);
  color: var(--cyan);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.32);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #cbd5e1;
  font-weight: 600;
}

.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--cyan);
}

.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -20px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  border-radius: 999px;
}

.menu-toggle {
  display: none;
  border: 0;
  background: rgba(15, 23, 42, 0.6);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 16px 18px;
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav a {
  display: block;
  padding: 10px 0;
  color: #cbd5e1;
}

.mobile-nav.is-open {
  display: block;
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 540px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(15, 23, 42, 0.92));
}

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

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide.image-missing {
  background:
    radial-gradient(circle at 28% 28%, rgba(34, 211, 238, 0.26), transparent 24rem),
    linear-gradient(145deg, #0f172a, #020617 70%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #020617 3%, rgba(2, 6, 23, 0.78) 44%, rgba(2, 6, 23, 0.25) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.18));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  z-index: 2;
}

.hero-label,
.page-kicker,
.detail-category {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.14);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.25);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1 {
  max-width: 820px;
  margin: 16px 0 14px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  text-shadow: 0 16px 55px rgba(0, 0, 0, 0.55);
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.hero-actions,
.detail-score,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-meta span {
  color: #cbd5e1;
  font-size: 14px;
}

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

.btn:hover,
.home-search button:hover {
  transform: translateY(-1px);
}

.btn-primary,
.home-search button {
  background: linear-gradient(135deg, var(--cyan-dark), var(--blue));
  color: white;
  box-shadow: 0 14px 38px rgba(8, 145, 178, 0.32);
}

.btn-ghost {
  border-color: rgba(203, 213, 225, 0.24);
  background: rgba(15, 23, 42, 0.54);
  color: #e2e8f0;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.46);
  color: white;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.search-strip {
  margin-top: -28px;
  position: relative;
  z-index: 6;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 22px;
  align-items: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel strong {
  display: block;
  font-size: 20px;
}

.search-panel span,
.section-heading p,
.page-hero p,
.category-card p,
.detail-card p,
.detail-content p,
.watch-info p {
  color: var(--muted);
}

.home-search,
.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.home-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(2, 6, 23, 0.56);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

.home-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(34, 211, 238, 0.58);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

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

.section-dark {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0));
}

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

.section-heading h2,
.ranking-head h2,
.detail-content h2,
.watch-info h2 {
  margin: 6px 0 0;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.04em;
}

.section-kicker {
  font-size: 28px;
}

.section-more,
.rail-title a,
.ranking-more,
.category-card em {
  color: var(--cyan);
  font-weight: 800;
}

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

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

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

.movie-card {
  display: block;
  min-width: 0;
  color: var(--text);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.24), transparent 11rem),
    linear-gradient(145deg, #1e293b, #020617);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

.poster-wide {
  aspect-ratio: 16 / 9;
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover .poster-frame img,
.ranking-row:hover .poster-frame img {
  transform: scale(1.06);
  filter: brightness(0.78);
}

.poster-frame.image-missing::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.42)),
    radial-gradient(circle at 40% 30%, rgba(34, 211, 238, 0.28), transparent 60%);
}

.rating-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.68);
  color: var(--yellow);
  font-size: 12px;
  font-weight: 800;
}

.play-hover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: white;
  font-size: 34px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.3);
  transition: opacity 0.25s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
}

.movie-title {
  display: block;
  margin-top: 12px;
  overflow: hidden;
  color: #f8fafc;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-title {
  color: var(--cyan);
}

.movie-meta {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rail-block + .rail-block {
  margin-top: 42px;
}

.rail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.rail-title h3 {
  margin: 0;
  color: #e2e8f0;
  font-size: 22px;
}

.rail-scroll {
  display: grid;
  grid-auto-columns: 180px;
  grid-auto-flow: column;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x mandatory;
}

.rail-scroll .movie-card {
  scroll-snap-align: start;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px;
  align-items: start;
}

.ranking-box,
.detail-card,
.watch-info,
.category-card,
.filter-panel,
.ranking-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

.ranking-box {
  position: sticky;
  top: 90px;
  padding: 20px;
}

.ranking-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.rank-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.rank-num,
.ranking-index {
  color: var(--cyan);
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  color: var(--yellow);
  font-weight: 900;
}

.ranking-more {
  display: block;
  margin-top: 14px;
  text-align: center;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), #020617);
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr;
  gap: 34px;
  padding: 54px 0 36px;
}

.footer-grid h3 {
  margin: 0 0 12px;
  color: white;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li + li {
  margin-top: 8px;
}

.footer-grid a:hover {
  color: var(--cyan);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 14px;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 15%, rgba(34, 211, 238, 0.22), transparent 28rem),
    linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.96));
}

.compact-hero {
  padding: 78px 0 64px;
}

.page-hero h1 {
  max-width: 920px;
  margin: 16px 0 12px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-glow {
  position: absolute;
  top: -70px;
  right: -60px;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.16);
  filter: blur(4px);
}

.category-card strong {
  display: block;
  font-size: 26px;
}

.category-card em {
  display: block;
  margin: 8px 0 14px;
  font-style: normal;
}

.category-sample {
  display: grid;
  gap: 6px;
  color: #cbd5e1;
  font-size: 14px;
}

.filter-panel {
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  padding: 16px;
  margin-bottom: 18px;
}

.filter-result {
  min-height: 24px;
  margin: 0 0 18px;
  color: var(--muted);
}

.ranking-table {
  overflow: hidden;
}

.ranking-row {
  display: grid;
  grid-template-columns: 70px 118px minmax(0, 1fr) 86px 110px 80px 86px;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.ranking-row:not(.ranking-header):hover {
  background: rgba(15, 23, 42, 0.82);
}

.ranking-header {
  border-top: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.ranking-copy strong,
.ranking-copy em {
  display: block;
}

.ranking-copy strong {
  margin-bottom: 4px;
  color: white;
  font-size: 18px;
}

.ranking-copy em {
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-main {
  padding: 34px 0 0;
}

.detail-wrap {
  padding-bottom: 56px;
}

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

.breadcrumb a:hover {
  color: var(--cyan);
}

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

.player-shell {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: black;
  box-shadow: var(--shadow);
}

.video-element {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: contain;
  background: black;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  background:
    radial-gradient(circle at center, rgba(8, 145, 178, 0.22), rgba(0, 0, 0, 0.58));
  color: white;
  cursor: pointer;
}

.player-start span {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan-dark), var(--blue));
  box-shadow: 0 20px 60px rgba(8, 145, 178, 0.44);
  font-size: 36px;
}

.player-start strong {
  font-size: 20px;
}

.player-shell.is-playing .player-start,
.player-shell.is-ready .player-loading {
  display: none;
}

.player-loading,
.player-error,
.player-caption {
  position: absolute;
  z-index: 4;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #e2e8f0;
  backdrop-filter: blur(12px);
}

.player-loading {
  top: 16px;
  left: 16px;
  padding: 7px 12px;
  font-size: 13px;
}

.player-error {
  left: 50%;
  top: 50%;
  display: none;
  max-width: min(90%, 520px);
  padding: 12px 16px;
  color: white;
  background: rgba(190, 18, 60, 0.82);
  text-align: center;
  transform: translate(-50%, -50%);
}

.player-error.is-visible {
  display: block;
}

.player-caption {
  right: 16px;
  bottom: 16px;
  padding: 7px 12px;
  font-size: 13px;
}

.detail-card {
  padding: 28px;
}

.detail-card h1 {
  margin: 14px 0 12px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-score {
  margin: 18px 0;
}

.detail-score strong {
  color: var(--yellow);
  font-size: 26px;
}

.detail-score span {
  color: var(--muted);
}

.detail-card dl {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px 14px;
  margin: 20px 0;
}

.detail-card dt {
  color: var(--muted);
}

.detail-card dd {
  margin: 0;
  color: #e2e8f0;
}

.tag-pill {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.88);
  color: #cbd5e1;
  font-size: 13px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  margin-top: 34px;
}

.detail-content article,
.watch-info {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.58);
}

.detail-content h2,
.watch-info h2 {
  margin-top: 0;
  font-size: 26px;
}

.related-section {
  padding-bottom: 0;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.58);
}

.horizontal-copy strong,
.horizontal-copy small,
.horizontal-copy em {
  display: block;
}

.horizontal-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horizontal-copy small,
.horizontal-copy em {
  color: var(--muted);
  font-style: normal;
}

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

@media (max-width: 1080px) {
  .desktop-nav {
    gap: 14px;
    font-size: 14px;
  }

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

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

  .ranking-box {
    position: static;
  }

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

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero-slider {
    min-height: 560px;
    height: 76vh;
  }

  .hero-content {
    bottom: 86px;
  }

  .hero-arrow {
    display: none;
  }

  .search-panel,
  .home-search,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

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

  .ranking-row {
    grid-template-columns: 44px 96px minmax(0, 1fr) 64px;
  }

  .ranking-row span:nth-child(4),
  .ranking-row span:nth-child(5),
  .ranking-row span:nth-child(7) {
    display: none;
  }
}

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

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

  .hero-content h1 {
    font-size: 40px;
  }

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

  .rail-scroll {
    grid-auto-columns: 150px;
  }

  .poster-frame {
    border-radius: 12px;
  }

  .footer-grid,
  .footer-bottom {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .detail-card,
  .detail-content article,
  .watch-info {
    padding: 20px;
  }

  .player-shell,
  .video-element {
    min-height: 260px;
  }
}
