:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-strong: rgba(30, 41, 59, 0.86);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --brand: #facc15;
  --brand-deep: #eab308;
  --blue: #2563eb;
  --blue-deep: #1e3a8a;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.42);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #020617 0%, #0b1b4d 46%, #020617 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    radial-gradient(circle at 15% 0%, rgba(37, 99, 235, 0.32), transparent 32%),
    radial-gradient(circle at 85% 12%, rgba(250, 204, 21, 0.12), transparent 26%),
    radial-gradient(circle at 50% 85%, rgba(14, 165, 233, 0.12), transparent 36%);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(30, 64, 175, 0.92), rgba(2, 6, 23, 0.96));
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  height: 68px;
  padding: 0 24px;
  margin: 0 auto;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, #facc15, #fef08a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #0f172a;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(250, 204, 21, 0.32);
}

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

.nav-link,
.mobile-nav-link {
  padding: 10px 16px;
  color: #dbeafe;
  border-radius: 12px;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.72);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(191, 219, 254, 0.24);
  border-radius: 14px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: #ffffff;
  border-radius: 10px;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  padding: 0 24px 18px;
  margin: 0 auto;
}

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

.hero {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

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

.hero-shade,
.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.14) 100%),
    linear-gradient(0deg, #020617 0%, transparent 48%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 76px;
  width: min(1180px, calc(100% - 48px));
  transform: translateX(-50%);
}

.hero-kicker,
.section-heading span,
.page-hero span,
.movie-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 800;
  color: #111827;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  border-radius: 999px;
}

.hero h1 {
  max-width: 820px;
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.55);
}

.hero p {
  max-width: 760px;
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

.hero-tags,
.detail-tags,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.movie-tags span {
  padding: 6px 10px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(191, 219, 254, 0.18);
  border-radius: 999px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  font-weight: 800;
  border-radius: 999px;
  transition: 0.25s ease;
}

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 18px 34px rgba(234, 179, 8, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 22px 42px rgba(234, 179, 8, 0.38);
}

.btn-soft {
  color: #ffffff;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-soft:hover {
  background: rgba(37, 99, 235, 0.36);
  transform: translateY(-2px);
}

.full-width {
  width: 100%;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #ffffff;
  font-size: 34px;
  background: rgba(0, 0, 0, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  transform: translateY(-50%);
  transition: 0.25s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  background: rgba(255, 255, 255, 0.48);
  border: 0;
  border-radius: 999px;
  transition: 0.25s ease;
}

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

.section-block {
  max-width: 1280px;
  padding: 70px 24px;
  margin: 0 auto;
}

.section-narrow {
  max-width: 1160px;
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  margin: 14px 0 10px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

.row-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.compact-heading h2 {
  font-size: 30px;
}

.section-more {
  color: #fde68a;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  padding: 22px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: 0.28s ease;
}

.category-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.15));
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.5s ease;
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 2;
}

.category-card span {
  display: block;
  margin-top: 62px;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  margin: 12px 0 0;
  color: #dbeafe;
  line-height: 1.65;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(250, 204, 21, 0.42);
}

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

.category-card-large {
  min-height: 260px;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.24);
  transition: 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(250, 204, 21, 0.34);
  box-shadow: 0 28px 60px rgba(234, 179, 8, 0.12);
}

.movie-cover,
.ranking-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111827;
}

.movie-cover img,
.ranking-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.55s ease;
}

.movie-card:hover .movie-cover img,
.ranking-card:hover .ranking-cover img {
  transform: scale(1.1);
}

.movie-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(0, 0, 0, 0);
  transition: 0.3s ease;
}

.movie-card:hover .movie-cover::after {
  background: rgba(0, 0, 0, 0.42);
}

.movie-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 4px 9px;
  font-size: 12px;
}

.movie-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: #111827;
  background: rgba(250, 204, 21, 0.95);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
  transition: 0.3s ease;
}

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

.movie-info {
  padding: 16px;
}

.movie-title {
  display: block;
  color: #ffffff;
  font-size: 18px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: 0.25s ease;
}

.movie-title:hover {
  color: var(--brand);
}

