:root {
  color-scheme: light;
  --bg: #f0f9ff;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: rgba(14, 116, 144, .14);
  --cyan: #06b6d4;
  --sky: #0ea5e9;
  --blue: #2563eb;
  --yellow: #fde68a;
  --shadow: 0 18px 42px rgba(14, 116, 144, .16);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, .1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(14, 165, 233, .18), transparent 34rem), var(--bg);
  color: var(--ink);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0284c7, #06b6d4, #2563eb);
  box-shadow: 0 12px 34px rgba(2, 132, 199, .28);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand {
  color: #fff;
  white-space: nowrap;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(135deg, #fde68a, #fff, #67e8f9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55), 0 8px 24px rgba(0, 0, 0, .16);
}

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

.menu-toggle {
  display: none;
  margin-left: auto;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

.nav-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-links,
.nav-cats,
.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-links a,
.nav-cats a {
  color: #e0f2fe;
  font-weight: 700;
  transition: color .2s ease, transform .2s ease;
}

.nav-cats a {
  font-size: 13px;
  opacity: .88;
}

.nav-links a:hover,
.nav-cats a:hover {
  color: var(--yellow);
  transform: translateY(-1px);
}

.nav-search {
  width: min(270px, 32vw);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, .92);
  border-radius: 999px;
  padding: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4);
}

.nav-search input,
.hero-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 0;
  outline: 0;
  color: #0f172a;
  background: transparent;
}

.nav-search input {
  padding: 8px 12px;
}

.nav-search button,
.hero-search button {
  border: 0;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  white-space: nowrap;
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #082f49;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  background-size: cover;
  background-position: center;
  transition: opacity .8s ease, transform 1.3s ease;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 160px;
  background: linear-gradient(0deg, var(--bg), transparent);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  align-items: center;
  gap: 44px;
  padding: 68px 0 86px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #fef3c7;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1 {
  margin: 0;
  color: #fff;
  line-height: 1.02;
  text-shadow: 0 12px 36px rgba(0, 0, 0, .34);
}

.hero-copy h1 {
  font-size: clamp(34px, 5vw, 66px);
}

.hero-copy h2 {
  margin-top: 14px;
  font-size: clamp(30px, 4vw, 54px);
}

.hero-summary,
.page-hero p {
  max-width: 720px;
  color: #e0f2fe;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.9;
}

.hero-tags,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.cover-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
  padding: 8px 12px;
  backdrop-filter: blur(12px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 900;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-primary {
  color: #075985;
  background: #fff;
  box-shadow: 0 18px 38px rgba(255, 255, 255, .22);
}

.btn-light {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .34);
  background: rgba(255, 255, 255, .14);
  backdrop-filter: blur(12px);
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, .42);
  transform: rotate(2deg);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(8, 47, 73, .35));
}

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

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

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

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

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

.section-wrap {
  padding: 56px 0;
}

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

.section-title p {
  margin: 0 0 4px;
  color: var(--sky);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.section-title h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 3vw, 38px);
}

.section-title a,
.text-link {
  color: #0284c7;
  font-weight: 900;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(14, 165, 233, .28);
  box-shadow: var(--shadow);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0c4a6e, #0891b2);
}

.movie-card-compact .movie-cover {
  aspect-ratio: 3 / 4;
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.movie-card:hover .movie-cover img,
.category-tile:hover img,
.rank-thumb:hover img {
  transform: scale(1.06);
}

.play-badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #075985;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .25);
}

.cover-pill {
  position: absolute;
  top: 14px;
  right: 14px;
  color: #fff;
  background: rgba(2, 132, 199, .9);
  padding: 6px 10px;
}

.movie-info {
  padding: 16px;
}

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  color: #0f172a;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .2s ease;
}

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

.movie-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-meta span,
.movie-meta a {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f0f9ff;
}

.movie-info p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span {
  color: #0369a1;
  background: #e0f2fe;
  padding: 5px 9px;
}

.category-section {
  padding-top: 28px;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 26px;
  color: #fff;
  background: #0c4a6e;
  box-shadow: var(--shadow-soft);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8, 47, 73, .86), rgba(8, 47, 73, .16));
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  transition: transform .35s ease;
}

.category-tile span,
.category-tile p {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 1;
}

.category-tile span {
  bottom: 62px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  bottom: 14px;
  margin: 0;
  color: #dff6ff;
  font-size: 13px;
  line-height: 1.5;
}

.panel-card,
.content-card,
.detail-meta-card,
.player-card,
.category-card-large {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow-soft);
}

.panel-card {
  padding: 28px;
}

.section-title-small {
  margin-bottom: 18px;
}

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

