:root {
  --site-bg: #020617;
  --site-bg-soft: #0f172a;
  --site-panel: #1e293b;
  --site-panel-deep: #111827;
  --site-text: #f8fafc;
  --site-muted: #94a3b8;
  --site-line: rgba(148, 163, 184, 0.18);
  --site-amber: #f59e0b;
  --site-amber-deep: #d97706;
  --site-radius: 18px;
  --site-shadow: 0 22px 55px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

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

img {
  background: rgba(15, 23, 42, 0.78);
}

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

.site-header__inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.site-logo__icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--site-amber), #fb923c);
  color: #ffffff;
  font-size: 14px;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

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

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

.site-nav a:hover,
.site-nav a.active,
.mobile-panel a:hover {
  color: #fbbf24;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--site-line);
  background: rgba(15, 23, 42, 0.88);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--site-line);
  background: rgba(2, 6, 23, 0.96);
}

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

.mobile-panel nav {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 24px;
  display: grid;
  gap: 14px;
}

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

.hero-carousel {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slides,
.hero-slide,
.hero-slide img,
.hero-slide__shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 5.2s ease;
}

.hero-slide.is-active img {
  transform: scale(1.12);
}

.hero-slide__shade {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.08));
}

.hero-slide__content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 720px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--site-amber);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.24);
}

.hero-slide h1,
.page-hero h1,
.detail-info h1 {
  margin-top: 22px;
  color: #ffffff;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-slide p,
.page-hero p,
.detail-one-line {
  margin-top: 18px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
  max-width: 720px;
}

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

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

.btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-primary {
  background: var(--site-amber);
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.28);
}

.btn-primary:hover {
  background: var(--site-amber-deep);
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(14px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 52px;
  height: 52px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #ffffff;
  font-size: 42px;
  line-height: 1;
  display: grid;
  place-items: center;
  backdrop-filter: blur(12px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.06);
}

.hero-arrow--prev {
  left: 22px;
}

.hero-arrow--next {
  right: 22px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--site-amber);
}

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

.content-section--soft {
  background: rgba(15, 23, 42, 0.46);
}

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

.section-title h2 {
  color: #ffffff;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-title p {
  margin-top: 8px;
  color: var(--site-muted);
  line-height: 1.7;
}

.section-title--simple {
  align-items: center;
}

.section-more {
  color: #fbbf24;
  font-weight: 800;
  white-space: nowrap;
}

.featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 24px;
}

.featured-grid__side {
  display: grid;
  gap: 16px;
}

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

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

.movie-card {
  height: 100%;
  border-radius: var(--site-radius);
  overflow: hidden;
  background: rgba(30, 41, 59, 0.88);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(148, 163, 184, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--site-shadow);
  border-color: rgba(245, 158, 11, 0.4);
}

.movie-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.movie-card__poster {
  position: relative;
  height: 270px;
  overflow: hidden;
  background: #111827;
}

.movie-card--compact .movie-card__poster {
  height: 210px;
}

.movie-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card:hover .movie-card__poster img {
  transform: scale(1.1);
  filter: brightness(0.72);
}

.movie-card__badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--site-amber);
  font-size: 12px;
  font-weight: 800;
}

.movie-card__play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 58px;
  height: 58px;
  transform: translate(-50%, -50%) scale(0.76);
  display: grid;
  place-items: center;
  opacity: 0;
  border-radius: 999px;
  background: var(--site-amber);
  color: #ffffff;
  font-size: 24px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.36);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-card__body {
  flex: 1;
  padding: 18px;
}

.movie-card__body h3 {
  color: #ffffff;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: #fbbf24;
}

.movie-card__body p {
  margin-top: 10px;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-card__meta {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  color: #94a3b8;
  font-size: 13px;
}

.movie-card__tags,
.detail-tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.22);
  font-size: 12px;
  font-weight: 700;
}

.movie-card--horizontal .movie-card__link {
  flex-direction: row;
}

.movie-card--horizontal .movie-card__poster {
  width: 38%;
  height: auto;
  min-height: 170px;
  flex: 0 0 38%;
}

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

.category-tile,
.category-card {
  position: relative;
  min-height: 174px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  border-radius: var(--site-radius);
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.15);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
}

.category-tile img,
.category-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.category-tile:hover img,
.category-card:hover img {
  opacity: 0.42;
  transform: scale(1.08);
}

.category-tile span,
.category-tile p,
.category-card div:not(.category-card__image) {
  position: relative;
  z-index: 2;
}

.category-tile span,
.category-card h2 {
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.category-tile p,
.category-card p,
.category-card small {
  margin-top: 8px;
  color: #cbd5e1;
  line-height: 1.6;
}

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

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

.page-hero {
  padding: 88px 0 72px;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.25), transparent 32%), linear-gradient(135deg, #020617, #111827 48%, #0f172a);
  border-bottom: 1px solid var(--site-line);
}

