:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --shadow: 0 24px 80px rgba(2, 8, 23, 0.45);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "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 top left, rgba(34, 211, 238, 0.12), transparent 28rem), linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-size: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.28);
}

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

.desktop-nav a,
.mobile-panel a {
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav .is-active,
.mobile-panel a:hover,
.mobile-panel .is-active {
  color: var(--cyan);
}

.top-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  width: 210px;
  padding: 10px 12px;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(34, 211, 238, 0.8);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.top-search button,
.mobile-search button {
  color: white;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.75);
  cursor: pointer;
}

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

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

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

.mobile-panel nav {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.mobile-search input {
  min-width: 0;
  width: 100%;
  padding: 12px;
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transform: scale(1.02);
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, transform 1.2s ease;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, #020617, transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 90px 0 70px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  color: #67e8f9;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero-content h1 {
  max-width: 900px;
  margin: 0 0 14px;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.07em;
  background: linear-gradient(90deg, #ecfeff, #67e8f9 45%, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content h2 {
  margin: 0 0 18px;
  max-width: 780px;
  font-size: clamp(26px, 4vw, 52px);
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 30px;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.8;
}

.hero-actions,
.section-head,
.detail-meta,
.filter-panel,
.tag-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

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

.primary-btn {
  color: white;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.3);
}

.ghost-btn {
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.32);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px rgba(34, 211, 238, 0.22);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 48px;
  height: 48px;
  color: #ecfeff;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 32px;
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  background: rgba(226, 232, 240, 0.38);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 28px;
  background: #22d3ee;
}

.section-shell,
.page-main,
.detail-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.section-head {
  justify-content: space-between;
  margin-bottom: 26px;
}

.section-head h2,
.page-hero h1,
.detail-copy h1,
.related-panel h2,
.text-card h2,
.rank-block h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

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

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

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

.category-tile,
.category-cover {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-cover:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.5);
}

.category-tile span,
.category-cover span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile small,
.category-cover small {
  color: #dbeafe;
  line-height: 1.5;
}

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 280px);
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 18px;
  scroll-snap-type: x mandatory;
}

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

.movie-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  scroll-snap-align: start;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 18px;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 16px 40px rgba(2, 8, 23, 0.32);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, .78), transparent 48%);
  opacity: 0.9;
}

.badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: rgba(6, 182, 212, 0.86);
  backdrop-filter: blur(10px);
}

.badge-top {
  top: 10px;
  right: 10px;
}

.badge-bottom {
  left: 10px;
  bottom: 10px;
  background: rgba(15, 23, 42, 0.78);
}

.movie-card-body {
  display: grid;
  gap: 6px;
}

.movie-card strong {
  color: #f8fafc;
  line-height: 1.35;
  transition: color 0.2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card:hover strong {
  color: var(--cyan);
}

.movie-card small {
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.meta-row span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 34px;
  align-items: center;
  margin-top: 70px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.78));
  box-shadow: var(--shadow);
}

.feature-copy h2 {
  font-size: clamp(30px, 4vw, 54px);
  margin: 0 0 18px;
}

.feature-copy p {
  color: var(--soft);
  line-height: 1.8;
  margin: 0 0 24px;
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: auto 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ranking-item:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(30, 41, 59, 0.88);
}

.rank-num {
  color: #67e8f9;
  font-size: 20px;
  font-weight: 900;
}

.ranking-item img {
  width: 72px;
  height: 56px;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ranking-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-copy small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-main {
  padding: 54px 0 70px;
}

.page-hero {
  position: relative;
  margin-bottom: 34px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 24rem), rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.slim-hero {
  padding: 34px;
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 62px);
  margin-bottom: 12px;
  background: linear-gradient(90deg, #f8fafc, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-hero p {
  color: var(--soft);
  max-width: 760px;
  line-height: 1.8;
  margin: 0;
}

.category-overview-list {
  display: grid;
  gap: 22px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 18px;
  align-items: stretch;
}

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

.related-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.62);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.related-card:hover {
  border-color: rgba(34, 211, 238, 0.36);
  background: rgba(30, 41, 59, 0.86);
}

.related-card img {
  width: 92px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
}

.related-card span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.related-card strong {
  color: #e2e8f0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.filter-panel {
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.64);
}

.filter-panel input {
  flex: 1 1 340px;
  min-height: 48px;
  padding: 0 16px;
}

.filter-panel select {
  min-height: 48px;
  padding: 0 16px;
}

.empty-state {
  display: none;
  color: var(--muted);
  text-align: center;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.58);
}

.empty-state.is-visible {
  display: block;
}

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

.rank-block {
  margin-bottom: 42px;
}

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

.compact-head {
  margin-bottom: 18px;
}

.detail-main {
  padding: 30px 0 70px;
}

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

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

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

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.video-start {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 10px;
  color: white;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
  cursor: pointer;
}

.video-start.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-ring {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 50%;
  font-size: 28px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.36);
}

.video-start strong {
  font-size: 18px;
}

.detail-copy {
  display: grid;
  gap: 20px;
  padding-top: 26px;
}

.detail-copy h1 {
  font-size: clamp(30px, 4vw, 52px);
}

.detail-meta span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  color: #dbeafe;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
}

.detail-meta span:first-child {
  color: #67e8f9;
  border-color: rgba(34, 211, 238, 0.36);
  background: rgba(8, 145, 178, 0.16);
}

.text-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
}

.text-card h2 {
  margin-bottom: 10px;
  font-size: 22px;
}

.text-card p {
  color: var(--soft);
  line-height: 1.9;
  margin: 0;
}

.related-panel {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.related-panel h2 {
  font-size: 22px;
  margin-bottom: 4px;
}

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

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 28px;
}

.footer-brand {
  margin-bottom: 16px;
}

.site-footer p {
  color: var(--muted);
  line-height: 1.7;
  max-width: 520px;
}

.site-footer h2 {
  color: #e2e8f0;
  font-size: 17px;
  margin: 0 0 14px;
}

.site-footer ul {
  list-style: none;
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
}

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

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 30px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  text-align: center;
}

[data-movie-card].is-hidden {
  display: none;
}

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

  .menu-toggle {
    display: inline-block;
  }

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

  .feature-panel,
  .category-overview-card,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .related-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    height: 64px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 12px;
  }

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

  .hero-content {
    padding: 76px 0 62px;
  }

  .hero-control {
    display: none;
  }

  .section-shell {
    padding-top: 48px;
  }

  .category-grid,
  .movie-grid,
  .category-movie-grid,
  .search-grid,
  .mini-grid,
  .ranking-list,
  .large-ranking,
  .overview-samples {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-panel,
  .page-hero {
    padding: 24px;
    border-radius: 24px;
  }

  .ranking-item {
    grid-template-columns: auto 56px 1fr;
  }

  .ranking-item img {
    width: 56px;
    height: 50px;
  }

  .related-card {
    grid-template-columns: 76px 1fr;
  }

  .related-card img {
    width: 76px;
    height: 58px;
  }
}

@media (max-width: 480px) {
  .category-grid,
  .movie-grid,
  .category-movie-grid,
  .search-grid,
  .mini-grid,
  .overview-samples {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .horizontal-row {
    grid-auto-columns: minmax(190px, 230px);
  }

  .filter-panel input,
  .filter-panel select {
    flex-basis: 100%;
    width: 100%;
  }
}
