:root {
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --panel: rgba(30, 41, 59, 0.62);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --sky: #38bdf8;
  --blue: #2563eb;
  --yellow: #facc15;
  --red: #ef4444;
  --orange: #f97316;
  --radius: 1rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 34rem), linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.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.94);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 42px rgba(2, 6, 23, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  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, #38bdf8, #2563eb);
  color: #fff;
  font-size: 17px;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.36);
  transition: transform 0.25s ease, filter 0.25s ease;
}

.brand:hover .brand-mark {
  transform: translateY(-2px) scale(1.04);
  filter: brightness(1.1);
}

.brand-copy {
  display: grid;
  line-height: 1.2;
}

.brand-copy strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

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

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #fff;
}

.menu-button {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  padding: 8px 12px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 0 18px;
  border-top: 1px solid var(--line);
}

.mobile-nav.is-open {
  display: grid;
  gap: 12px;
}

.hero {
  position: relative;
  min-height: clamp(640px, 80vh, 860px);
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.1)), var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.24), transparent 24rem), linear-gradient(180deg, rgba(2, 6, 23, 0.06), rgba(2, 6, 23, 0.82));
}

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

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.45fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: 92px 0 118px;
}

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

.hero-pill,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  padding: 7px 13px;
  background: rgba(14, 165, 233, 0.14);
  color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.32);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 18px 0 20px;
  font-size: clamp(44px, 8vw, 86px);
  line-height: 1;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.hero p {
  max-width: 680px;
  margin: 0;
  color: #dbeafe;
  font-size: clamp(18px, 2vw, 23px);
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-tags span,
.tag-list span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(226, 232, 240, 0.16);
  color: #e2e8f0;
  font-size: 13px;
}

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

.primary-button,
.secondary-button,
.search-box a,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  min-height: 50px;
  padding: 0 24px;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #fff;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.34);
}

.secondary-button {
  min-height: 50px;
  padding: 0 22px;
  background: rgba(15, 23, 42, 0.66);
  color: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.16);
}

.primary-button:hover,
.secondary-button:hover,
.search-box a:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 440px;
  border-radius: 28px;
  border: 1px solid rgba(226, 232, 240, 0.16);
  box-shadow: 0 34px 90px rgba(2, 6, 23, 0.66);
  transform: rotate(1.5deg);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 440px;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  font-weight: 900;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: #fff;
  font-size: 36px;
  line-height: 1;
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 28px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 42px;
  background: #fff;
}

.quick-search {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.6);
}

.quick-search-inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  align-items: center;
  gap: 24px;
  padding: 22px 0;
}

.quick-search strong {
  display: block;
  font-size: 20px;
}

.quick-search span {
  color: var(--muted);
  font-size: 14px;
}

.search-box {
  display: flex;
  gap: 10px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.search-box input {
  flex: 1;
  width: 100%;
  min-height: 44px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 0 12px;
}

.search-box a {
  min-width: max-content;
  padding: 0 16px;
  background: rgba(56, 189, 248, 0.16);
  color: #bae6fd;
}

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

.page-main {
  min-height: 70vh;
}

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

.section-heading h2 {
  margin: 12px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
}

.section-link {
  min-width: max-content;
  padding: 10px 16px;
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.24);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.movie-row:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(30, 41, 59, 0.78);
  box-shadow: 0 24px 48px rgba(14, 165, 233, 0.12);
}

.poster-wrap {
  position: relative;
  display: block;
  height: 260px;
  overflow: hidden;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.88));
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.poster-year {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border-radius: 10px;
  padding: 4px 8px;
  background: rgba(2, 6, 23, 0.78);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover,
.row-title:hover {
  color: var(--sky);
}

.card-body p,
.row-content p {
  display: -webkit-box;
  margin: 0 0 13px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta,
.meta-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #94a3b8;
  font-size: 13px;
}

.category-band,
.ranking-strip {
  padding: 64px 0;
  background: rgba(15, 23, 42, 0.44);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 176px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(226, 232, 240, 0.14);
  background-image: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.52)), var(--cat-image);
  background-position: center;
  background-size: cover;
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.28);
  transition: transform 0.25s ease, filter 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  filter: brightness(1.08);
}