.page-hero--compact {
  padding: 76px 0 64px;
}

.page-hero--category {
  padding: 74px 0 58px;
}

.breadcrumb {
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a {
  color: #fbbf24;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
  border-radius: var(--site-radius);
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--site-line);
}

.filter-panel--wide {
  grid-template-columns: 1fr 200px 220px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-weight: 800;
}

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

.filter-panel select option {
  color: #0f172a;
}

.empty-state {
  margin-top: 30px;
  padding: 26px;
  text-align: center;
  color: #cbd5e1;
  border-radius: var(--site-radius);
  background: rgba(15, 23, 42, 0.72);
}

.scroll-toolbar {
  margin: -58px 0 22px auto;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.scroll-toolbar button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.9);
  color: #ffffff;
  font-size: 26px;
}

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 16px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

.rail-item {
  flex: 0 0 290px;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.ranking-panel,
.detail-side-card,
.detail-article {
  border-radius: var(--site-radius);
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--site-line);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.ranking-panel {
  align-self: start;
  padding: 22px;
  position: sticky;
  top: 96px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(30, 41, 59, 0.96);
}

.rank-number {
  grid-row: span 2;
  color: #fbbf24;
  font-weight: 900;
  font-size: 20px;
}

.rank-name {
  color: #ffffff;
  font-weight: 800;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-meta {
  color: #94a3b8;
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-link {
  width: 100%;
  margin-top: 18px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 54px 110px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: var(--site-radius);
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--site-line);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-row:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.36);
}

.ranking-row__number {
  color: #fbbf24;
  font-size: 30px;
  font-weight: 900;
  text-align: center;
}

.ranking-row img {
  width: 110px;
  height: 140px;
  object-fit: cover;
  border-radius: 14px;
}

.ranking-row h2 {
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.ranking-row p {
  margin-top: 8px;
  color: #cbd5e1;
  line-height: 1.7;
}

.ranking-row small {
  display: inline-block;
  margin-top: 10px;
  color: #94a3b8;
}

.detail-hero {
  min-height: 620px;
  display: flex;
  align-items: center;
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid var(--site-line);
}

.detail-hero__inner {
  padding: 70px 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

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

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

.detail-meta {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.detail-meta div {
  padding: 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.detail-meta dt {
  color: #94a3b8;
  font-size: 13px;
}

.detail-meta dd {
  margin-top: 4px;
  color: #ffffff;
  font-weight: 800;
}

.detail-info .btn {
  margin-top: 26px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--site-shadow);
  border: 1px solid rgba(148, 163, 184, 0.2);
  aspect-ratio: 16 / 9;
}

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

.player-start {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: #ffffff;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.72));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-start span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--site-amber);
  color: #ffffff;
  font-size: 36px;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.42);
}

.player-start strong {
  font-size: 20px;
}

.player-shell.is-playing .player-start {
  opacity: 0;
  visibility: hidden;
}

.player-status {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 5;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.68);
  backdrop-filter: blur(12px);
  font-size: 13px;
}

.player-shell.is-playing .player-status {
  display: none;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.detail-article {
  padding: 28px;
}

.detail-article h2,
.detail-side-card h2 {
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.detail-article h2:not(:first-child) {
  margin-top: 28px;
}

.detail-article p {
  margin-top: 14px;
  color: #dbeafe;
  line-height: 2;
  font-size: 16px;
}

.detail-side-card {
  align-self: start;
  padding: 24px;
}

.detail-side-card ul {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.detail-side-card li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--site-line);
  color: #94a3b8;
}

.detail-side-card strong {
  color: #ffffff;
  text-align: right;
}

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

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

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

.site-footer p,
.footer-links a {
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h3 {
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 14px;
}

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

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

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

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

  .two-column-section,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

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

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

  .hero-carousel {
    height: 520px;
  }

  .hero-slide__shade {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.9));
  }

  .hero-arrow {
    display: none;
  }

  .featured-grid,
  .detail-layout,
  .footer-grid,
  .filter-panel,
  .filter-panel--wide {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .ranking-row img {
    width: 82px;
    height: 112px;
  }
}

@media (max-width: 560px) {
  .site-header__inner,
  .section-container,
  .hero-slide__content {
    width: min(100% - 24px, 1280px);
  }

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

  .hero-carousel {
    height: 500px;
  }

  .hero-slide h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

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

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

  .movie-card__poster {
    height: 320px;
  }

  .movie-card--horizontal .movie-card__link {
    flex-direction: column;
  }

  .movie-card--horizontal .movie-card__poster {
    width: 100%;
    height: 230px;
    flex-basis: auto;
  }

  .detail-meta {
    grid-template-columns: 1fr;
  }

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

  .ranking-row__number {
    text-align: left;
  }

  .ranking-row img {
    width: 100%;
    height: 260px;
  }
}
