:root {
  color-scheme: dark;
  --bg-0: #020617;
  --bg-1: #0f172a;
  --bg-2: #111827;
  --card: rgba(15, 23, 42, 0.72);
  --card-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(245, 158, 11, 0.45);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --amber: #f59e0b;
  --orange: #f97316;
  --red: #ef4444;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.16), transparent 28rem),
    radial-gradient(circle at 90% 10%, rgba(249, 115, 22, 0.12), transparent 26rem),
    linear-gradient(180deg, var(--bg-0), var(--bg-1) 48%, var(--bg-0));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 0 34px rgba(245, 158, 11, 0.4);
  font-weight: 900;
}

.brand-copy strong {
  display: block;
  font-size: 1.28rem;
  letter-spacing: 0.04em;
}

.brand-copy span {
  display: block;
  margin-top: 2px;
  color: var(--soft);
  font-size: 0.78rem;
}

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

.site-nav a,
.mobile-menu a {
  color: var(--muted);
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 16px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.mobile-menu a:hover,
.site-nav a.is-active {
  color: #fff;
  background: rgba(245, 158, 11, 0.14);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  color: #fff;
  background: rgba(15, 23, 42, 0.8);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-menu.is-open {
  display: grid;
}

.page-main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 80px;
}

.hero {
  position: relative;
  min-height: clamp(620px, 76vh, 820px);
  overflow: hidden;
  isolation: isolate;
}

.hero-slider {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.68) 48%, rgba(2, 6, 23, 0.22)),
    linear-gradient(0deg, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0.18) 42%, rgba(2, 6, 23, 0.88));
}

.hero-content {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  min-height: inherit;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: end;
  gap: 42px;
  padding: 100px 0 74px;
}

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

.hero-copy.is-active {
  display: block;
  animation: fadeLift 0.65s ease both;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fcd34d;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.kicker::before {
  content: "";
  width: 48px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

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

.hero h1,
.hero h2 {
  margin-top: 18px;
  font-size: clamp(2.6rem, 7vw, 6.4rem);
}

.hero-lead {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.85;
  margin: 22px 0 0;
}

.hero-meta,
.meta-row,
.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin: 24px 0 0;
}

.pill,
.hero-meta span,
.card-meta span,
.detail-meta span,
.rank-tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.58);
  font-size: 0.85rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.btn,
.btn-ghost,
.btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.btn {
  min-height: 48px;
  padding: 0 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 44px rgba(245, 158, 11, 0.36);
  font-weight: 800;
}

.btn-ghost {
  min-height: 48px;
  padding: 0 22px;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.62);
}

.btn-small {
  min-height: 38px;
  padding: 0 15px;
  color: #fff;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

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

.hero-panel {
  align-self: end;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  background: rgba(15, 23, 42, 0.54);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 24px;
  overflow: hidden;
}

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

.hero-poster-image {
  display: none;
}

.hero-poster-image.is-active {
  display: block;
}

.hero-poster::after,
.poster-wrap::after,
.detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 34%, rgba(0, 0, 0, 0.72));
  pointer-events: none;
}

.hero-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 16px;
}

.input,
.select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.62);
  padding: 0 14px;
  outline: none;
}

.input:focus,
.select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.13);
}

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

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 54px;
  background: #fbbf24;
}

.section {
  margin-top: 70px;
}

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

.section-title,
.page-title h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.65rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-desc,
.page-title p,
.category-intro {
  max-width: 760px;
  color: var(--soft);
  line-height: 1.8;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.5);
  background: var(--card-strong);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

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

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

.type-badge,
.score-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.type-badge {
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(10px);
}

.score-badge {
  right: 12px;
  top: 12px;
  padding: 5px 9px;
  background: rgba(245, 158, 11, 0.92);
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 40px;
  height: 40px;
  justify-content: center;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.28);
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #fff;
  background: rgba(245, 158, 11, 0.92);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 16px;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
}

.card-title {
  margin: 0;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 850;
  line-height: 1.35;
}

.card-text {
  color: var(--soft);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0;
}

.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

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

.category-card {
  position: relative;
  min-height: 184px;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  color: #fff;
  text-decoration: none;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.5);
}

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

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

.category-card-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: inherit;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.filter-card {
  margin: 30px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(12px);
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, minmax(140px, 1fr));
  gap: 12px;
}

.empty-state {
  display: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 38px;
  color: var(--soft);
  text-align: center;
  background: rgba(15, 23, 42, 0.54);
}

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

.rank-list {
  display: grid;
  gap: 14px;
}

.rank-card {
  display: grid;
  grid-template-columns: 78px 180px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: inherit;
  text-decoration: none;
  background: rgba(15, 23, 42, 0.68);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-card:hover {
  transform: translateX(5px);
  border-color: rgba(245, 158, 11, 0.45);
}

.rank-no {
  font-size: 1.55rem;
  color: #fbbf24;
  font-weight: 900;
  text-align: center;
}

.rank-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
}

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

.rank-info h2,
.rank-info h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 850;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--soft);
  line-height: 1.65;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--soft);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: #fbbf24;
  text-decoration: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  gap: 28px;
}

.detail-hero-card,
.detail-side,
.text-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.66);
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

.player-shell video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #fff;
  border: 0;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.76));
  cursor: pointer;
}

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

.player-cover-inner {
  display: grid;
  place-items: center;
  gap: 12px;
  transform: translateY(8px);
  transition: transform 0.2s ease;
}

.player-cover:hover .player-cover-inner {
  transform: translateY(0);
}

.big-play {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 20px 54px rgba(245, 158, 11, 0.4);
  font-size: 2rem;
}

.detail-content {
  padding: 26px;
}

.detail-title {
  font-size: clamp(2rem, 4vw, 4rem);
}

.detail-summary {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.85;
  margin: 18px 0 0;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.detail-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.13);
  border: 1px solid rgba(245, 158, 11, 0.2);
  font-size: 0.86rem;
}

.detail-side {
  padding: 18px;
}

.detail-cover {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 3 / 4;
  background: #111827;
}

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

.info-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.info-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.info-item strong {
  color: #fff;
}

.text-card {
  margin-top: 28px;
  padding: 26px;
}

.text-card h2 {
  margin: 0 0 14px;
  font-size: 1.55rem;
  font-weight: 900;
}

.text-card p {
  color: var(--muted);
  line-height: 1.95;
  margin: 0 0 22px;
}

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

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

.footer-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--soft);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

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

@keyframes fadeLift {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

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

  .hero-panel {
    display: none;
  }

  .hero {
    min-height: 640px;
  }

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

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

  .rank-card {
    grid-template-columns: 54px 120px minmax(0, 1fr);
  }

  .rank-action {
    display: none;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .page-main,
  .hero-content,
  .footer-shell {
    width: min(100% - 24px, 1200px);
  }

  .brand-copy span {
    display: none;
  }

  .movie-grid,
  .category-grid,
  .related-grid,
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .page-title,
  .footer-shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .rank-card {
    grid-template-columns: 42px 1fr;
  }

  .rank-thumb {
    display: none;
  }

  .hero-search {
    grid-template-columns: 1fr;
  }
}
