:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: #0f1d31;
  --panel: rgba(15, 29, 49, 0.86);
  --panel-strong: #13243d;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.22);
  --primary: #f97316;
  --primary-dark: #c2410c;
  --cyan: #22d3ee;
  --emerald: #34d399;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 4%, rgba(34, 211, 238, 0.15), transparent 32rem),
    radial-gradient(circle at 80% 8%, rgba(249, 115, 22, 0.18), transparent 28rem),
    linear-gradient(180deg, #06101e 0%, #0b1424 46%, #07111f 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 82%);
  z-index: -1;
}

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: 50;
  background: rgba(7, 17, 31, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 16px 32px rgba(249, 115, 22, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-nav > a {
  color: #cbd5e1;
  font-size: 15px;
  transition: color 0.2s ease;
}

.site-nav > a:hover,
.site-nav > a.active {
  color: white;
}

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

.nav-search input,
.search-panel input,
.filter-bar input,
.filter-bar select {
  color: var(--text);
  border: 0;
  outline: none;
  background: transparent;
}

.nav-search input {
  width: 180px;
  padding: 8px 12px;
}

.nav-search button,
.search-panel button {
  border: 0;
  color: white;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

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

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #050b15;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-bg,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 17, 31, 0.98) 0%, rgba(7, 17, 31, 0.82) 42%, rgba(7, 17, 31, 0.28) 100%),
    linear-gradient(0deg, #07111f 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(1280px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 104px 0 92px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 13px;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 8vw, 88px);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-summary {
  max-width: 720px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: clamp(18px, 2.4vw, 26px);
  line-height: 1.65;
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.16);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 18px 42px rgba(249, 115, 22, 0.32);
}

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

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

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.35);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.quick-search,
.section-shell,
.channel-strip,
.page-shell,
.detail-content,
.player-section,
.detail-body,
.site-footer .footer-grid,
.copyright {
  width: min(1280px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.quick-search {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 540px);
  align-items: center;
  gap: 28px;
  margin-top: -54px;
  position: relative;
  z-index: 8;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 29, 49, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-body h2 {
  margin: 0;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.quick-search h2 {
  font-size: clamp(24px, 3.5vw, 40px);
}

.search-panel {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.45);
}

.search-panel input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
}

.channel-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 28px 0 4px;
}

.channel-strip a {
  flex: 0 0 auto;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.64);
}

.section-shell {
  padding: 70px 0 0;
}

.section-shell.no-pad {
  padding-top: 24px;
}

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

.section-head h2 {
  font-size: clamp(26px, 4vw, 46px);
}

.section-head > a {
  color: var(--cyan);
  font-weight: 800;
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(19, 36, 61, 0.95), rgba(15, 23, 42, 0.82));
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(249, 115, 22, 0.58);
  box-shadow: 0 24px 56px rgba(2, 6, 23, 0.36);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  margin: 0;
  overflow: hidden;
  background: #020617;
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.32);
}

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

.movie-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.movie-line {
  color: var(--muted);
  font-size: 13px;
}

.movie-meta {
  margin: 8px 0 0;
}

.movie-line {
  min-height: 42px;
  margin: 10px 0 12px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

.compact-grid .movie-line {
  min-height: 22px;
  -webkit-line-clamp: 1;
}

.ranking-panel {
  padding-top: 82px;
}

.mini-grid,
.ranking-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.mini-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.mini-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.48);
}

.mini-card img {
  width: 64px;
  height: 82px;
  object-fit: cover;
  border-radius: 12px;
  background: #020617;
}

.mini-card span,
.mini-card small {
  grid-column: 2;
  display: block;
  min-width: 0;
}

.mini-card span {
  font-weight: 900;
  line-height: 1.35;
}

.mini-card small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

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

.category-tile,
.category-card-large {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(19, 36, 61, 0.96), rgba(7, 17, 31, 0.82));
}

.category-tile {
  display: block;
  padding: 24px;
}

.category-tile strong,
.category-card-large h2 {
  display: block;
  font-size: 24px;
  font-weight: 950;
}

.category-tile span,
.category-card-large p {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.75;
}

.page-shell {
  padding: 48px 0 82px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
  padding: 56px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 78% 18%, rgba(249, 115, 22, 0.22), transparent 24rem),
    linear-gradient(135deg, rgba(19, 36, 61, 0.95), rgba(7, 17, 31, 0.86));
  box-shadow: var(--shadow);
}

