:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #06b6d4;
  --brand-dark: #0891b2;
  --slate: #0f172a;
  --slate-2: #1e293b;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  color: #fff;
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  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-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #0f172a;
  background: linear-gradient(135deg, #22d3ee, #60a5fa);
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.26);
}

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

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

.site-nav a,
.mobile-nav a {
  padding: 9px 13px;
  border-radius: 12px;
  color: rgba(226, 232, 240, 0.86);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: #fff;
  background: rgba(51, 65, 85, 0.78);
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  color: #fff;
  background: rgba(51, 65, 85, 0.85);
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

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

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0) 42%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1240px) / 2));
  bottom: 92px;
  width: min(680px, calc(100% - 64px));
}

.eyebrow {
  margin: 0 0 12px;
  color: #06b6d4;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 13px;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 70px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content h2 + h2 {
  font-size: clamp(26px, 4vw, 46px);
  color: #cffafe;
}

.hero-content p:not(.eyebrow) {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

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

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

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.3);
}

.ghost-button {
  color: #fff;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, 0.48);
  font-size: 30px;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 36px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  color: transparent;
  background: rgba(255, 255, 255, 0.42);
}

.hero-dots button.is-active {
  background: #22d3ee;
}

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

.home-section {
  padding: 56px 0 24px;
}

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

.section-title h2,
.listing-head h1,
.content-card h2,
.rank-panel h2 {
  margin: 0;
  color: #0f172a;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-title h2 {
  font-size: clamp(26px, 3.2vw, 38px);
}

.section-title a {
  color: var(--brand-dark);
  font-weight: 800;
}

.compact-title {
  align-items: start;
  display: block;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: var(--shadow);
}

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

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

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

.poster-badge,
.poster-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.poster-badge {
  left: 10px;
  top: 10px;
  padding: 5px 9px;
  background: rgba(8, 145, 178, 0.88);
}

.poster-play {
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.82);
}

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

.movie-card h3 {
  min-height: 46px;
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.4;
}

.movie-card h3 a:hover {
  color: var(--brand-dark);
}

.movie-card p {
  min-height: 54px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: #0e7490;
  background: #ecfeff;
  font-size: 12px;
  font-weight: 800;
}

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

.category-tile {
  min-height: 128px;
  padding: 22px;
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.38), transparent 38%),
    linear-gradient(135deg, #0f172a, #1e293b);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
  transition: transform 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
}

.category-tile strong,
.category-tile span {
  display: block;
}

.category-tile strong {
  font-size: 24px;
  margin-bottom: 10px;
}

.category-tile span {
  color: rgba(226, 232, 240, 0.78);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 30px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 58px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(6, 182, 212, 0.45);
}

.rank-number {
  color: #0891b2;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
  background: #0f172a;
}

.rank-text strong,
.rank-text small {
  display: block;
}

.rank-text strong {
  font-weight: 900;
  line-height: 1.35;
}

.rank-text small {
  margin-top: 6px;
  color: var(--muted);
}

.compact-grid,
.side-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.compact-card {
  display: grid;
  grid-template-columns: 70px 1fr;
  grid-template-rows: 1fr auto;
  column-gap: 12px;
  min-height: 98px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.compact-card img {
  grid-row: 1 / span 2;
  width: 70px;
  height: 92px;
  border-radius: 13px;
  object-fit: cover;
  background: #0f172a;
}

.compact-card span {
  align-self: end;
  font-weight: 900;
  line-height: 1.35;
}

.compact-card small {
  color: var(--muted);
}

.page-shell {
  padding: 46px 0 64px;
}

.listing-head {
  align-items: center;
  padding: 28px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.listing-head h1 {
  margin-bottom: 12px;
  font-size: clamp(30px, 4vw, 48px);
}

.listing-head p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.search-box {
  width: min(360px, 100%);
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  color: var(--text);
  outline: none;
}

.search-box input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.empty-state {
  padding: 28px;
  border-radius: 18px;
  color: var(--muted);
  background: #fff;
  text-align: center;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 34px;
}

.pagination a,
.pagination span {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
}

.pagination a.is-current,
.pagination a:hover {
  color: #fff;
  border-color: var(--brand-dark);
  background: var(--brand-dark);
}

.rank-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 28px;
}

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.rank-panel h2 {
  margin-bottom: 16px;
  font-size: 24px;
}

.detail-page {
  background: #f8fafc;
}

.detail-hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px);
  transform: scale(1.04);
  opacity: 0.58;
}

.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.64)), linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.08) 54%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 54px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 34px;
  color: rgba(226, 232, 240, 0.76);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #67e8f9;
}

.detail-title-block {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: end;
}

.detail-poster {
  width: 220px;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  object-fit: cover;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.42);
}

.detail-title-block h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-title-block p:not(.eyebrow) {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags span {
  color: #cffafe;
  background: rgba(8, 145, 178, 0.42);
}

.detail-content {
  width: min(1240px, calc(100% - 32px));
  margin: -54px auto 0;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 20px;
}

.player-section,
.content-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.1);
}

.player-section {
  overflow: hidden;
  padding: 12px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.72));
}

.player-box.is-playing .player-overlay {
  display: none;
}

.play-button {
  border: 0;
  border-radius: 999px;
  padding: 16px 34px;
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.34);
  font-weight: 900;
  font-size: 18px;
}

.player-message {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100% - 40px));
  padding: 18px;
  border-radius: 18px;
  color: #fff;
  background: rgba(15, 23, 42, 0.92);
  text-align: center;
  font-weight: 800;
}

.content-card {
  padding: 26px;
}

.content-card h2 {
  margin-bottom: 14px;
  font-size: 25px;
}

.content-card p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
  font-size: 16px;
}

.movie-facts dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.movie-facts div {
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
}

.movie-facts dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.movie-facts dd {
  margin: 6px 0 0;
  font-weight: 900;
}

.related-section {
  padding-top: 40px;
  padding-bottom: 70px;
}

.site-footer {
  margin-top: 44px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 30px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 32px;
}

.footer-brand {
  margin-bottom: 16px;
  color: #67e8f9;
  font-size: 22px;
}

.site-footer p {
  max-width: 460px;
  margin: 0;
  color: #94a3b8;
  line-height: 1.8;
}

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

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

.footer-links a {
  color: #94a3b8;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 18px;
  color: #94a3b8;
  text-align: center;
}

@media (max-width: 1180px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .rank-page-layout,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

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

  .nav-toggle {
    display: inline-flex;
  }

  .hero-carousel {
    height: 78vh;
    min-height: 620px;
  }

  .hero-content {
    left: 20px;
    bottom: 82px;
    width: calc(100% - 40px);
  }

  .hero-control {
    display: none;
  }

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

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

  .category-grid,
  .split-section,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-title-block {
    grid-template-columns: 110px minmax(0, 1fr);
    align-items: center;
  }

  .detail-poster {
    width: 110px;
    border-radius: 18px;
  }

  .movie-facts dl,
  .compact-grid,
  .side-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .home-section,
  .page-shell,
  .detail-hero-inner,
  .detail-content,
  .footer-grid {
    width: min(100% - 22px, 1240px);
  }

  .brand-name {
    font-size: 19px;
  }

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

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

  .movie-card h3 {
    font-size: 14px;
  }

  .movie-card p {
    display: none;
  }

  .hero-actions {
    gap: 10px;
  }

  .primary-button,
  .ghost-button {
    min-height: 42px;
    padding: 0 16px;
  }
}
