:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --panel-hover: #1e293b;
  --line: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #3b82f6;
  --red: #ef4444;
  --green: #22c55e;
  --yellow: #facc15;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 18px;
}

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

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.24), rgba(59, 130, 246, 0.22));
  color: var(--cyan);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.28);
}

.brand-text,
.footer-brand span:last-child {
  font-size: 1.25rem;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: var(--muted-strong);
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--cyan);
}

.nav-dropdown {
  position: relative;
  padding: 20px 0;
}

.dropdown-panel {
  position: absolute;
  top: 100%;
  left: -18px;
  min-width: 168px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0f172a;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted-strong);
}

.dropdown-link:hover {
  background: var(--panel-hover);
  color: var(--cyan);
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
}

.search-form input {
  width: 260px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #1e293b;
  color: var(--text);
  padding: 10px 44px 10px 16px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}

.search-form button {
  position: absolute;
  right: 8px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}

.search-form button:hover {
  color: var(--cyan);
}

.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: #1e293b;
  color: var(--text);
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 16px 18px;
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-search input {
  width: 100%;
}

.mobile-link,
.mobile-sub-link {
  display: block;
  padding: 10px 0;
  color: var(--muted-strong);
}

.mobile-subnav {
  padding-left: 16px;
  color: var(--muted);
}

.hero-slider {
  position: relative;
  min-height: 70vh;
  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-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.45), rgba(2, 6, 23, 0.72)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.25) 46%, rgba(2, 6, 23, 0.15) 100%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: 74px;
  width: min(660px, calc(100% - 48px));
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--yellow);
  font-weight: 800;
  letter-spacing: 0.05em;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-desc {
  max-width: 620px;
  margin: 0 0 24px;
  color: var(--muted-strong);
  font-size: 1.08rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-tags a,
.hero-tags span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.18);
  font-size: 0.9rem;
}

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

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  background: linear-gradient(90deg, var(--cyan-strong), var(--blue));
  color: #ffffff;
  box-shadow: 0 14px 35px rgba(6, 182, 212, 0.28);
}

.secondary-btn {
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.22);
}

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-arrow.prev {
  left: 18px;
}

.hero-arrow.next {
  right: 18px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 28px;
  background: var(--cyan);
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: #0f172a;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.1;
}

.section-heading p,
.lead {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link {
  color: var(--cyan);
  font-weight: 800;
  white-space: nowrap;
}

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

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

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

.movie-card-link {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: var(--radius);
  background: #0f172a;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.movie-card-link:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.56);
  box-shadow: 0 22px 50px rgba(6, 182, 212, 0.16);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.08) 58%, rgba(0, 0, 0, 0.08));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card-link:hover .poster-shade {
  opacity: 1;
}

.poster-hover-text {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  color: #e2e8f0;
  font-size: 0.9rem;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.25s ease;
}

.movie-card-link:hover .poster-hover-text {
  transform: translateY(0);
  opacity: 1;
}

.score-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--yellow);
  font-size: 0.76rem;
  font-weight: 800;
}

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

.movie-card-title {
  display: -webkit-box;
  min-height: 48px;
  margin-bottom: 8px;
  overflow: hidden;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-meta,
.movie-card-tags {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-card-tags {
  margin-top: 6px;
  color: var(--cyan);
}

.horizontal-row {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 14px;
  scrollbar-color: var(--cyan) transparent;
}

.horizontal-row .movie-card {
  flex: 0 0 268px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #1e293b, #0f172a);
  padding: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 55px rgba(6, 182, 212, 0.16);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.12);
}

.category-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 14px;
  background: rgba(34, 211, 238, 0.16);
  color: var(--cyan);
  font-size: 1.5rem;
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.category-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 28px;
}

.rank-panel {
  border-radius: var(--radius);
  background: #0f172a;
  padding: 22px;
}

.rank-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-link {
  display: grid;
  grid-template-columns: 42px 84px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.rank-link:hover {
  background: var(--panel-hover);
}

.rank-number {
  color: var(--cyan);
  font-weight: 900;
  font-size: 1.05rem;
}

.rank-link img {
  width: 84px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-content strong,
.rank-content span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-content span {
  color: var(--muted);
  font-size: 0.86rem;
}

.rank-score {
  color: var(--yellow);
  font-weight: 900;
}

.filter-section {
  padding-top: 72px;
  padding-bottom: 72px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1.1fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: var(--radius);
  background: #0f172a;
  padding: 24px;
}

.filter-panel h2 {
  margin: 0;
  font-size: 1.5rem;
}

.filter-panel p {
  margin: 8px 0 0;
  color: var(--muted);
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr);
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: #1e293b;
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
}

.page-hero {
  padding: 62px 0 34px;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.14), transparent 34%),
    linear-gradient(180deg, #0f172a, #020617);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 1.05rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.detail-page {
  padding: 34px 0 72px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.82fr);
  gap: 30px;
  align-items: start;
}

.detail-title {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.08;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.detail-meta span,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #0f172a;
  color: var(--cyan);
  font-size: 0.88rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  margin-bottom: 26px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(0, 0, 0, 0.44);
  color: #ffffff;
  padding: 0;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-cover-inner {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 12px;
}

.play-circle {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  box-shadow: 0 16px 38px rgba(6, 182, 212, 0.35);
  font-size: 2rem;
}

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

.content-card {
  margin-bottom: 22px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: var(--radius);
  background: #0f172a;
  padding: 24px;
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 1.32rem;
}

.content-card p {
  margin: 0;
  color: var(--muted-strong);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sidebar-card {
  position: sticky;
  top: 90px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: var(--radius);
  background: #0f172a;
  padding: 22px;
}

.sidebar-card h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.mini-card:hover {
  background: var(--panel-hover);
}

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

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

.mini-card small {
  color: var(--muted);
}

.site-footer {
  background: #0f172a;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 32px;
  padding: 48px 0;
}

.footer-about p {
  max-width: 520px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 1rem;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a:hover {
  color: var(--cyan);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  text-align: center;
  font-size: 0.9rem;
}

@media (max-width: 1024px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

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

  .feature-layout,
  .detail-layout,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .sidebar-card {
    position: static;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .hero-slider {
    min-height: 76vh;
  }

  .hero-content {
    bottom: 68px;
  }

  .hero-arrow {
    display: none;
  }

  .section {
    padding: 50px 0;
  }

  .section-heading {
    display: block;
  }

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

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

  .rank-link {
    grid-template-columns: 34px 72px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }

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

  .detail-page {
    padding-top: 24px;
  }
}

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

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

  .movie-card-title {
    min-height: 42px;
    font-size: 0.92rem;
  }

  .movie-card-meta,
  .movie-card-tags {
    font-size: 0.76rem;
  }
}
