:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.76);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #e2e8f0;
  --radius-lg: 26px;
  --radius-md: 18px;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(71, 85, 105, 0.34), transparent 32rem),
    radial-gradient(circle at top right, rgba(30, 41, 59, 0.55), transparent 34rem),
    linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #475569, #0f172a);
  border: 1px solid rgba(226, 232, 240, 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 14px 34px rgba(0, 0, 0, 0.28);
  color: #f8fafc;
  font-weight: 900;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 19px;
  letter-spacing: 0.02em;
}

.brand-text em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 600;
}

.nav-links a,
.mobile-menu a {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.mobile-menu a:hover {
  color: #ffffff;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.75);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: #e2e8f0;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.92);
}

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

.mobile-menu a {
  padding: 12px 14px;
  border-radius: 12px;
  color: #cbd5e1;
}

.mobile-menu a:hover {
  background: rgba(51, 65, 85, 0.7);
}

main {
  min-height: 70vh;
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: saturate(1.08) contrast(1.1);
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(15, 23, 42, 0.78) 46%, rgba(2, 6, 23, 0.42) 100%),
    linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 360px;
  align-items: center;
  gap: 58px;
  padding: 64px 0;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  font-weight: 900;
}

.eyebrow {
  margin: 0 0 14px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-desc {
  max-width: 700px;
  margin: 24px 0 0;
  color: #dbe4ee;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.72;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: #dbe4ee;
  font-size: 12px;
  font-weight: 700;
}

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

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

.primary-btn {
  background: #f8fafc;
  color: #020617;
  box-shadow: 0 18px 42px rgba(226, 232, 240, 0.18);
}

.ghost-btn {
  border: 1px solid rgba(226, 232, 240, 0.22);
  background: rgba(15, 23, 42, 0.58);
  color: #f8fafc;
}

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

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.18);
  box-shadow: var(--shadow);
  background: rgba(15, 23, 42, 0.75);
}

.hero-poster img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-poster:hover img {
  transform: scale(1.05);
}

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

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.28);
  cursor: pointer;
}

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

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

.home-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 28px;
  align-items: end;
}

.home-intro h2,
.page-hero h1,
.section-title h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.home-intro h2,
.page-hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
}

.home-intro p,
.page-hero p {
  max-width: 760px;
  color: var(--muted-strong);
  font-size: 17px;
  line-height: 1.75;
}

.search-panel {
  width: 100%;
}

.site-search {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 16px;
  outline: none;
  background: rgba(15, 23, 42, 0.78);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.site-search:focus {
  border-color: rgba(226, 232, 240, 0.42);
}

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

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

.section-title a {
  color: #cbd5e1;
  font-weight: 800;
}

.section-title a:hover {
  color: #ffffff;
}

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

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

.category-card {
  min-height: 128px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.62)),
    radial-gradient(circle at top right, rgba(148, 163, 184, 0.18), transparent 18rem);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.25s ease, border 0.25s ease, background 0.25s ease;
}

.category-card.large {
  min-height: 168px;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(226, 232, 240, 0.34);
  background: linear-gradient(145deg, rgba(51, 65, 85, 0.9), rgba(15, 23, 42, 0.72));
}

.category-card span {
  display: block;
  margin-bottom: 12px;
  color: #f8fafc;
  font-size: 20px;
  font-weight: 900;
}

.category-card em {
  color: #aab8ca;
  font-style: normal;
  line-height: 1.65;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card[hidden],
.mini-card[hidden] {
  display: none;
}

.movie-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.58);
  transition: transform 0.25s ease, border 0.25s ease, background 0.25s ease;
}

.movie-card a:hover {
  transform: translateY(-5px);
  border-color: rgba(226, 232, 240, 0.32);
  background: rgba(15, 23, 42, 0.82);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.68), transparent 42%);
}

.poster-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.poster-type {
  right: 12px;
  bottom: 12px;
  min-height: 28px;
  padding: 0 10px;
  background: rgba(248, 250, 252, 0.92);
  color: #020617;
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  background: rgba(2, 6, 23, 0.82);
  border: 1px solid rgba(226, 232, 240, 0.22);
  color: #f8fafc;
}

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

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h2,
.movie-card h3 {
  min-height: 48px;
  margin: 0 0 10px;
  color: #f8fafc;
  font-size: 17px;
  line-height: 1.38;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card p {
  min-height: 66px;
  margin: 0 0 14px;
  color: #9fb0c4;
  font-size: 13px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 11px;
}

.ranking-panel {
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.58);
}

