:root {
  --sky-50: #f0f9ff;
  --sky-100: #e0f2fe;
  --sky-500: #0ea5e9;
  --sky-600: #0284c7;
  --sky-700: #0369a1;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --white: #ffffff;
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
  --radius-lg: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--sky-50), var(--white) 420px, var(--slate-50));
  color: var(--slate-900);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--sky-600), var(--emerald-500));
  border-radius: 12px;
  box-shadow: 0 12px 25px rgba(2, 132, 199, 0.25);
}

.brand-mark.small {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.brand-mark span {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid var(--white);
}

.brand-name {
  font-size: 21px;
  letter-spacing: -0.02em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link,
.mobile-link {
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--slate-700);
  transition: 0.2s ease;
}

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  background: var(--sky-100);
  color: var(--sky-700);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--slate-100);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--slate-700);
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
}

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

.mobile-link {
  padding: 12px 14px;
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--slate-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s 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.86) 0%, rgba(15, 23, 42, 0.62) 46%, rgba(15, 23, 42, 0.12) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
}

.hero-copy {
  width: min(650px, 100%);
  color: var(--white);
  padding-bottom: 54px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  margin-bottom: 16px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(186, 230, 253, 0.28);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.hero-copy h2 + p,
.hero-copy h1 + h2 + p {
  margin-top: 0;
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.movie-card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.movie-card-tags span,
.detail-tags a {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--white);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

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

.btn.primary {
  background: var(--sky-600);
  color: var(--white);
  box-shadow: 0 16px 30px rgba(2, 132, 199, 0.3);
}

.btn.primary:hover {
  background: var(--sky-700);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn.subtle {
  background: rgba(255, 255, 255, 0.08);
  color: #e0f2fe;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.hero-control.prev {
  left: 26px;
}

.hero-control.next {
  right: 26px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  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: 28px;
  background: var(--white);
}

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 74px;
  z-index: 4;
  width: min(520px, calc(100% - 32px));
  display: flex;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.25);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 14px;
  background: transparent;
  color: var(--white);
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.hero-search button {
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  background: var(--sky-600);
  color: var(--white);
  font-weight: 800;
  cursor: pointer;
}

.page-section {
  padding: 52px 0;
}

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

.section-heading > div {
  position: relative;
  padding-left: 16px;
}

.section-heading > div > span {
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 30px;
  border-radius: 999px;
  background: var(--sky-600);
}

.section-heading h2 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3.6vw, 34px);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 0;
  color: var(--slate-600);
  line-height: 1.7;
}

.section-heading a {
  flex: 0 0 auto;
  color: var(--sky-700);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--slate-900);
}

.movie-card.compact .movie-poster {
  aspect-ratio: 16 / 10;
}

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

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

.movie-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 45%, rgba(15, 23, 42, 0.74));
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--sky-700);
  font-size: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 36px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #facc15);
  color: var(--white);
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.24);
}

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

.movie-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--slate-500);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--sky-700);
}

.movie-card p {
  min-height: 52px;
  margin: 0 0 14px;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.65;
}

.movie-card-tags span {
  background: var(--slate-100);
  color: var(--slate-600);
}

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

.category-tile {
  min-height: 150px;
  padding: 22px;
  border: 1px solid rgba(186, 230, 253, 0.88);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(224, 242, 254, 0.88), rgba(255, 255, 255, 0.96));
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.category-tile span {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 900;
  color: var(--sky-700);
}

.category-tile p {
  margin: 0;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.7;
}

.home-category-block {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
}

.page-hero {
  position: relative;
  padding: 74px 0;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sky-700), var(--emerald-600));
  color: var(--white);
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -48% 35%;
  height: 240px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  filter: blur(16px);
}

.page-hero.slim {
  padding: 62px 0;
}

.page-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0;
  color: #e0f2fe;
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 20px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.filter-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.filter-row.three {
  grid-template-columns: 2fr 1fr 1fr;
}

.filter-row label {
  display: grid;
  gap: 8px;
  color: var(--slate-700);
  font-size: 14px;
  font-weight: 800;
}

