:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.82);
  --line: rgba(127, 29, 29, 0.38);
  --text: #f3f4f6;
  --muted: #9ca3af;
  --amber: #f59e0b;
  --amber-light: #fde68a;
  --red: #dc2626;
  --red-dark: #7f1d1d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(185, 28, 28, 0.22), transparent 36rem),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(127, 29, 29, 0.95), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

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

.site-brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.brand-mark,
.footer-logo span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber), var(--red));
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.28);
}

.brand-text {
  font-size: clamp(20px, 2.4vw, 28px);
  background: linear-gradient(90deg, var(--amber-light), #fecaca, var(--amber-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
}

.nav-link {
  color: #e5e7eb;
  transition: color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--amber-light);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-link-muted {
  color: #cbd5e1;
  font-size: 14px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.74);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--amber-light);
  border-radius: 999px;
}

.mobile-menu {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
  border-top: 1px solid var(--line);
}

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

.mobile-link {
  padding: 10px 12px;
  border-radius: 12px;
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.55);
}

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

.hero {
  position: relative;
  min-height: clamp(620px, 76vh, 820px);
  overflow: hidden;
  border-bottom: 1px solid rgba(127, 29, 29, 0.34);
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.15) 46%, rgba(2, 6, 23, 0.58) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: clamp(620px, 76vh, 820px);
  display: grid;
  align-items: center;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 84px;
}

.hero-panel {
  width: min(720px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  color: var(--amber-light);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 12px 30px rgba(127, 29, 29, 0.22);
  font-size: 14px;
  margin-bottom: 18px;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
  text-shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
}

.hero h1 span,
.gradient-text {
  background: linear-gradient(90deg, var(--amber-light), #fecaca, var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead,
.page-hero p,
.detail-title p {
  margin: 20px 0 0;
  color: #d1d5db;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

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

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

.hero-meta span,
.movie-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber), #ef4444);
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.28);
}

.btn-secondary {
  color: #f9fafb;
  border: 1px solid rgba(245, 158, 11, 0.34);
  background: rgba(15, 23, 42, 0.76);
}

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

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

.hero-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 1px solid rgba(253, 230, 138, 0.55);
  background: rgba(15, 23, 42, 0.8);
}

.hero-dot.active {
  width: 34px;
  background: linear-gradient(90deg, var(--amber), var(--red));
}

.quick-search {
  margin-top: -36px;
  position: relative;
  z-index: 5;
}

.quick-search-inner,
.filter-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search-inner {
  grid-template-columns: 1fr auto;
}

.quick-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  outline: none;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.72);
  padding: 0 18px;
}

.quick-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.75);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.section {
  padding: 72px 0 0;
}

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

.section-title h2,
.section-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-title p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 22px;
  background: var(--bg-card);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.36);
  background: rgba(30, 41, 59, 0.92);
}

.poster-link,
.poster-frame {
  display: block;
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

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

.movie-card:hover .poster-frame img,
.category-card:hover img,
.rank-card:hover img {
  transform: scale(1.06);
}

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.02), rgba(2, 6, 23, 0.34) 60%, rgba(2, 6, 23, 0.86));
}

.poster-score,
.poster-duration {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.poster-score {
  top: 12px;
  right: 12px;
  color: #111827;
  padding: 4px 8px;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
}

.poster-duration {
  right: 10px;
  bottom: 10px;
  color: #f8fafc;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.72);
}

.movie-card-body {
  padding: 14px 14px 16px;
}

.movie-card h2,
.rank-info h2,
.category-card h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 850;
}

.movie-card h2 a:hover,
.rank-info h2 a:hover,
.category-card:hover h2 {
  color: var(--amber-light);
}

.movie-card-line {
  margin: 9px 0 12px;
  min-height: 42px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  gap: 6px;
}

.movie-meta span {
  min-height: 24px;
  font-size: 12px;
  padding: 2px 8px;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.movie-tags span {
  color: var(--amber-light);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 999px;
  background: rgba(120, 53, 15, 0.28);
  padding: 3px 8px;
  font-size: 12px;
}

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

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.84);
  box-shadow: var(--shadow);
}

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

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

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

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

