:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(255, 255, 255, 0.1);
  --muted: #94a3b8;
  --text: #f8fafc;
  --red: #ef4444;
  --blue: #60a5fa;
  --yellow: #facc15;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  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", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(239, 68, 68, 0.14), transparent 32rem),
    radial-gradient(circle at 80% 12%, rgba(96, 165, 250, 0.16), transparent 28rem),
    var(--bg);
}

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

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

button,
input {
  font: inherit;
}

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

.gradient-text {
  background: linear-gradient(135deg, #f97316, #ef4444 45%, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-shadow {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.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(16px);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(239, 68, 68, 0.9);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.28);
}

.brand-text {
  font-size: 1.22rem;
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #fff;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
}

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

.mobile-panel.is-open {
  display: grid;
  gap: 14px;
}

.hero {
  position: relative;
  height: 72vh;
  min-height: 520px;
  overflow: hidden;
}

.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,
.hero-image img {
  width: 100%;
  height: 100%;
}

.hero-image img {
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #020617 4%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.1)),
    linear-gradient(to right, rgba(2, 6, 23, 0.85), rgba(2, 6, 23, 0.18));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  font-size: 0.86rem;
}

.hero-content h1 {
  max-width: 780px;
  margin: 18px 0 14px;
  font-size: clamp(2.4rem, 6vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.65);
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
  line-height: 1.8;
}

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

.hero-meta span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.12);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-button,
.ghost-button,
.section-more,
.quick-links a,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 16px 36px rgba(239, 68, 68, 0.25);
}

.ghost-button,
.section-more,
.quick-links a,
.filter-button {
  border: 1px solid var(--line);
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.quick-links a:hover,
.filter-button:hover,
.filter-button.is-active {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: #fff;
}

.page-main,
.detail-main {
  padding: 42px 0 20px;
}

.search-wrap {
  margin-top: 34px;
}

.search-panel {
  position: relative;
  width: min(760px, 100%);
  margin: 0 auto;
}

.search-panel input {
  width: 100%;
  min-height: 54px;
  padding: 0 54px 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  outline: none;
}

.search-panel input:focus {
  border-color: rgba(96, 165, 250, 0.65);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.12);
}

.search-panel span {
  position: absolute;
  top: 50%;
  right: 21px;
  transform: translateY(-50%);
  color: #cbd5e1;
  font-size: 1.3rem;
}

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

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

.section-heading h2,
.page-hero h1,
.detail-copy h1,
.player-section h2,
.detail-content h2 {
  margin: 0;
  color: #fff;
}

.section-heading h2 {
  font-size: clamp(1.55rem, 3vw, 2.3rem);
}

.section-heading p {
  max-width: 620px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.wide-grid {
  padding-top: 28px;
}

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

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.movie-card-featured .poster-wrap {
  aspect-ratio: 16 / 9;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.05));
  opacity: 0.78;
  transition: opacity 0.3s ease;
}

.play-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  color: #111827;
  background: var(--yellow);
  font-size: 0.75rem;
  font-weight: 800;
}

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

.movie-card:hover .poster-shade {
  opacity: 1;
}

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

.movie-info {
  padding: 13px 2px 0;
}

.movie-info h3 {
  margin: 0 0 7px;
  color: #fff;
  font-size: 1rem;
  line-height: 1.45;
}

.movie-info h3 a:hover {
  color: var(--blue);
}

.movie-info p {
  display: -webkit-box;
  min-height: 42px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.9rem;
  line-height: 1.55;
}

.movie-meta {
  gap: 8px;
  color: #cbd5e1;
  font-size: 0.82rem;
}

.movie-meta span:first-child,
.ranking-score {
  color: var(--yellow);
  font-weight: 700;
}

.tag-row {
  gap: 7px;
  margin-top: 10px;
}

.tag-row span {
  min-height: 24px;
  padding: 3px 8px;
  color: #bfdbfe;
  font-size: 0.76rem;
}