.rank-list-page {
  gap: 18px;
}

.rank-item {
  display: grid;
  grid-template-columns: 58px 96px 1fr;
  gap: 16px;
  align-items: center;
  border-radius: 20px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  transition: transform .2s ease, box-shadow .2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-soft);
}

.rank-num {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-weight: 1000;
  background: linear-gradient(135deg, #fb923c, #0ea5e9);
}

.rank-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background: #0c4a6e;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.rank-title {
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
}

.rank-main p {
  margin: 8px 0 0;
  color: #475569;
  line-height: 1.6;
}

.page-hero {
  min-height: 360px;
  display: grid;
  align-items: center;
  background: linear-gradient(120deg, #0284c7, #06b6d4, #2563eb);
  background-size: cover;
  background-position: center;
}

.page-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 74px 0;
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 60px);
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  padding: 18px;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  overflow: hidden;
  border-radius: 22px;
}

.category-covers img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.category-card-large h2 {
  margin: 4px 0 10px;
  font-size: 24px;
}

.category-card-large p {
  color: #475569;
  line-height: 1.8;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 160px 160px;
  gap: 12px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.filter-bar input,
.filter-bar select {
  min-height: 46px;
  border-radius: 16px;
  background: #f0f9ff;
  padding: 0 14px;
}

.search-hero .hero-search {
  margin-top: 24px;
}

.hero-search {
  display: flex;
  gap: 10px;
  width: min(620px, 100%);
  border-radius: 999px;
  padding: 6px;
  background: rgba(255, 255, 255, .94);
}

.hero-search input {
  padding: 12px 18px;
}

.search-status {
  margin-bottom: 18px;
  color: #075985;
  font-weight: 900;
}

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

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #0369a1;
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .7fr);
  gap: 26px;
  align-items: start;
}

.player-card {
  padding: 14px;
  background: #0f172a;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: #fff;
  border: 0;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(8, 47, 73, .78), rgba(15, 23, 42, .18));
  transition: opacity .25s ease, visibility .25s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #075985;
  background: #fff;
  font-size: 28px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .32);
}

.detail-side {
  display: grid;
  gap: 16px;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: var(--shadow);
  background: #0c4a6e;
}

.detail-meta-card {
  padding: 22px;
}

.detail-meta-card h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
}

.detail-meta-card p {
  color: #475569;
  line-height: 1.8;
}

.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.detail-facts span {
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 900;
}

.tag-row-wide span {
  margin-bottom: 4px;
}

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

.content-card {
  padding: 26px;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-card p {
  margin: 0;
  color: #334155;
  line-height: 2;
}

.site-footer {
  margin-top: 40px;
  color: #e0f2fe;
  background: linear-gradient(180deg, #1e293b, #020617);
}

.footer-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 42px 0 28px;
}

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

.site-footer p {
  max-width: 680px;
  color: #cbd5e1;
  line-height: 1.8;
}

.footer-links a {
  color: #cbd5e1;
  font-weight: 800;
}

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

.footer-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 20px 0 28px;
  color: #94a3b8;
  font-size: 14px;
}

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

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

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

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

@media (max-width: 860px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-wrap {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-panel {
    display: none;
    width: 100%;
    align-items: stretch;
    gap: 12px;
    padding-bottom: 8px;
  }

  .nav-panel.is-open {
    display: grid;
  }

  .nav-links,
  .footer-links {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .nav-links a {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .12);
  }

  .nav-search {
    width: 100%;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    min-height: 720px;
    padding-top: 44px;
  }

  .hero-poster {
    width: min(310px, 78vw);
    margin: 0 auto;
    transform: none;
  }

  .detail-layout,
  .detail-content,
  .footer-wrap {
    grid-template-columns: 1fr;
  }

  .detail-side {
    grid-template-columns: minmax(160px, 260px) 1fr;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .section-wrap,
  .detail-top,
  .nav-wrap,
  .footer-wrap,
  .footer-copy,
  .page-hero > div {
    width: min(100% - 22px, 1180px);
  }

  .hero-carousel,
  .hero-inner {
    min-height: 760px;
  }

  .hero-actions,
  .hero-search {
    flex-direction: column;
    border-radius: 22px;
  }

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

  .movie-info {
    padding: 13px;
  }

  .movie-title {
    font-size: 15px;
  }

  .movie-info p,
  .nav-cats {
    display: none;
  }

  .rank-item {
    grid-template-columns: 44px 76px 1fr;
    gap: 10px;
  }

  .rank-num {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 13px;
  }

  .rank-main p {
    display: none;
  }

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

  .category-covers img {
    height: 140px;
  }

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