.small-hero {
  padding-top: 48px;
  padding-bottom: 48px;
}

.page-hero h1 {
  max-width: 780px;
  font-size: clamp(34px, 6vw, 64px);
}

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

.filter-bar {
  position: sticky;
  top: 86px;
  z-index: 20;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(150px, 0.45fr));
  gap: 12px;
  margin: 28px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(7, 17, 31, 0.84);
  backdrop-filter: blur(16px);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
}

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

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

.category-card-large {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
}

.category-card-large img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.44;
  transition: transform 0.45s ease, opacity 0.3s ease;
}

.category-card-large:hover img {
  transform: scale(1.08);
  opacity: 0.58;
}

.category-card-large div {
  position: relative;
  z-index: 2;
  padding: 26px;
  background: linear-gradient(0deg, rgba(7, 17, 31, 0.96), transparent);
}

.category-card-large span {
  display: inline-flex;
  margin-top: 14px;
  color: var(--cyan);
  font-weight: 900;
}

.ranking-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 30px;
}

.detail-page {
  padding-bottom: 82px;
}

.detail-hero {
  position: relative;
  min-height: 580px;
  overflow: hidden;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.36;
  filter: blur(2px);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 17, 31, 0.98), rgba(7, 17, 31, 0.82), rgba(7, 17, 31, 0.62)),
    linear-gradient(0deg, #07111f 0%, transparent 48%);
}

.detail-content {
  position: relative;
  z-index: 2;
  min-height: 580px;
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  align-items: center;
  gap: 46px;
  padding: 72px 0;
}

.detail-poster {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: #020617;
}

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

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

.breadcrumb a {
  color: #cbd5e1;
}

.detail-info h1 {
  max-width: 850px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1;
}

.detail-line {
  max-width: 820px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 21px;
  line-height: 1.7;
}

.detail-meta,
.detail-tags {
  margin-top: 22px;
}

.detail-info .btn {
  margin-top: 30px;
}

.player-section {
  margin-top: 22px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.22));
}

.player-start span {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 38px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 18px 48px rgba(249, 115, 22, 0.38);
}

.player-start strong {
  font-size: 22px;
}

.player-box.is-playing .player-start {
  display: none;
}

.player-message {
  position: absolute;
  left: 22px;
  bottom: 16px;
  margin: 0;
  color: #fecaca;
  font-weight: 700;
}

.detail-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-top: 36px;
}

.detail-body article {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 29, 49, 0.86);
}

.detail-body h2 {
  margin-top: 28px;
  font-size: 30px;
}

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

.detail-body p {
  margin: 14px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.9;
}

.related-section {
  padding-top: 50px;
}

.site-footer {
  margin-top: 90px;
  padding: 54px 0 28px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.34);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 32px;
}

.site-footer h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer a {
  display: block;
  margin-top: 8px;
}

.footer-links {
  columns: 2;
}

.copyright {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: #64748b;
}

@media (max-width: 1180px) {
  .movie-grid,
  .library-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 920px) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(7, 17, 31, 0.96);
    box-shadow: var(--shadow);
  }

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

  .nav-search {
    width: 100%;
  }

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

  .hero,
  .hero-content {
    min-height: 590px;
  }

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

  .category-grid,
  .category-list-grid,
  .ranking-board {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 720px) {
  .nav-shell,
  .quick-search,
  .section-shell,
  .channel-strip,
  .page-shell,
  .detail-content,
  .player-section,
  .detail-body,
  .site-footer .footer-grid,
  .copyright {
    width: min(100% - 24px, 1280px);
  }

  .hero,
  .hero-content {
    min-height: 540px;
  }

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

  .quick-search,
  .page-hero,
  .detail-body article {
    padding: 22px;
  }

  .search-panel {
    border-radius: 24px;
    flex-direction: column;
  }

  .search-panel button {
    min-height: 44px;
  }

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

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

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

  .filter-bar {
    position: static;
    grid-template-columns: 1fr;
  }

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

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

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

  .detail-line,
  .detail-body p {
    font-size: 16px;
  }

  .player-start span {
    width: 72px;
    height: 72px;
    font-size: 30px;
  }
}