.movie-line {
  display: -webkit-box;
  min-height: 46px;
  margin: 9px 0 13px;
  overflow: hidden;
  color: var(--subtle);
  font-size: 14px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-tags {
  gap: 6px;
  margin-bottom: 14px;
}

.movie-tags span {
  padding: 4px 8px;
  font-size: 12px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #93c5fd;
  font-size: 13px;
}

.movie-meta a {
  color: #fde68a;
}

.movie-card-compact .movie-info {
  padding: 14px;
}

.movie-card-compact .movie-title {
  font-size: 16px;
}

.movie-card-compact .movie-line {
  min-height: 42px;
  font-size: 13px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.rank-panel,
.spotlight-panel,
.content-card,
.player-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.rank-panel,
.spotlight-panel {
  padding: 24px;
}

.rank-list {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.rank-item {
  display: grid;
  grid-template-columns: 48px 86px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  transition: 0.25s ease;
}

.rank-item:hover {
  transform: translateX(6px);
  border-color: rgba(250, 204, 21, 0.34);
}

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

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

.rank-text strong,
.rank-text em {
  display: block;
}

.rank-text strong {
  color: #ffffff;
  margin-bottom: 4px;
}

.rank-text em {
  color: var(--subtle);
  font-style: normal;
  font-size: 13px;
}

.page-hero {
  position: relative;
  display: grid;
  place-items: end start;
  min-height: 360px;
  padding: 120px 24px 70px;
  overflow: hidden;
  background:
    linear-gradient(110deg, rgba(2, 6, 23, 0.96), rgba(30, 64, 175, 0.72), rgba(2, 6, 23, 0.94)),
    radial-gradient(circle at 78% 10%, rgba(250, 204, 21, 0.18), transparent 34%);
}

.page-hero > div {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.small-hero {
  min-height: 290px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 220px 220px;
  gap: 14px;
  padding: 18px;
  margin-bottom: 28px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.filter-bar label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.filter-wide {
  grid-column: span 1;
}

.filter-input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  outline: 0;
}

.filter-input:focus,
.filter-bar select:focus {
  border-color: rgba(250, 204, 21, 0.72);
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.12);
}

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

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

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

.ranking-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 22px;
  transition: 0.25s ease;
}

.ranking-card:hover {
  transform: translateY(-4px);
  border-color: rgba(250, 204, 21, 0.34);
}

.ranking-cover span {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 7px 10px;
  color: #111827;
  font-weight: 900;
  background: var(--brand);
  border-radius: 10px;
}

.ranking-info a {
  display: block;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 8px;
}

.ranking-info p {
  display: -webkit-box;
  margin: 0 0 16px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.75;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ranking-info div {
  color: #93c5fd;
}

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

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-wrap {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
  width: min(1180px, calc(100% - 48px));
  min-height: 620px;
  padding: 120px 0 70px;
  margin: 0 auto;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #bfdbfe;
  margin-bottom: 16px;
}

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

.detail-one-line {
  max-width: 780px;
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: 20px;
  line-height: 1.75;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-meta span {
  padding: 7px 12px;
  color: #dbeafe;
  background: rgba(30, 64, 175, 0.46);
  border: 1px solid rgba(191, 219, 254, 0.2);
  border-radius: 999px;
}

.detail-copy .btn {
  margin-top: 28px;
}

.detail-section {
  padding-top: 34px;
}

.player-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  background: #000000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #ffffff;
  text-align: center;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.64), rgba(2, 6, 23, 0.24));
  border: 0;
}

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

.player-icon {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  color: #111827;
  font-size: 34px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  border-radius: 50%;
  box-shadow: 0 22px 42px rgba(234, 179, 8, 0.34);
}

.player-overlay strong {
  font-size: 22px;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.content-card {
  padding: 28px;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

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

.prev-next {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.prev-next a {
  flex: 1;
  padding: 16px 18px;
  color: #fde68a;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.site-footer {
  margin-top: 40px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), #020617);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  max-width: 1280px;
  padding: 42px 24px 30px;
  margin: 0 auto;
}

.footer-brand p {
  max-width: 520px;
  color: var(--subtle);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
}

.footer-links a {
  padding: 9px 13px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.18);
  border-radius: 999px;
}

.footer-bottom {
  max-width: 1280px;
  padding: 0 24px 34px;
  margin: 0 auto;
  color: #64748b;
  font-size: 14px;
}

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

  .split-section,
  .detail-text {
    grid-template-columns: 1fr;
  }

  .detail-wrap {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

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

  .nav-toggle {
    display: flex;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    bottom: 70px;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .ranking-card {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .detail-wrap {
    grid-template-columns: 1fr;
    align-items: center;
    padding-top: 100px;
  }

  .detail-poster {
    width: min(260px, 75vw);
  }

  .footer-inner {
    display: grid;
  }
}

@media (max-width: 560px) {
  .site-nav {
    height: 62px;
    padding: 0 16px;
  }

  .site-logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 32px;
    height: 32px;
  }

  .hero {
    height: 520px;
  }

  .hero-content {
    width: calc(100% - 32px);
    bottom: 60px;
  }

  .hero h1 {
    font-size: 34px;
  }

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

  .section-block {
    padding: 46px 16px;
  }

  .page-hero {
    padding: 96px 16px 52px;
  }

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

  .row-heading,
  .prev-next {
    display: grid;
  }

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

  .detail-wrap {
    width: calc(100% - 32px);
  }

  .player-icon {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
