*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --primary: #38bdf8;
  --secondary: #a855f7;
  --accent: #f97316;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 35%),
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.14), transparent 34%),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 12px 32px rgba(56, 189, 248, 0.28);
}

.logo-text {
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 15px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(148, 163, 184, 0.14);
}

.top-search {
  width: 280px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
}

.top-search input,
.big-search input,
.filter-input,
.filter-select {
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.top-search input {
  width: 100%;
  padding: 7px 10px;
}

.top-search button,
.big-search button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  color: #00111f;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #22d3ee);
}

.top-search button {
  padding: 7px 13px;
}

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

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

.hero-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 26px auto 0;
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 42px;
  align-items: center;
  padding: clamp(26px, 6vw, 76px);
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
}

.hero-bg::after,
.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(56, 189, 248, 0.22), transparent 32%),
    linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.hero-copy,
.hero-poster {
  position: relative;
  z-index: 1;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #7dd3fc;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 16px 0;
  line-height: 1.05;
  font-size: clamp(38px, 7vw, 78px);
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  max-width: 680px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(14, 165, 233, 0.12);
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.2s ease;
}

.btn.primary {
  color: #00111f;
  background: linear-gradient(135deg, #38bdf8, #22d3ee);
  box-shadow: 0 18px 48px rgba(56, 189, 248, 0.28);
}

.btn.ghost {
  border: 1px solid var(--line);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.58);
}

.btn:hover,
.category-tile:hover,
.movie-card:hover,
.mini-card:hover,
.rank-item:hover,
.category-overview-card:hover {
  transform: translateY(-3px);
}

.hero-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.46);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(168, 85, 247, 0.16));
}

.hero-dots {
  position: absolute;
  left: clamp(26px, 6vw, 76px);
  bottom: 28px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 32px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(226, 232, 240, 0.35);
}

.hero-dots button.active {
  width: 56px;
  background: #38bdf8;
}

.section-wrap,
.page-hero,
.detail-inner,
.detail-layout {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.section-head h2 {
  margin: 4px 0 0;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.04em;
}

.section-head a,
.text-link {
  color: #7dd3fc;
  font-weight: 800;
}

.section-head.small h2 {
  font-size: 24px;
}

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

.category-tile,
.category-overview-card,
.content-card,
.side-card,
.player-card,
.hot-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.52));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.category-tile {
  min-height: 132px;
  padding: 22px;
  transition: 0.22s ease;
}

.category-tile span {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 900;
}

.category-tile p,
.movie-line,
.rank-body p,
.category-overview-card p,
.site-footer p,
.content-card p,
.side-card dd {
  color: var(--muted);
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  transition: 0.22s ease;
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.14), rgba(168, 85, 247, 0.12));
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.36s ease;
}

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

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #00111f;
  font-size: 12px;
  font-weight: 900;
  background: #38bdf8;
}

.movie-info {
  padding: 14px;
}

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.45;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
  color: #93c5fd;
  font-size: 13px;
}

.movie-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.movie-line {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

.hot-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.48);
  transition: 0.2s ease;
}

.mini-card:hover {
  border-color: var(--line);
  background: rgba(30, 41, 59, 0.72);
}

.mini-card img {
  width: 58px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.1);
}

.mini-card strong,
.mini-card em {
  display: block;
}

.mini-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

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

.page-hero {
  min-height: 260px;
  display: flex;
  align-items: end;
  padding: 70px 0 48px;
}

.page-hero.slim {
  min-height: 220px;
}

.channel-hero {
  border-bottom: 1px solid var(--line);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #93c5fd;
  font-size: 14px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  transition: 0.22s ease;
}

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

.category-cover-stack img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.1);
}

.category-overview-card h2 {
  margin: 6px 0 8px;
  font-size: 26px;
}

.filter-bar,
.big-search {
  display: flex;
  gap: 12px;
  padding: 12px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-input,
.filter-select,
.big-search input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.42);
}

.filter-input,
.big-search input {
  flex: 1;
  padding: 0 16px;
}

.filter-select {
  min-width: 150px;
  padding: 0 12px;
}

.filter-select option {
  color: #0f172a;
  background: #e2e8f0;
}

.filter-empty {
  display: none;
  margin: 32px 0 0;
  color: var(--muted);
  text-align: center;
}

.filter-empty.visible {
  display: block;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 92px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  transition: 0.22s ease;
}

.rank-num {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #00111f;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, #38bdf8, #a855f7);
}

.rank-poster img {
  width: 92px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
  background: rgba(56, 189, 248, 0.1);
}

.rank-title {
  font-size: 21px;
  font-weight: 900;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.detail-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 64px 0;
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: rgba(56, 189, 248, 0.1);
  box-shadow: var(--shadow);
}

.detail-copy h1 {
  max-width: 850px;
}

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

.detail-meta span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.38);
  color: #dbeafe;
}

.detail-tags {
  margin-bottom: 26px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
  padding: 64px 0;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
}

.player-card,
.content-card,
.side-card {
  padding: 22px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18), rgba(2, 6, 23, 0.74));
}

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

.play-icon {
  width: 70px;
  height: 70px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #38bdf8, #a855f7);
  box-shadow: 0 20px 60px rgba(56, 189, 248, 0.35);
}

.play-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 22px solid #ffffff;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  font-size: 17px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 0;
}

.side-card dt {
  color: #cbd5e1;
  font-weight: 900;
}

.side-card dd {
  margin: 0;
}

.big-search button {
  min-width: 108px;
  padding: 0 22px;
}

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

.search-result-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.search-result-card img {
  width: 86px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.1);
}

.search-result-card h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.search-result-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

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

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 0;
}

.footer-logo {
  margin-bottom: 8px;
  font-size: 20px;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-links a {
  color: #cbd5e1;
}

@media (max-width: 1100px) {
  .top-search {
    display: none;
  }

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

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

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

  .hot-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 66px;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .site-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

  body.nav-open .site-nav {
    display: flex;
  }

  .hero-carousel {
    min-height: 760px;
    border-radius: 28px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
  }

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

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

  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .filter-bar,
  .big-search {
    flex-direction: column;
  }

  .filter-select {
    width: 100%;
  }

  .detail-inner {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .detail-cover {
    width: min(280px, 70vw);
  }

  .rank-item {
    grid-template-columns: 44px 76px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-num {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 16px;
  }

  .rank-poster img {
    width: 76px;
  }

  .footer-inner {
    display: block;
  }
}

@media (max-width: 520px) {
  .logo-text {
    max-width: 176px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero-shell,
  .section-wrap,
  .page-hero,
  .detail-inner,
  .detail-layout,
  .footer-inner {
    width: min(100% - 24px, 1240px);
  }

  .category-grid,
  .movie-grid,
  .movie-grid.compact,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 36px;
  }

  .hero-carousel {
    min-height: 720px;
  }

  .rank-item,
  .search-result-card {
    grid-template-columns: 1fr;
  }
}
