:root {
  color-scheme: dark;
  --bg-deep: #0f172a;
  --bg-soft: #1e293b;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #f3f4f6;
  --muted: #9ca3af;
  --muted-2: #cbd5e1;
  --blue: #60a5fa;
  --purple: #a855f7;
  --pink: #ec4899;
  --red: #ef4444;
  --yellow: #facc15;
  --green: #22c55e;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(96, 165, 250, 0.20), transparent 26rem),
    radial-gradient(circle at 82% 12%, rgba(236, 72, 153, 0.16), transparent 24rem),
    linear-gradient(180deg, var(--bg-deep), var(--bg-soft));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

.container {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.gradient-text {
  color: transparent;
  background: linear-gradient(90deg, var(--blue), var(--purple), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
}

.glass-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 70px;
}

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

.brand {
  flex: 0 0 auto;
  font-size: 22px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--pink));
  box-shadow: 0 10px 30px rgba(239, 68, 68, 0.32);
  font-size: 15px;
}

.brand-mark.small {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 12px;
}

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

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

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

.header-search {
  display: flex;
  overflow: hidden;
  align-items: center;
  width: min(310px, 32vw);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.header-search input {
  min-width: 0;
  flex: 1;
  height: 40px;
  border: 0;
  outline: none;
  color: #fff;
  background: transparent;
  padding: 0 14px;
}

.header-search button {
  height: 40px;
  padding: 0 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  width: 42px;
  height: 42px;
}

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

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

.mobile-panel-inner {
  display: grid;
  gap: 16px;
  padding: 18px 0 22px;
}

.mobile-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.mobile-category-row a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  min-height: 70vh;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  position: relative;
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.74), rgba(15, 23, 42, 0.28)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.04) 52%);
}

.hero-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.45fr);
  align-items: center;
  gap: 48px;
  padding: 88px 0 120px;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 14px;
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(96, 165, 250, 0.14);
  font-size: 14px;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  max-width: 780px;
  font-size: clamp(42px, 7vw, 78px);
}

.hero-copy h2 {
  margin-top: 12px;
  font-size: clamp(30px, 4.5vw, 56px);
}

.hero-copy p {
  max-width: 680px;
  margin: 22px 0 0;
  color: var(--muted-2);
  font-size: 18px;
  line-height: 1.8;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.tag-row span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--purple), var(--pink));
  box-shadow: 0 16px 38px rgba(96, 165, 250, 0.24);
}

.ghost-button {
  border: 1px solid var(--line-strong);
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 10;
}

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

.hero-poster:hover img {
  transform: scale(1.08);
}

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  transform: translate(-50%, -50%);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
  z-index: 5;
}

.hero-controls button {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
}

.hero-controls button:hover,
.hero-dot.is-active {
  background: rgba(255, 255, 255, 0.32);
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border-radius: 999px;
}

.section-block,
.page-main {
  margin-top: 64px;
}

.page-main {
  padding-bottom: 42px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.2;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-heading a {
  color: #bfdbfe;
  font-weight: 700;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.category-card img,
.category-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.category-card img {
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-mask {
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.28));
}

.category-card strong,
.category-card span,
.category-card em {
  position: relative;
  z-index: 2;
  display: block;
  padding: 0 20px;
}

.category-card strong {
  margin-top: 120px;
  font-size: 24px;
}

.category-card span {
  margin-top: 8px;
  color: #bfdbfe;
}

.category-card em {
  margin-top: 10px;
  color: var(--muted-2);
  font-style: normal;
  font-size: 14px;
  line-height: 1.6;
}

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

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

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

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

.movie-card {
  display: block;
  min-width: 0;
}

.thumb-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  aspect-ratio: 16 / 9;
}

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

.thumb-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), transparent 55%);
  opacity: 0.72;
  transition: opacity 0.25s ease;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.duration-badge,
.rating-badge {
  position: absolute;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(6px);
}

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

.rating-badge {
  left: 10px;
  bottom: 10px;
  color: var(--yellow);
}

.movie-card-body {
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.movie-card strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  color: #fff;
  font-size: 17px;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.movie-desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 42px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.movie-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

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

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

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

.split-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 30px;
}

