:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-panel: rgba(15, 23, 42, 0.86);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --brand: #22d3ee;
  --brand-strong: #06b6d4;
  --brand-dark: #083344;
  --gold: #facc15;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  background:
    radial-gradient(circle at 18% 10%, rgba(34, 211, 238, 0.12), transparent 28%),
    radial-gradient(circle at 82% 0%, rgba(59, 130, 246, 0.14), transparent 30%),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.24);
}

.header-inner {
  max-width: 1320px;
  height: 66px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #061421;
  background: linear-gradient(135deg, #67e8f9, #22d3ee 45%, #38bdf8);
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.38);
  font-size: 14px;
}

.logo-text,
.footer-logo {
  font-size: 22px;
  background: linear-gradient(90deg, #67e8f9, #38bdf8, #a5f3fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.main-nav a {
  color: var(--soft);
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 15px;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--brand);
  background: rgba(30, 41, 59, 0.78);
  transform: translateY(-1px);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 310px;
}

.nav-search input,
.large-search input,
.search-panel input,
.search-panel select {
  width: 100%;
  color: var(--text);
  background: rgba(2, 6, 23, 0.64);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  outline: none;
  padding: 11px 14px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.nav-search input:focus,
.large-search input:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(34, 211, 238, 0.74);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
  background: rgba(2, 6, 23, 0.88);
}

.nav-search button,
.large-search button,
.search-panel button,
.primary-btn {
  border: 0;
  color: #04111d;
  background: linear-gradient(135deg, #67e8f9, #22d3ee 56%, #38bdf8);
  border-radius: 14px;
  padding: 11px 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 16px 36px rgba(34, 211, 238, 0.18);
  transition: transform 0.25s ease, filter 0.25s ease;
}

.nav-search button:hover,
.large-search button:hover,
.search-panel button:hover,
.primary-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  padding: 10px;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 99px;
}

.mobile-panel {
  display: none;
  padding: 0 22px 18px;
  border-top: 1px solid var(--line);
}

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

.mobile-panel a,
.mobile-panel form {
  display: block;
  margin-top: 12px;
}

.mobile-panel a {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.5);
  color: var(--soft);
}

.mobile-panel a.is-active {
  color: var(--brand);
}

.mobile-panel form {
  display: flex;
  gap: 8px;
}

.mobile-panel input {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(2, 6, 23, 0.68);
}

.mobile-panel button {
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  color: #04111d;
  background: var(--brand);
  font-weight: 800;
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
  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,
.detail-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.04);
}

.hero-overlay,
.detail-backdrop span {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 40%, rgba(2, 6, 23, 0.48) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.55) 44%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  min-height: 72vh;
  margin: 0 auto;
  padding: 110px 22px 90px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}

.eyebrow,
.section-kicker {
  color: var(--brand);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 13px;
}

.hero-content h1 {
  width: min(760px, 100%);
  margin: 16px 0;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-content p {
  width: min(680px, 100%);
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
}

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

.tag-row span {
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

.hero-tags {
  margin-bottom: 28px;
}

.hero-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.ghost-btn {
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: var(--text);
  background: rgba(15, 23, 42, 0.62);
  border-radius: 14px;
  padding: 11px 18px;
  font-weight: 700;
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.ghost-btn:hover {
  color: var(--brand);
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(15, 23, 42, 0.9);
  transform: translateY(-2px);
}

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

.hero-dots button {
  width: 38px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.35);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 58px;
  background: var(--brand);
}

.content-section {
  max-width: 1320px;
  margin: 0 auto;
  padding: 58px 22px;
}

.quick-search-section {
  padding-top: 48px;
}

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

.center-heading {
  align-items: center;
  text-align: center;
  flex-direction: column;
  max-width: 760px;
  margin: 0 auto 28px;
}

.compact-heading {
  align-items: center;
}

.section-heading h2,
.inner-hero h1,
.detail-info h1 {
  margin: 6px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.035em;
}

.section-heading p,
.inner-hero p,
.category-card p,
.footer-inner p {
  color: var(--muted);
  line-height: 1.8;
}

.section-heading a,
.full-link {
  color: var(--brand);
  font-weight: 800;
}

.large-search {
  max-width: 760px;
  margin: 0 auto 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.66);
  box-shadow: var(--shadow);
}

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

.category-chip,
.category-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 118px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.62));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-chip:hover,
.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.5);
  background: linear-gradient(145deg, rgba(8, 47, 73, 0.92), rgba(15, 23, 42, 0.8));
}

.category-chip span,
.category-card h2 {
  font-weight: 800;
  font-size: 18px;
}

.category-chip small {
  color: var(--muted);
  line-height: 1.65;
}

.category-card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #04111d;
  background: var(--brand);
  font-weight: 900;
}

.category-card-link {
  margin-top: auto;
  color: var(--brand);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 20px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22);
  transition: transform 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.34);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: #0f172a;
  overflow: hidden;
}

.movie-card-large .movie-cover {
  aspect-ratio: 16 / 9;
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.movie-card:hover .movie-cover img {
  transform: scale(1.08);
  filter: saturate(1.12);
}

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), transparent 58%);
  opacity: 0.78;
}