.category-card span {
  display: block;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  max-width: 420px;
  margin: 12px 0 0;
  color: #cbd5e1;
  font-size: 14px;
}

.category-card.tall {
  min-height: 240px;
}

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

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

.movie-row {
  display: flex;
  align-items: stretch;
  gap: 16px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.rank-number {
  display: grid;
  flex: 0 0 48px;
  place-items: center;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  font-size: 22px;
  font-weight: 950;
}

.row-cover {
  position: relative;
  flex: 0 0 128px;
  overflow: hidden;
  border-radius: 14px;
  background: #020617;
}

.row-cover img {
  width: 100%;
  height: 100%;
  min-height: 86px;
  object-fit: cover;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  transform: translate(-50%, -50%);
}

.row-content {
  flex: 1;
  min-width: 0;
  display: grid;
  align-content: center;
}

.row-title {
  display: block;
  margin-bottom: 6px;
  color: #fff;
  font-size: 18px;
  font-weight: 850;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-top: 32px;
  padding: 54px;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(37, 99, 235, 0.12)), rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.page-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
}

.category-hero {
  background-image: linear-gradient(135deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.58)), var(--cat-image);
  background-size: cover;
  background-position: center;
}

.category-search {
  max-width: 620px;
  margin-top: 26px;
}

.channel-preview {
  padding-top: 22px;
}

.detail-main {
  min-height: 70vh;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 26px 0 18px;
  color: #94a3b8;
  font-size: 14px;
}

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

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

.detail-primary,
.detail-aside,
.copy-panel,
.aside-panel {
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.26);
}

.detail-primary {
  overflow: hidden;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.main-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.1), rgba(2, 6, 23, 0.48));
  color: #0f172a;
  cursor: pointer;
}

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

.player-overlay span {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  font-size: 34px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.32);
  transition: transform 0.2s ease;
}

.player-overlay:hover span {
  transform: scale(1.07);
}

.detail-copy {
  padding: 28px;
}

.detail-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.copy-panel {
  margin-top: 20px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.42);
}

.copy-panel h2,
.aside-panel h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.copy-panel p {
  margin: 0;
  color: #dbe3ef;
}

.detail-aside {
  position: sticky;
  top: 96px;
  overflow: hidden;
}

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

.aside-panel {
  margin: 16px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
}

.aside-links {
  display: grid;
  gap: 12px;
}

.aside-links a {
  display: flex;
  gap: 10px;
  align-items: center;
}

.aside-links img {
  width: 74px;
  height: 50px;
  flex: 0 0 74px;
  border-radius: 10px;
  object-fit: cover;
}

.aside-links span {
  display: grid;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.aside-links small {
  margin-top: 2px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;
  padding: 42px 0;
}

.footer-brand p {
  max-width: 500px;
  color: var(--muted);
}

.site-footer h3 {
  margin: 0 0 14px;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #94a3b8;
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  color: #64748b;
  text-align: center;
}

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

  .menu-button {
    display: inline-flex;
  }

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

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

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

  .detail-aside {
    position: static;
  }
}

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

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

  .hero {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 70px 0 108px;
  }

  .hero-poster {
    min-height: 300px;
    transform: none;
  }

  .hero-poster img {
    min-height: 300px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-inner,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
  }

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

  .poster-wrap {
    height: 220px;
  }

  .page-hero {
    padding: 30px;
    border-radius: 24px;
  }

  .movie-row {
    display: grid;
    grid-template-columns: 52px 116px 1fr;
    gap: 10px;
  }

  .row-cover {
    flex-basis: auto;
  }

  .detail-copy {
    padding: 20px;
  }
}

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

  .search-box {
    display: grid;
  }

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

  .rank-number {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .row-cover img {
    min-height: 72px;
  }
}