.section-title.compact {
  margin-bottom: 16px;
}

.section-title.compact h2 {
  font-size: 24px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: auto 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.28);
  transition: transform 0.2s ease, border 0.2s ease;
}

.mini-card:hover {
  transform: translateX(4px);
  border-color: rgba(226, 232, 240, 0.3);
}

.mini-card img {
  width: 54px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
}

.mini-card span {
  min-width: 0;
}

.mini-card strong,
.mini-card em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card strong {
  color: #f8fafc;
  font-size: 14px;
}

.mini-card em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.mini-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: rgba(226, 232, 240, 0.12);
  color: #f8fafc;
  font-weight: 900;
  font-size: 12px;
}

.page-main {
  padding-top: 28px;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.62)),
    radial-gradient(circle at top right, rgba(148, 163, 184, 0.22), transparent 22rem);
  box-shadow: var(--shadow);
}

.page-hero.slim {
  padding: clamp(32px, 5vw, 62px);
}

.page-hero .search-panel {
  max-width: 620px;
  margin-top: 28px;
}

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

.sticky-panel {
  position: sticky;
  top: 94px;
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.breadcrumb em {
  color: #e2e8f0;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-block,
.side-info,
.side-poster {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.22);
}

.player-card {
  overflow: hidden;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-player {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.48), rgba(2, 6, 23, 0.18));
  color: #ffffff;
  cursor: pointer;
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: rgba(248, 250, 252, 0.92);
  color: #020617;
  font-size: 28px;
  text-indent: 4px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.play-cover strong {
  font-size: 18px;
  letter-spacing: 0.08em;
}

.detail-block {
  margin-top: 20px;
  padding: clamp(22px, 4vw, 34px);
}

.headline-block {
  margin-top: 22px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.detail-meta span {
  padding: 6px 11px;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.26);
  font-size: 12px;
  font-weight: 800;
}

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

.detail-block h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 900;
}

.lead-text,
.detail-block p {
  color: #cbd5e1;
  line-height: 1.85;
  font-size: 16px;
}

.lead-text {
  font-size: 18px;
}

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

.detail-side {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 18px;
}

.side-poster {
  overflow: hidden;
}

.side-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.side-info {
  padding: 22px;
}

.side-info h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

.side-info p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 13px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted);
}

.side-info strong,
.side-info a {
  color: #f8fafc;
}

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

.site-footer {
  margin-top: 52px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.8);
}

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

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-grid p,
.footer-links a,
.footer-bottom {
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

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

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  text-align: center;
}

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

  .nav-toggle {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .hero-poster {
    width: min(320px, 78vw);
  }

  .home-intro,
  .split-section,
  .ranking-layout,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ranking-panel,
  .detail-side,
  .sticky-panel {
    position: static;
  }

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

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

@media (max-width: 720px) {
  .site-nav {
    height: 64px;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text em {
    display: none;
  }

  .hero,
  .hero-content {
    min-height: calc(100vh - 64px);
  }

  .hero-content {
    padding: 38px 0 82px;
  }

  .hero-copy h1 {
    font-size: clamp(38px, 13vw, 58px);
  }

  .hero-desc {
    font-size: 16px;
  }

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

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

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

  .movie-card-content {
    padding: 13px;
  }

  .movie-card h2,
  .movie-card h3 {
    min-height: 44px;
    font-size: 15px;
  }

  .movie-card p {
    min-height: 58px;
    font-size: 12px;
    -webkit-line-clamp: 3;
  }

  .page-hero.slim {
    padding: 28px 20px;
  }

  .detail-block {
    padding: 22px;
  }

  .breadcrumb {
    flex-wrap: wrap;
  }
}

@media (max-width: 460px) {
  .category-grid,
  .category-grid.wide,
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .mini-card {
    grid-template-columns: auto 48px minmax(0, 1fr);
  }

  .mini-card img {
    width: 48px;
    height: 64px;
  }
}