.play-icon {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #04111d;
  background: rgba(34, 211, 238, 0.95);
  box-shadow: 0 14px 34px rgba(34, 211, 238, 0.18);
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.movie-card:hover .play-icon {
  transform: translateY(0);
  opacity: 1;
}

.rank-number {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #04111d;
  background: var(--gold);
  font-weight: 900;
}

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

.movie-card-body h3 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-card-body p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.movie-meta span,
.detail-meta span {
  padding: 5px 8px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.75);
}

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

.ranking-panel,
.detail-article,
.search-panel,
.player-shell,
.related-section,
.ranking-wide {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.ranking-panel {
  position: sticky;
  top: 86px;
  padding: 22px;
}

.ranking-panel-head h2 {
  margin: 6px 0 18px;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.54);
  transition: background 0.22s ease, transform 0.22s ease;
}

.ranking-row:hover {
  background: rgba(8, 47, 73, 0.78);
  transform: translateX(3px);
}

.ranking-index {
  color: var(--brand);
  font-weight: 900;
}

.ranking-title {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ranking-info {
  color: var(--muted);
  font-size: 13px;
}

.full-link {
  display: inline-block;
  margin-top: 18px;
}

.inner-hero {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  background:
    radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
  border-bottom: 1px solid var(--line);
}

.inner-hero > div {
  max-width: 1320px;
  margin: 0 auto;
  padding: 76px 22px;
}

.inner-hero p {
  max-width: 760px;
  font-size: 18px;
}

.small-actions {
  margin-top: 22px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
}

.page-link,
.page-gap {
  min-width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--soft);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  padding: 0 12px;
}

.page-link:hover,
.page-link.is-current {
  color: #04111d;
  background: var(--brand);
  border-color: transparent;
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.detail-layout {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  margin: 0 auto;
  padding: 84px 22px 58px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 38px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(226, 232, 240, 0.2);
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4;
  background: #0f172a;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  margin-bottom: 14px;
}

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

.detail-info h1 {
  font-size: clamp(42px, 6vw, 72px);
  margin-bottom: 18px;
}

.detail-one-line {
  max-width: 780px;
  color: #dbeafe;
  line-height: 1.8;
  font-size: 19px;
  margin: 0 0 20px;
}

.detail-tags {
  margin: 16px 0 26px;
}

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

.player-shell {
  overflow: hidden;
  padding: 16px;
  margin-bottom: 28px;
}

.video-player-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: white;
  border: 0;
  cursor: pointer;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.3)),
    radial-gradient(circle, rgba(34, 211, 238, 0.22), transparent 30%);
  z-index: 4;
}

.video-player-card.is-playing .player-overlay {
  display: none;
}

.big-play {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  color: #04111d;
  background: var(--brand);
  border-radius: 999px;
  font-size: 32px;
  box-shadow: 0 0 60px rgba(34, 211, 238, 0.36);
}

.player-overlay strong {
  font-size: clamp(22px, 3vw, 34px);
}

.player-overlay small {
  color: #cbd5e1;
}

.detail-text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 28px;
}

.detail-article {
  padding: 24px;
}

.detail-article h2,
.related-section h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-article p {
  margin: 0;
  color: #cbd5e1;
  line-height: 2;
}

.related-section,
.ranking-wide {
  padding: 24px;
}

.search-page {
  padding-top: 34px;
}

.search-panel {
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr 160px 150px auto;
  gap: 12px;
  margin-bottom: 24px;
}

.search-summary {
  color: var(--muted);
  margin-bottom: 18px;
}

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

.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 34px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.footer-links a:hover {
  color: var(--brand);
}

@media (max-width: 1120px) {
  .nav-search {
    min-width: 220px;
  }

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

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

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

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .main-nav,
  .nav-search {
    display: none;
  }

  .mobile-toggle {
    display: flex;
    margin-left: auto;
  }

  .hero-content {
    padding-top: 88px;
  }

  .featured-grid,
  .compact-grid,
  .category-chip-grid,
  .category-card-grid,
  .detail-layout,
  .detail-text-grid,
  .search-panel {
    grid-template-columns: 1fr 1fr;
  }

  .detail-layout {
    align-items: start;
  }

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

  .ranking-row {
    grid-template-columns: 42px 1fr;
  }

  .ranking-info {
    grid-column: 2;
  }
}

@media (max-width: 620px) {
  .header-inner {
    padding: 0 16px;
  }

  .hero-carousel,
  .hero-content {
    min-height: 78vh;
  }

  .hero-content {
    padding: 92px 16px 82px;
  }

  .content-section,
  .inner-hero > div,
  .detail-layout {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-heading,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .large-search,
  .featured-grid,
  .compact-grid,
  .category-chip-grid,
  .category-card-grid,
  .detail-layout,
  .detail-text-grid,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-info h1 {
    font-size: 38px;
  }

  .player-shell,
  .related-section,
  .ranking-wide {
    padding: 10px;
    border-radius: 18px;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}
