:root {
  --primary: #0059c0;
  --primary-dark: #00438d;
  --primary-soft: #e6f1ff;
  --accent: #ff6b00;
  --accent-soft: #fff3e6;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --page: #f8f9fa;
  --card: #ffffff;
  --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.12), 0 20px 25px -5px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

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

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

.site-shell {
  width: min(1280px, 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(229, 231, 235, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.nav-shell {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-weight: 900;
  font-size: 22px;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-size: 14px;
  box-shadow: 0 12px 24px rgba(0, 89, 192, 0.26);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-weight: 700;
  color: #374151;
}

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

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.header-search input {
  width: 190px;
  border: 0;
  outline: 0;
  padding: 10px 12px;
  background: transparent;
}

.header-search button {
  border: 0;
  padding: 10px 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 10px;
  padding: 9px 12px;
  color: #fff;
  background: var(--primary);
  font-weight: 800;
}

.hero-slider {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #05070d;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.14)), linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 3;
  color: #fff;
  padding: 92px 0;
  max-width: 1280px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 107, 0, 0.14);
  color: var(--accent);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 780px;
  margin: 20px 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  font-weight: 950;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.13);
  color: inherit;
}

.hero-meta {
  color: rgba(255, 255, 255, 0.78);
}

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

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

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

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 16px 30px rgba(0, 89, 192, 0.28);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  backdrop-filter: blur(8px);
}

.btn-ghost.light {
  border-color: rgba(255, 255, 255, 0.36);
}

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

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dot.is-active {
  background: var(--accent);
}

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

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

.section-heading.compact {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.12;
  font-weight: 950;
}

.section-heading a {
  color: var(--primary);
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.86);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.08), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-badge,
.poster-year {
  position: absolute;
  top: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(7px);
}

.poster-badge {
  left: 12px;
}

.poster-year {
  right: 12px;
}

.card-body {
  padding: 16px;
}

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

.card-body h3 a:hover {
  color: var(--primary);
}

.card-body p {
  min-height: 48px;
  margin: 0 0 12px;
  color: #5b6472;
  font-size: 14px;
  line-height: 1.65;
}

.card-meta span {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

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

.card-tags span,
.mini-tags span,
.detail-tags span {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--accent-soft);
  color: #9a4500;
  font-size: 12px;
  font-weight: 800;
}

.movie-card-list {
  display: grid;
  grid-template-columns: 220px 1fr;
}

.movie-card-list .card-poster {
  height: 100%;
  aspect-ratio: auto;
}

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  border-radius: 22px;
  background-size: cover;
  background-position: center;
  color: #fff;
  box-shadow: var(--shadow);
}

.category-tile::before,
.category-overview-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.72));
}

.category-tile span,
.category-tile strong {
  position: relative;
  z-index: 2;
  display: block;
}

.category-tile span {
  margin: 72px 18px 6px;
  font-size: 22px;
  font-weight: 950;
}

.category-tile strong {
  margin: 0 18px 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.5;
}

.category-overview-card {
  display: block;
  min-height: 260px;
  background: #111827;
}

.category-overview-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-overview-card span,
.category-overview-card p {
  position: relative;
  z-index: 2;
  display: block;
  margin-left: 18px;
  margin-right: 18px;
}

.category-overview-card span {
  margin-top: 150px;
  font-size: 24px;
  font-weight: 950;
}

.category-overview-card p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

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