.filter-row input,
.filter-row select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--slate-200);
  border-radius: 13px;
  padding: 0 13px;
  color: var(--slate-800);
  background: var(--white);
  outline: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--sky-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.clear-filter {
  margin-top: 16px;
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  background: var(--slate-100);
  color: var(--slate-700);
  font-weight: 800;
  cursor: pointer;
}

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

.category-overview-card,
.side-panel,
.detail-card {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.category-overview-card {
  padding: 24px;
}

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.category-overview-head span {
  font-size: 22px;
  font-weight: 900;
}

.category-overview-head a {
  color: var(--sky-700);
  font-weight: 800;
}

.category-overview-card p {
  margin: 0 0 18px;
  color: var(--slate-600);
  line-height: 1.7;
}

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

.side-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.18s ease;
}

.side-card:hover {
  background: var(--slate-50);
}

.side-card img {
  width: 112px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
}

.side-card strong {
  display: block;
  margin-bottom: 5px;
  color: var(--slate-900);
  line-height: 1.35;
}

.side-card em {
  color: var(--slate-500);
  font-style: normal;
  font-size: 12px;
}

.detail-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 22px 0 0;
  color: var(--slate-500);
  font-size: 14px;
}

.detail-crumb a:hover {
  color: var(--sky-700);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding: 28px 0 58px;
}

.detail-main {
  min-width: 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000000;
  box-shadow: var(--shadow-md);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.22), rgba(2, 6, 23, 0.38));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--sky-700);
  font-size: 28px;
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.28);
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-card {
  margin-top: 24px;
  padding: 26px;
}

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

.detail-title-row .hero-kicker {
  margin-bottom: 12px;
  color: var(--sky-700);
  background: var(--sky-100);
  border-color: var(--sky-100);
}

.detail-title-row h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.detail-meta-grid p {
  margin: 0;
  padding: 14px;
  border-radius: 16px;
  background: var(--slate-50);
}

.detail-meta-grid strong,
.detail-meta-grid span {
  display: block;
}

.detail-meta-grid strong {
  margin-bottom: 5px;
  color: var(--slate-500);
  font-size: 12px;
}

.detail-meta-grid span {
  color: var(--slate-900);
  font-weight: 800;
}

.text-block {
  margin-top: 24px;
}

.text-block h2,
.side-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.text-block p {
  margin: 0 0 12px;
  color: var(--slate-700);
  font-size: 16px;
  line-height: 1.9;
}

.review-block {
  padding-top: 20px;
  border-top: 1px solid var(--slate-200);
}

.review-block p {
  padding: 18px;
  border-radius: 18px;
  background: var(--sky-50);
  color: var(--slate-800);
}

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

.detail-tags a {
  background: var(--slate-100);
  color: var(--slate-700);
}

.detail-tags a:hover {
  background: var(--sky-100);
  color: var(--sky-700);
}

.detail-side {
  min-width: 0;
}

.side-panel {
  position: sticky;
  top: 90px;
  padding: 20px;
}

.site-footer {
  margin-top: 42px;
  background: var(--slate-900);
  color: #cbd5e1;
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
}

.footer-brand p,
.footer-column a {
  color: #94a3b8;
}

.footer-brand p {
  margin: 12px 0 0;
  line-height: 1.7;
}

.footer-column h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 17px;
}

.footer-links {
  display: grid;
  gap: 9px;
}

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

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

[hidden] {
  display: none !important;
}

@media (max-width: 1024px) {
  .movie-grid,
  .movie-grid.small-grid,
  .ranking-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .side-panel {
    position: static;
  }

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

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

  .menu-button {
    display: block;
  }

  .hero-carousel {
    height: 620px;
  }

  .hero-copy {
    padding-bottom: 116px;
  }

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

  .hero-control {
    display: none;
  }

  .hero-search {
    bottom: 58px;
  }

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

  .movie-grid,
  .movie-grid.small-grid,
  .ranking-grid,
  .category-grid,
  .category-overview-grid,
  .footer-inner,
  .filter-row,
  .filter-row.three {
    grid-template-columns: 1fr;
  }

  .page-section {
    padding: 36px 0;
  }

  .detail-title-row {
    flex-direction: column;
  }

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

  .side-card {
    grid-template-columns: 96px 1fr;
  }

  .side-card img {
    width: 96px;
    height: 64px;
  }
}