.split-layout {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr;
  gap: 28px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 46px 58px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  padding: 8px 14px 8px 8px;
  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: translateX(3px);
  background: rgba(255, 255, 255, 0.1);
}

.rank-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(239, 68, 68, 0.84);
  font-weight: 800;
}

.ranking-row img {
  width: 58px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}

.ranking-title {
  overflow: hidden;
  color: #fff;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-kind {
  color: var(--muted);
  white-space: nowrap;
}

.full-ranking {
  margin-top: 28px;
}

.glass-panel,
.category-card,
.page-hero,
.detail-hero,
.player-section,
.detail-content {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.glass-panel {
  align-self: start;
  padding: 28px;
}

.glass-panel h2 {
  margin: 0 0 12px;
}

.glass-panel p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.8;
}

.quick-links,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 6vw, 54px);
}

.page-hero::before,
.detail-hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.16);
  filter: blur(30px);
}

.page-hero h1 {
  position: relative;
  margin-top: 16px;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: -0.04em;
}

.page-hero p {
  position: relative;
  max-width: 760px;
  margin: 14px 0 0;
  color: #cbd5e1;
  line-height: 1.8;
}

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

.category-card {
  display: grid;
  min-height: 260px;
  overflow: hidden;
}

.category-card-main {
  padding: 24px;
}

.category-card h2 {
  margin: 14px 0 10px;
  font-size: 1.45rem;
}

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

.category-preview {
  display: grid;
  gap: 8px;
  padding: 0 24px 24px;
}

.category-preview a {
  overflow: hidden;
  color: #cbd5e1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-preview a:hover {
  color: #fff;
}

.filter-bar {
  justify-content: center;
  margin: 18px 0 0;
}

.movie-card.is-hidden,
.ranking-row.is-hidden {
  display: none;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 24px;
  color: #cbd5e1;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 32px;
  overflow: hidden;
  padding: 28px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

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

.detail-copy {
  position: relative;
  align-self: center;
}

.detail-copy h1 {
  margin-top: 18px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-line {
  max-width: 820px;
  margin: 16px 0 20px;
  color: #e2e8f0;
  font-size: 1.08rem;
  line-height: 1.85;
}

.detail-tags {
  margin-top: 18px;
}

.player-section,
.detail-content {
  margin-top: 28px;
  padding: 28px;
}

.player-section h2,
.detail-content h2 {
  margin-bottom: 18px;
  font-size: 1.45rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18));
  cursor: pointer;
}

.player-overlay[hidden] {
  display: none;
}

.big-play {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.92);
  box-shadow: 0 24px 60px rgba(239, 68, 68, 0.28);
  font-size: 2rem;
}

.detail-content p {
  margin: 0 0 24px;
  color: #cbd5e1;
  line-height: 2;
}

.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
}

.detail-facts span {
  padding: 8px 12px;
  border-radius: 12px;
  color: #dbeafe;
  background: rgba(96, 165, 250, 0.12);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 28px;
  padding: 42px 0;
}

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

.footer-brand p {
  max-width: 520px;
  line-height: 1.8;
}

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

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

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

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px;
  color: #94a3b8;
  text-align: center;
}

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

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

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

  .menu-button {
    display: block;
  }

  .hero {
    height: 70vh;
    min-height: 520px;
  }

  .hero-content {
    bottom: 64px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

  .ranking-row {
    grid-template-columns: 36px 48px minmax(0, 1fr) auto;
  }

  .ranking-kind {
    display: none;
  }

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

@media (max-width: 560px) {
  .container-custom {
    width: min(100% - 22px, 1180px);
  }

  .hero-content h1 {
    font-size: 2.45rem;
  }

  .hero-content p {
    font-size: 0.98rem;
  }

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

  .poster-wrap {
    aspect-ratio: 16 / 9;
  }

  .detail-hero,
  .player-section,
  .detail-content,
  .glass-panel {
    padding: 20px;
  }
}