.rank-panel {
  position: sticky;
  top: 92px;
  border-radius: 24px;
  padding: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.rank-title {
  margin-bottom: 14px;
  font-size: 22px;
  font-weight: 950;
}

.rank-item {
  display: grid;
  grid-template-columns: 42px 74px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.rank-item:last-of-type {
  border-bottom: 0;
}

.rank-num {
  color: var(--accent);
  font-size: 18px;
  font-weight: 950;
}

.rank-item img {
  width: 74px;
  height: 50px;
  border-radius: 10px;
  object-fit: cover;
}

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

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

.rank-copy em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.rank-more {
  display: block;
  margin-top: 16px;
  border-radius: 12px;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  text-align: center;
}

.page-hero {
  color: #fff;
  background: radial-gradient(circle at 20% 20%, rgba(255, 107, 0, 0.32), transparent 28%), linear-gradient(135deg, #003b7a, #07111f 62%, #111827);
  padding: 70px 0;
}

.page-hero h1 {
  margin: 14px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 950;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 17px;
  line-height: 1.8;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.filter-panel input {
  min-width: min(420px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  outline: none;
}

.filter-panel input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

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

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

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

.search-results {
  display: grid;
  gap: 16px;
}

.search-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.08);
}

.search-row img {
  width: 180px;
  height: 112px;
  border-radius: 14px;
  object-fit: cover;
}

.search-row h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 950;
}

.search-row p {
  margin: 0 0 12px;
  color: #596273;
  line-height: 1.7;
}

.index-group {
  margin-bottom: 28px;
  border-radius: 22px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.08);
}

.index-group h2 {
  margin: 0 0 16px;
  color: var(--primary);
  font-size: 20px;
  font-weight: 950;
}

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

.index-links a {
  color: #374151;
  line-height: 1.55;
}

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

.detail-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: end;
  background-size: cover;
  background-position: center;
  color: #fff;
}

.detail-hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.5)), linear-gradient(0deg, rgba(0, 0, 0, 0.88), transparent 50%);
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  padding: 56px 0;
}

.back-link {
  display: inline-flex;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 14px 0 16px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.06;
  font-weight: 950;
}

.detail-copy p {
  max-width: 860px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.detail-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 89, 192, 0.22), rgba(0, 0, 0, 0.52));
  color: #fff;
}

.player-cover span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  font-size: 34px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
}

.player-cover.is-hidden {
  display: none;
}

.detail-article {
  margin-top: 30px;
  border-radius: 24px;
  padding: clamp(22px, 4vw, 38px);
  background: #fff;
  box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.08);
}

.detail-article h2 {
  margin: 26px 0 12px;
  font-size: 26px;
  font-weight: 950;
}

.detail-article h2:first-child {
  margin-top: 0;
}

.detail-article p {
  color: #374151;
  font-size: 17px;
  line-height: 1.95;
}

.related-block {
  padding-bottom: 40px;
}

.site-footer {
  margin-top: 70px;
  background: #151a23;
  color: rgba(255, 255, 255, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 42px 0;
}

.footer-logo {
  margin-bottom: 12px;
  color: #fff;
  font-size: 24px;
  font-weight: 950;
}

.site-footer p {
  max-width: 680px;
  margin: 0;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 17px;
  font-weight: 950;
}

.site-footer a {
  display: block;
  margin: 8px 0;
}

.site-footer a:hover {
  color: #fff;
}

.footer-copy {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 18px;
  color: rgba(255, 255, 255, 0.52);
  text-align: center;
}

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

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

  .rank-panel {
    position: static;
  }
}

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

  .nav-links,
  .header-search {
    display: none;
  }

  .nav-links.is-open {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: grid;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .nav-links.is-open a {
    padding: 12px;
    border-radius: 12px;
  }

  .nav-links.is-open a:hover {
    background: var(--primary-soft);
  }

  .hero-slider {
    min-height: 520px;
  }

  .movie-grid,
  .movie-grid.dense,
  .category-grid,
  .category-overview-grid,
  .rank-page-grid,
  .index-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-poster {
    width: min(260px, 70vw);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-shell {
    width: min(100% - 22px, 1280px);
  }

  .brand {
    font-size: 18px;
  }

  .hero-slider {
    min-height: 500px;
  }

  .hero-content {
    padding: 60px 0 80px;
  }

  .hero-actions,
  .filter-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .movie-grid,
  .movie-grid.dense,
  .category-grid,
  .category-overview-grid,
  .rank-page-grid,
  .index-links {
    grid-template-columns: 1fr;
  }

  .movie-card-list,
  .search-row {
    grid-template-columns: 1fr;
  }

  .search-row img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}
