:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: rgba(120, 53, 15, 0.34);
  --line-soft: rgba(148, 163, 184, 0.14);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --amber: #f59e0b;
  --amber-light: #fcd34d;
  --red: #dc2626;
  --red-dark: #7f1d1d;
  --radius: 18px;
  --shadow: 0 26px 60px 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 18% 0%, rgba(127, 29, 29, 0.42), transparent 34rem),
    radial-gradient(circle at 82% 4%, rgba(245, 158, 11, 0.16), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(127, 29, 29, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(153, 27, 27, 0.34);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.header-inner,
.mobile-nav,
.footer-inner,
.footer-bottom,
.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--red));
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.32);
}

.brand-text {
  font-size: clamp(1.05rem, 2vw, 1.55rem);
  background: linear-gradient(90deg, #fde68a, #fca5a5, #fde68a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

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

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: rgba(15, 23, 42, 0.52);
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 8px 0 16px;
  border-top: 1px solid rgba(153, 27, 27, 0.25);
}

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

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

.hero-carousel {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 70vh;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.92)),
    linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.32), rgba(2, 6, 23, 0.72));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: clamp(64px, 12vw, 130px);
  max-width: min(720px, calc(100% - 48px));
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  color: #fde68a;
  background: rgba(120, 53, 15, 0.36);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  font-size: 0.88rem;
}

.hero-content h1 {
  margin: 18px 0 16px;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 38px rgba(0, 0, 0, 0.52);
}

.hero-content p {
  max-width: 660px;
  margin: 0 0 28px;
  color: #e5e7eb;
  font-size: clamp(1rem, 2vw, 1.28rem);
}

.hero-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid rgba(245, 158, 11, 0.26);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  border: 0;
  background: linear-gradient(90deg, var(--amber), var(--red));
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.28);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.22);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.48);
  transition: background 0.2s ease;
}

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

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

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

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

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

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

.page-main {
  padding: 46px 0 72px;
}

.page-hero {
  position: relative;
  padding: clamp(42px, 8vw, 82px);
  margin-bottom: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 15% 25%, rgba(245, 158, 11, 0.17), transparent 26rem),
    radial-gradient(circle at 85% 8%, rgba(220, 38, 38, 0.28), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 920px;
  margin: 18px 0 14px;
  font-size: clamp(2rem, 5vw, 4.7rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
}

.content-section {
  margin: 0 0 58px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-title > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
}

.section-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--red));
}

.section-more {
  color: var(--amber-light);
  font-weight: 700;
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.92));
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 26px 58px rgba(127, 29, 29, 0.25);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

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

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

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

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  color: white;
  font-size: 0.85rem;
  font-weight: 800;
  background: linear-gradient(90deg, var(--amber), var(--red));
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.movie-info {
  padding: 16px;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--dim);
  font-size: 0.82rem;
}

.movie-meta span {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
}

.movie-info h3,
.ranking-body h2 {
  margin: 10px 0 8px;
  color: #fff;
  line-height: 1.25;
}

.movie-info h3 {
  font-size: 1.08rem;
}

.movie-info h3 a:hover,
.ranking-body h2 a:hover,
.sidebar-panel a:hover,
.breadcrumb a:hover {
  color: var(--amber-light);
}

.movie-info p,
.ranking-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.tag-row span,
.detail-tags span {
  padding: 4px 9px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(120, 53, 15, 0.42);
  border: 1px solid rgba(245, 158, 11, 0.18);
  font-size: 0.78rem;
}

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

.movie-card-wide .movie-poster {
  aspect-ratio: 3 / 4;
}

.movie-card-wide .movie-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.category-card {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow);
}

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

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

.category-card-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 1.55rem;
}

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

.filter-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.76);
}

.search-box span {
  color: var(--amber-light);
  font-size: 1.25rem;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  color: white;
  border: 0;
  outline: 0;
  background: transparent;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(30, 41, 59, 0.72);
  cursor: pointer;
}

.filter-button.is-active,
.filter-button:hover {
  color: #fff;
  border-color: rgba(245, 158, 11, 0.42);
  background: linear-gradient(90deg, var(--amber), var(--red));
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 64px 128px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: var(--panel);
}

.ranking-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-size: 1.2rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--red));
}

.ranking-cover {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.86fr);
  gap: 28px;
  align-items: start;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.82)),
    var(--poster) center / cover no-repeat;
  cursor: pointer;
  transition: opacity 0.22s ease;
}

.player-card.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.play-button {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--red));
  box-shadow: 0 22px 44px rgba(220, 38, 38, 0.42);
  font-size: 2.1rem;
}

.detail-panel,
.sidebar-panel {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--line-soft);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.2);
}

.detail-panel h1 {
  margin: 8px 0 14px;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.04;
}

.detail-panel h2,
.sidebar-panel h2 {
  margin: 0 0 14px;
  color: #fde68a;
  font-size: 1.3rem;
}

.detail-panel p {
  color: var(--muted);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 22px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line-soft);
  background: var(--panel);
}

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

.fact-list {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.fact-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  padding-bottom: 8px;
}

.fact-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.fact-list strong {
  color: #fff;
}

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

.related-card {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line-soft);
  background: var(--panel);
}

.related-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.24s ease;
}

.related-card h3 {
  margin: 0;
  padding: 12px;
  font-size: 0.96rem;
}

.sidebar-panel {
  margin-top: 0;
}

.mini-list {
  display: grid;
  gap: 12px;
}

.mini-card {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.mini-card img {
  width: 66px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
}

.mini-info {
  min-width: 0;
}

.mini-info strong,
.mini-info em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.mini-info em {
  color: var(--dim);
  font-size: 0.8rem;
  font-style: normal;
}

.mini-rank {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 10px;
  color: #fff;
  background: rgba(245, 158, 11, 0.22);
}

.site-footer {
  border-top: 1px solid rgba(127, 29, 29, 0.34);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.98));
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 42px 0 30px;
}

.footer-about p,
.footer-column a,
.footer-bottom {
  color: var(--dim);
}

.footer-column h2 {
  margin: 0 0 12px;
  color: #fde68a;
  font-size: 1.05rem;
}

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

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

.footer-bottom {
  padding: 18px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 0.92rem;
}

.is-hidden {
  display: none !important;
}

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

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

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

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

  .mobile-toggle {
    display: inline-block;
  }

  .hero-content {
    bottom: 82px;
  }

  .hero-arrow {
    display: none;
  }

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

  .movie-card-wide,
  .ranking-item {
    grid-template-columns: 1fr;
  }

  .ranking-number {
    width: 40px;
    height: 40px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .header-inner,
  .mobile-nav,
  .footer-inner,
  .footer-bottom,
  .page-shell {
    width: min(100% - 22px, 1180px);
  }

  .hero-carousel,
  .hero-slide img {
    min-height: 72vh;
  }

  .hero-content {
    left: 18px;
    max-width: calc(100% - 36px);
  }

  .hero-actions,
  .inline-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

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

  .page-hero,
  .detail-panel,
  .sidebar-panel {
    padding: 20px;
  }
}
