:root {
  color-scheme: light;
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-400: #38bdf8;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-800: #075985;
  --text-900: #111827;
  --text-700: #374151;
  --text-500: #6b7280;
  --border: #e5e7eb;
  --card: #ffffff;
  --soft: #f8fafc;
  --dark: #0f172a;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius-xl: 1.25rem;
  --radius-2xl: 1.75rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-900);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  line-height: 1.6;
}

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

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

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

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

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

.brand-icon,
.footer-brand span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.25);
}

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

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--text-700);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover,
.mobile-link:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--primary-50);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--primary-700);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.hero-shell {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border-radius: 32px;
  background: var(--dark);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 38px;
  align-items: center;
  padding: clamp(32px, 6vw, 74px);
  color: #ffffff;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.7s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.78) 45%, rgba(15, 23, 42, 0.42) 100%), var(--hero-image);
  background-position: center;
  background-size: cover;
  filter: saturate(1.08);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), transparent);
}

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

.hero-content,
.hero-poster-card {
  position: relative;
  z-index: 2;
}

.hero-kicker {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hero-kicker span,
.card-tags span,
.detail-tags span,
.category-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-style: normal;
  font-weight: 700;
}

.hero-kicker span {
  min-height: 30px;
  padding: 0 12px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(125, 211, 252, 0.28);
}

.hero-content h1,
.hero-content h2 {
  max-width: 780px;
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 5vw, 4.7rem);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #dbeafe;
  font-size: 1.08rem;
}

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

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

.button-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  box-shadow: 0 15px 30px rgba(2, 132, 199, 0.3);
}

.button-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.button-light {
  color: var(--primary-700);
  background: #ffffff;
  border: 1px solid rgba(2, 132, 199, 0.15);
}

.button-primary:hover,
.button-ghost:hover,
.button-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(2, 132, 199, 0.2);
}

.hero-poster-card {
  border-radius: 28px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.hero-poster-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 20px;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  right: 26px;
  bottom: 24px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 44px;
  height: 6px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-active {
  background: #ffffff;
}

.section {
  margin-top: 48px;
}

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

.section-head h2,
.page-title h1 {
  margin: 0;
  color: var(--text-900);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
  color: var(--text-500);
}

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #e0f2fe, #f8fafc);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.62));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--primary-600);
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.3);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-shade,
.movie-card:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

.card-body {
  display: block;
  padding: 15px;
}

.card-body strong {
  display: block;
  min-height: 2.8em;
  color: var(--text-900);
  font-size: 1rem;
  line-height: 1.35;
}

.card-body em {
  display: block;
  margin: 8px 0;
  color: var(--text-500);
  font-size: 0.86rem;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
}

.card-tags span,
.detail-tags span,
.category-pill {
  min-height: 24px;
  padding: 0 9px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-size: 0.78rem;
}

.card-body small {
  display: -webkit-box;
  color: var(--text-500);
  font-size: 0.88rem;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 160px;
  padding: 24px;
  border-radius: var(--radius-2xl);
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  box-shadow: 0 16px 38px rgba(2, 132, 199, 0.2);
}

.category-tile::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -45px;
  bottom: -55px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.category-tile strong {
  position: relative;
  z-index: 2;
  display: block;
  margin-bottom: 8px;
  font-size: 1.4rem;
}

.category-tile span {
  position: relative;
  z-index: 2;
  display: block;
  color: #dbeafe;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
}

.rank-panel,
.info-panel,
.player-card,
.detail-panel,
.filter-panel,
.page-card {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius-2xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.07);
}

.rank-panel,
.info-panel,
.page-card {
  padding: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: var(--soft);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: var(--primary-50);
  transform: translateX(4px);
}

.rank-number {
  color: var(--primary-700);
  font-size: 1.25rem;
  font-weight: 900;
  text-align: center;
}

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

.rank-item strong,
.rank-item em {
  display: block;
}

.rank-item em {
  margin-top: 4px;
  color: var(--text-500);
  font-size: 0.88rem;
  font-style: normal;
}

.page-title {
  margin: 14px 0 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-500);
  font-size: 0.94rem;
}

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

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

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--text-700);
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0 14px;
  color: var(--text-900);
  background: #ffffff;
  outline: none;
}

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

.empty-state {
  display: none;
  padding: 28px;
  color: var(--text-500);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.detail-hero {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 30px;
  align-items: end;
  padding: 28px;
  border-radius: 32px;
  color: #ffffff;
  background-image: linear-gradient(110deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72)), var(--detail-bg);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

.detail-hero img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.35);
}

.detail-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  color: #dbeafe;
}

.detail-hero p {
  max-width: 780px;
  margin: 0;
  color: #e0f2fe;
  font-size: 1.05rem;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  margin-top: 30px;
}

.player-card {
  overflow: hidden;
  background: #020617;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.25), rgba(15, 23, 42, 0.82)), var(--cover-image);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--primary-600);
  box-shadow: 0 20px 45px rgba(2, 132, 199, 0.38);
  font-size: 1.8rem;
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-button:hover {
  transform: scale(1.06);
  background: var(--primary-700);
}

.detail-panel {
  margin-top: 20px;
  padding: 26px;
}

.detail-panel h2,
.info-panel h2,
.rank-panel h2,
.page-card h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
}

.detail-panel p {
  margin: 0 0 18px;
  color: var(--text-700);
  white-space: pre-line;
}

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

.side-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: var(--soft);
  transition: transform 0.2s ease, background 0.2s ease;
}

.side-card:hover {
  transform: translateX(4px);
  background: var(--primary-50);
}

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

.side-card strong,
.side-card span {
  display: block;
}

.side-card span {
  margin-top: 5px;
  color: var(--text-500);
  font-size: 0.88rem;
}

.category-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-pill {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(14, 165, 233, 0.14);
  transition: transform 0.2s ease, background 0.2s ease;
}

.category-pill:hover {
  transform: translateY(-2px);
  background: var(--primary-100);
}

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

.pagination a,
.pagination span,
.pagination b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 14px;
  font-weight: 800;
}

.pagination a {
  color: var(--text-700);
  background: #ffffff;
  border: 1px solid var(--border);
}

.pagination span {
  color: #ffffff;
  background: var(--primary-600);
}

.pagination b {
  color: var(--text-500);
}

.site-footer {
  color: #cbd5e1;
  background: var(--dark);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0 34px;
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 0.9fr 0.9fr;
  gap: 28px;
}

.footer-grid p {
  max-width: 360px;
  color: #94a3b8;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

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

.footer-links a:hover {
  color: var(--primary-400);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: #94a3b8;
}

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

  .hero-slide,
  .detail-hero,
  .detail-layout,
  .rank-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster-card {
    display: none;
  }

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

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

  .menu-toggle {
    display: block;
  }

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

  .page-main {
    width: min(100% - 24px, 1180px);
    padding-top: 20px;
  }

  .hero-shell {
    min-height: 520px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 28px;
  }

  .hero-controls {
    left: 28px;
    right: auto;
  }

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

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

  .card-body {
    padding: 12px;
  }

  .card-body strong {
    min-height: 2.6em;
    font-size: 0.93rem;
  }

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

  .detail-hero {
    padding: 20px;
  }

  .detail-hero img {
    max-width: 220px;
  }

  .region-grid,
  .type-grid {
    grid-template-columns: 1fr;
  }
}