.rank-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.34);
}

.rank-poster {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
}

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

.rank-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rank-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rank-index {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #111827;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber-light), var(--amber), var(--red));
}

.rank-info p {
  margin: 10px 0 12px;
  color: #cbd5e1;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-hero,
.detail-hero {
  padding: 72px 0 24px;
}

.page-hero-card,
.detail-title {
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 30px;
  padding: clamp(28px, 5vw, 54px);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(127, 29, 29, 0.34));
  box-shadow: var(--shadow);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--amber-light);
}

.filter-panel {
  margin-bottom: 28px;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
}

.filter-search-label span {
  display: block;
  margin-bottom: 8px;
  color: var(--amber-light);
  font-size: 14px;
  font-weight: 800;
}

.filter-selects {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-selects select {
  width: 150px;
}

.filter-empty {
  display: none;
  padding: 40px;
  text-align: center;
  color: #cbd5e1;
  border: 1px dashed rgba(245, 158, 11, 0.3);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.6);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(310px, 0.85fr);
  gap: 28px;
  padding: 36px 0 80px;
}

.player-card,
.detail-card,
.aside-card {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 0;
  padding: 0;
  color: #fff;
  background: #020617;
  cursor: pointer;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.22));
}

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

.player-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: #111827;
  font-size: 34px;
  background: linear-gradient(135deg, var(--amber-light), var(--amber), var(--red));
  transform: translate(-50%, -50%);
  box-shadow: 0 20px 50px rgba(245, 158, 11, 0.34);
}

.player-caption {
  padding: 18px 20px 22px;
}

.player-caption h2,
.detail-card h2,
.aside-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 900;
}

.player-caption p,
.detail-card p,
.aside-card p {
  color: #d1d5db;
  line-height: 1.85;
}

.detail-card {
  padding: 24px;
  margin-top: 22px;
}

.detail-cover {
  border-radius: 22px;
  overflow: hidden;
  background: #0f172a;
  margin-bottom: 18px;
}

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

.aside-card {
  padding: 20px;
  margin-bottom: 22px;
}

.aside-card .rank-card {
  grid-template-columns: 96px 1fr;
  padding: 10px;
  box-shadow: none;
}

.aside-card .rank-poster {
  aspect-ratio: 3 / 4;
}

.aside-card .rank-info h2 {
  font-size: 15px;
}

.aside-card .rank-info p {
  font-size: 13px;
  -webkit-line-clamp: 2;
}

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

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 28px;
}

.footer-column h2 {
  margin: 0 0 16px;
  color: var(--amber-light);
  font-size: 18px;
}

.footer-column p,
.footer-column li,
.footer-bottom {
  color: var(--muted);
  line-height: 1.7;
}

.footer-column ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.footer-column a:hover {
  color: var(--amber-light);
}

.footer-bottom {
  padding: 18px 16px 28px;
  text-align: center;
  border-top: 1px solid rgba(127, 29, 29, 0.28);
}

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

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

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

  .nav-toggle {
    display: block;
  }

  .hero,
  .hero-content {
    min-height: 660px;
  }

  .quick-search-inner,
  .filter-panel,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .filter-selects select {
    width: 100%;
  }

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

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

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

@media (max-width: 620px) {
  .site-header-inner,
  .main-shell,
  .hero-content,
  .footer-inner,
  .mobile-menu {
    width: min(100% - 22px, 1280px);
  }

  .hero,
  .hero-content {
    min-height: 620px;
  }

  .hero-content {
    padding-top: 78px;
  }

  .hero h1,
  .page-hero h1,
  .detail-title h1 {
    font-size: 36px;
  }

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

  .category-grid,
  .rank-card,
  .aside-card .rank-card {
    grid-template-columns: 1fr;
  }

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

  .movie-card-body {
    padding: 12px;
  }

  .movie-card-line {
    min-height: auto;
  }
}
