:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #2dd4bf;
  --accent-dark: #0f766e;
  --gold: #fbbf24;
  --danger: #fb7185;
  --radius: 18px;
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(45, 212, 191, 0.16), transparent 32rem),
    radial-gradient(circle at 90% 12%, rgba(59, 130, 246, 0.14), transparent 30rem),
    var(--bg);
}

body,
input,
button,
select,
textarea {
  font: inherit;
}

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

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

button,
select,
input {
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #042f2e;
  background: linear-gradient(135deg, var(--accent), #67e8f9);
  box-shadow: 0 0 30px rgba(45, 212, 191, 0.3);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted-strong);
  font-size: 14px;
}

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

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid var(--line);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.94);
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  color: var(--muted-strong);
  border-radius: 12px;
}

.mobile-nav.is-open {
  display: block;
}

main {
  overflow: hidden;
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 540px;
  overflow: hidden;
  background: #020617;
}

.hero-static-title {
  position: absolute;
  z-index: 4;
  left: max(24px, calc((100% - 1180px) / 2));
  top: 34px;
  opacity: 0.92;
}

.hero-static-title h1 {
  margin: 0;
  font-size: clamp(18px, 2vw, 24px);
  color: #ffffff;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) brightness(0.76);
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.72) 38%, rgba(2, 6, 23, 0.24) 72%, rgba(2, 6, 23, 0.8) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.2) 42%, transparent 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: end;
  gap: 42px;
  padding: 112px 0 82px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: #ffffff;
  font-weight: 900;
  line-height: 1.04;
}

.hero-copy h2 {
  font-size: clamp(42px, 7vw, 82px);
  max-width: 760px;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.hero-copy p {
  margin: 22px 0 0;
  max-width: 690px;
  color: var(--muted-strong);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.9;
}

.hero-actions,
.detail-info .btn-primary {
  margin-top: 28px;
}

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

.btn-primary,
.btn-ghost,
.btn-soft,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  color: #042f2e;
  background: linear-gradient(135deg, var(--accent), #67e8f9);
  box-shadow: 0 16px 38px rgba(45, 212, 191, 0.26);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-soft,
.section-link {
  color: var(--accent);
  background: rgba(20, 184, 166, 0.12);
  border: 1px solid rgba(45, 212, 191, 0.24);
}

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

.hero-focus-card {
  align-self: end;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-focus-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-focus-card div {
  padding: 18px;
}

.hero-focus-card span {
  display: block;
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 8px;
}

.hero-focus-card strong {
  display: block;
  font-size: 20px;
  line-height: 1.35;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 34px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transform: translateY(-50%);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

.hero-dots button {
  width: 32px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

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

.content-section,
.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.content-section {
  padding: 54px 0;
}

.lead-search {
  padding-bottom: 18px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  color: #ffffff;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 150px 150px 170px;
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid var(--line);
}

.search-box span {
  color: var(--accent);
  font-size: 20px;
}

.search-box input,
.filter-panel select {
  width: 100%;
  height: 48px;
  color: #ffffff;
  background: transparent;
  outline: none;
}

.filter-panel select {
  padding: 0 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid var(--line);
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(45, 212, 191, 0.42);
  background: rgba(15, 23, 42, 0.96);
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(20, 184, 166, 0.16));
}

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

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

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #042f2e;
  background: var(--accent);
  box-shadow: 0 12px 30px rgba(45, 212, 191, 0.28);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 36px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #111827;
  background: var(--gold);
  font-weight: 900;
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.movie-card h3 {
  margin: 0;
  min-height: 48px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 12px;
}

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

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

.movie-card-wide {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 132px;
}

.wide-poster {
  aspect-ratio: 16 / 10;
  height: 100%;
}

.movie-card-wide h3 {
  min-height: auto;
}

.side-panel {
  position: sticky;
  top: 90px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.side-panel h2 {
  margin: 0 0 16px;
}

.category-pill-list {
  display: grid;
  gap: 10px;
}

.category-pill-list a {
  display: block;
  padding: 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid var(--line);
}

.category-pill-list strong {
  display: block;
  margin-bottom: 6px;
  color: #ffffff;
}

.category-pill-list span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.page-shell {
  padding-top: 30px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  margin: 16px 0 22px;
}

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

.breadcrumb strong {
  color: var(--muted-strong);
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: 48px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(20, 184, 166, 0.18)),
    rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

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

.page-hero p {
  max-width: 680px;
  color: var(--muted-strong);
  line-height: 1.9;
  font-size: 17px;
}

.ranking-hero {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.ranking-hero img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  display: flex;
  align-items: end;
  padding: 24px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.5s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.16));
}

.category-card:hover img {
  transform: scale(1.05);
}

.category-card div {
  position: relative;
  z-index: 1;
}

.category-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.category-card p {
  margin: 0;
  max-width: 520px;
  color: var(--muted-strong);
  line-height: 1.7;
}

.category-card span {
  display: inline-flex;
  margin-top: 18px;
  color: var(--accent);
  font-weight: 800;
}

.detail-shell {
  overflow: visible;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 28px;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(20, 184, 166, 0.13)),
    rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow);
}

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

.detail-info h1 {
  font-size: clamp(34px, 5vw, 64px);
}

.detail-one-line {
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.9;
  margin: 18px 0 0;
}

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

.detail-meta-grid div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.56);
  border: 1px solid var(--line);
}

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

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

.detail-meta-grid span {
  color: #ffffff;
  font-weight: 700;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(2, 6, 23, 0.72);
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: brightness(0.7);
}

.big-play {
  position: relative;
  z-index: 1;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: #042f2e;
  background: linear-gradient(135deg, var(--accent), #67e8f9);
  box-shadow: 0 20px 60px rgba(45, 212, 191, 0.36);
  font-size: 34px;
  padding-left: 6px;
}

.detail-text {
  display: grid;
  gap: 14px;
  padding: 32px;
  margin-top: 54px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

.detail-text h2 {
  margin: 12px 0 0;
  font-size: 26px;
}

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

.detail-text p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 2;
  font-size: 16px;
}

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

.full-ranking .movie-card-wide {
  min-height: 150px;
}

.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.85);
}

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

.footer-brand {
  margin-bottom: 16px;
}

.site-footer p,
.site-footer a,
.site-footer h3 {
  margin: 0;
}

.site-footer p {
  max-width: 480px;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h3 {
  color: #ffffff;
  margin-bottom: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--muted);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 32px;
  color: #64748b;
  border-top: 1px solid var(--line);
}

[data-card].is-hidden {
  display: none;
}

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

  .menu-toggle {
    display: block;
  }

  .hero-content {
    grid-template-columns: minmax(0, 1fr);
  }

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

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

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

  .side-panel {
    position: static;
  }

  .detail-poster {
    max-width: 330px;
  }

  .full-ranking {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .header-inner {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-content {
    width: min(100% - 28px, 1180px);
    padding-bottom: 72px;
  }

  .hero-copy h2 {
    font-size: 40px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

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

  .movie-card h3 {
    font-size: 15px;
  }

  .movie-card-wide {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .page-hero,
  .detail-hero,
  .detail-text {
    padding: 22px;
    border-radius: 24px;
  }

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

  .footer-grid {
    gap: 28px;
  }
}

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

  .movie-card-wide {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .wide-poster {
    min-height: 150px;
  }

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