.compact-ranking {
  display: grid;
  gap: 10px;
}

.compact-ranking a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, background 0.2s ease;
}

.compact-ranking a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}

.compact-ranking span {
  color: var(--yellow);
  font-weight: 900;
}

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

.compact-ranking em {
  color: var(--yellow);
  font-style: normal;
}

.page-hero {
  padding: 38px;
  border-radius: var(--radius-xl);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
  max-width: 820px;
  margin: 16px 0 0;
  color: var(--muted-2);
  font-size: 17px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #bfdbfe;
}

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

.overview-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
}

.overview-image {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 16 / 11;
}

.overview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overview-card h2 {
  margin: 4px 0 10px;
  font-size: 24px;
}

.overview-card p {
  margin: 0;
  color: var(--muted-2);
  line-height: 1.7;
}

.overview-card span {
  display: inline-flex;
  margin-top: 12px;
  color: var(--yellow);
  font-weight: 700;
}

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.overview-links a {
  padding: 6px 10px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(96, 165, 250, 0.14);
  font-size: 13px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 160px 150px 150px auto;
  gap: 12px;
  align-items: center;
  margin: 26px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  color: #fff;
  background: rgba(15, 23, 42, 0.88);
  padding: 0 12px;
}

.filter-count {
  color: var(--muted-2);
  white-space: nowrap;
}

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

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

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

.ranking-row {
  display: grid;
  grid-template-columns: 58px 132px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, background 0.2s ease;
}

.ranking-row:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}

.rank-number {
  color: var(--yellow);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.ranking-row img {
  width: 132px;
  height: 74px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.rank-main strong {
  overflow: hidden;
  font-size: 18px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-main em {
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-meta {
  color: var(--muted-2);
  white-space: nowrap;
}

.detail-main {
  display: grid;
  gap: 28px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 34px;
  padding: 26px;
  border-radius: var(--radius-xl);
}

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  aspect-ratio: 16 / 10;
}

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

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.detail-one-line {
  margin: 16px 0 0;
  color: var(--muted-2);
  font-size: 18px;
  line-height: 1.8;
}

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

.detail-meta span {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.07);
}

.player-section h2,
.detail-content h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 14px;
  color: #fff;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.2)),
    rgba(0, 0, 0, 0.18);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.player-play {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--pink));
  box-shadow: 0 18px 44px rgba(239, 68, 68, 0.38);
  font-size: 28px;
}

.player-overlay strong {
  max-width: 80%;
  text-align: center;
  font-size: 22px;
}

.detail-content {
  padding: 30px;
  border-radius: var(--radius-xl);
}

.detail-content p {
  margin: 0 0 22px;
  color: var(--muted-2);
  font-size: 17px;
  line-height: 1.9;
}

.related-block {
  margin-top: 10px;
}

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

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.64);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  padding: 44px 0;
}

.footer-brand {
  font-size: 20px;
}

.site-footer p {
  max-width: 560px;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.footer-links {
  display: grid;
  gap: 10px;
}

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

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

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

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

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

  .hero-poster {
    max-width: 520px;
  }

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

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

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

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

  .brand-name {
    font-size: 18px;
  }

  .hero-carousel,
  .hero-slide {
    min-height: 760px;
  }

  .hero-content {
    gap: 28px;
    padding: 56px 0 110px;
  }

  .hero-copy p {
    font-size: 16px;
  }

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

  .category-grid,
  .home-grid,
  .full-grid,
  .mini-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ranking-row {
    grid-template-columns: 42px 96px minmax(0, 1fr);
  }

  .rank-meta {
    grid-column: 3;
    white-space: normal;
  }

  .ranking-row img {
    width: 96px;
    height: 62px;
  }

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

  .page-hero,
  .detail-content,
  .detail-hero {
    padding: 22px;
  }
}

@media (max-width: 520px) {
  .category-grid,
  .home-grid,
  .full-grid,
  .mini-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .compact-ranking a {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .compact-ranking em {
    grid-column: 2;
  }

  .detail-cover {
    aspect-ratio: 16 / 9;
  }

  .player-play {
    width: 66px;
    height: 66px;
  }
}
