* {
  box-sizing: border-box;
}

:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --panel-line: rgba(127, 29, 29, 0.35);
  --text: #f3f4f6;
  --muted: #9ca3af;
  --muted-strong: #cbd5e1;
  --amber: #f59e0b;
  --amber-soft: #fbbf24;
  --red: #dc2626;
  --red-deep: #7f1d1d;
  --radius: 22px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.12), transparent 32rem),
    radial-gradient(circle at 90% 10%, rgba(220, 38, 38, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fde68a, #f87171, #fbbf24);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  color: #020617;
  background: linear-gradient(135deg, #fbbf24, #dc2626);
  border-radius: 999px;
  font-size: 0.9rem;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.45);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  color: #e5e7eb;
  font-weight: 600;
}

.desktop-nav a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--amber-soft);
}

.mobile-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: rgba(30, 41, 59, 0.92);
  border-radius: 0.85rem;
  padding: 0.55rem;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 0.3rem 0;
  background: #f3f4f6;
  border-radius: 999px;
}

.mobile-menu {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.2rem 1rem;
  border-top: 1px solid rgba(127, 29, 29, 0.25);
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 0;
  color: #e5e7eb;
}

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

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 520px;
  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-bg {
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.76) 38%, transparent 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.34) 55%, rgba(2, 6, 23, 0.78) 100%);
}

.hero-content {
  position: absolute;
  left: max(1.2rem, calc((100vw - 1280px) / 2 + 1.2rem));
  right: max(1.2rem, calc((100vw - 1280px) / 2 + 1.2rem));
  bottom: clamp(3rem, 9vh, 7rem);
  max-width: 820px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.35rem 0.8rem;
  color: #fde68a;
  background: rgba(120, 53, 15, 0.38);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  font-size: 0.88rem;
}

.hero-content h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-shadow: 0 14px 35px rgba(0, 0, 0, 0.62);
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 1.4rem;
  color: #e5e7eb;
  font-size: clamp(1.02rem, 2vw, 1.35rem);
}

.hero-tags,
.tag-row,
.meta-pills,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-tags span,
.tag-row span,
.meta-pills span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 1.8rem;
  padding: 0.2rem 0.65rem;
  color: #fde68a;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  font-size: 0.78rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  margin-top: 1.7rem;
}

.btn-primary,
.btn-secondary,
.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.9rem;
  padding: 0.7rem 1.45rem;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(90deg, #f59e0b, #dc2626);
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.22);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary:hover,
.btn-secondary:hover,
.search-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.34);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border: 0;
  color: white;
  background: rgba(0, 0, 0, 0.52);
  border-radius: 999px;
  transform: translateY(-50%);
  cursor: pointer;
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.75);
}

.hero-control.prev {
  left: 1rem;
}

.hero-control.next {
  right: 1rem;
}

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

.hero-dots button {
  width: 0.62rem;
  height: 0.62rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 2rem;
  background: var(--amber);
}

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

.main-space {
  padding: 3.8rem 0 4.8rem;
}

.page-hero {
  padding: 4.2rem 0 2.2rem;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.16), transparent 24rem),
    linear-gradient(135deg, rgba(127, 29, 29, 0.22), rgba(15, 23, 42, 0.72));
  border-bottom: 1px solid var(--panel-line);
}

.page-hero h1 {
  max-width: 980px;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.06;
}

.page-hero p {
  max-width: 860px;
  margin: 1rem 0 0;
  color: var(--muted-strong);
  font-size: 1.08rem;
}

.section {
  margin-bottom: 4rem;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.section-title {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  letter-spacing: -0.02em;
}

.section-lead {
  max-width: 760px;
  color: var(--muted);
}

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

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

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

.movie-card {
  overflow: hidden;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.9));
  border: 1px solid rgba(245, 158, 11, 0.1);
  border-radius: 1.25rem;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.38);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.34);
}

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

.poster-link img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), transparent 50%);
  opacity: 0.86;
}

.duration,
.score {
  position: absolute;
  z-index: 2;
  right: 0.65rem;
  bottom: 0.65rem;
  padding: 0.18rem 0.5rem;
  color: white;
  background: rgba(0, 0, 0, 0.78);
  border-radius: 0.55rem;
  font-size: 0.76rem;
}

.score {
  top: 0.65rem;
  bottom: auto;
  color: #020617;
  background: linear-gradient(90deg, #fde68a, #f59e0b);
  font-weight: 900;
}

.card-body {
  padding: 1rem;
}

.card-body h3 {
  margin: 0 0 0.55rem;
  color: #f8fafc;
  font-size: 1.02rem;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--amber-soft);
}

.card-body p {
  display: -webkit-box;
  min-height: 2.9rem;
  margin: 0 0 0.75rem;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
  color: #94a3b8;
  font-size: 0.78rem;
}

.movie-card--horizontal {
  display: grid;
  grid-template-columns: 150px 1fr;
}

.movie-card--horizontal .poster-link {
  aspect-ratio: 3 / 4;
  height: 100%;
}

.movie-card--horizontal .card-body {
  padding: 1.15rem;
}

.movie-card--large .poster-link {
  aspect-ratio: 16 / 9;
}

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

.category-card {
  min-height: 170px;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.2), transparent 10rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(245, 158, 11, 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.38);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 0.6rem;
  color: #fde68a;
}

.category-card p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.93rem;
}

.rank-list {
  display: grid;
  gap: 0.9rem;
}

.rank-item {
  display: grid;
  grid-template-columns: 4.5rem 7rem 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(245, 158, 11, 0.12);
  border-radius: 1.1rem;
}

.rank-number {
  color: #fde68a;
  font-size: 1.7rem;
  font-weight: 900;
  text-align: center;
}

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

.rank-thumb img {
  height: 100%;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0 0 0.3rem;
  color: #f8fafc;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.rank-score {
  min-width: 4rem;
  color: #020617;
  background: linear-gradient(90deg, #fde68a, #f59e0b);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  text-align: center;
  font-weight: 900;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  margin: 1.6rem 0 2rem;
  padding: 0.9rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: 1.2rem;
}

.search-input {
  width: 100%;
  min-height: 3rem;
  padding: 0 1rem;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.76);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  outline: 0;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 1.1rem;
  color: #cbd5e1;
  font-size: 0.92rem;
}

.breadcrumb a {
  color: #fde68a;
}

.player-section {
  padding: 1.2rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.88));
  border: 1px solid rgba(245, 158, 11, 0.16);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 1rem;
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.24), transparent 12rem),
    linear-gradient(0deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.2));
  cursor: pointer;
  transition: opacity 0.22s ease;
}

.play-cover span {
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  padding-left: 0.25rem;
  color: #020617;
  background: linear-gradient(135deg, #fde68a, #f59e0b, #dc2626);
  border-radius: 999px;
  font-size: 2rem;
  box-shadow: 0 0 45px rgba(245, 158, 11, 0.45);
}

.play-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.detail-panel,
.side-panel {
  padding: 1.4rem;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(245, 158, 11, 0.13);
  border-radius: var(--radius);
}

.detail-panel h1 {
  margin: 0 0 0.9rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.08;
}

.detail-intro {
  margin: 0 0 1rem;
  color: #e5e7eb;
  font-size: 1.08rem;
}

.content-block {
  margin-top: 1.5rem;
}

.content-block h2 {
  margin: 0 0 0.8rem;
  color: #fde68a;
  font-size: 1.35rem;
}

.content-block p {
  margin: 0 0 0.9rem;
  color: #d1d5db;
}

.side-poster {
  overflow: hidden;
  border-radius: 1.1rem;
  background: #0f172a;
}

.side-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.site-footer {
  padding: 3.4rem 0 1.5rem;
  background: linear-gradient(180deg, #0f172a, #020617);
  border-top: 1px solid var(--panel-line);
}

.footer-grid {
  width: min(1280px, calc(100% - 2.4rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 2rem;
}

.footer-grid h3 {
  margin: 0 0 0.8rem;
  color: #fde68a;
}

.footer-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.footer-links {
  display: grid;
  gap: 0.45rem;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: var(--amber-soft);
}

.footer-bottom {
  width: min(1280px, calc(100% - 2.4rem));
  margin: 2rem auto 0;
  padding-top: 1rem;
  color: #64748b;
  border-top: 1px solid rgba(127, 29, 29, 0.28);
  font-size: 0.9rem;
}

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

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

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

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

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

  .mobile-toggle {
    display: block;
  }

  .hero-carousel {
    min-height: 560px;
  }

  .hero-control {
    display: none;
  }

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

  .movie-card--horizontal {
    grid-template-columns: 110px 1fr;
  }

  .rank-item {
    grid-template-columns: 3rem 5.5rem 1fr;
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .header-inner {
    padding: 0.8rem 1rem;
  }

  .container {
    width: min(100% - 1.4rem, 1280px);
  }

  .hero-content {
    left: 1rem;
    right: 1rem;
    bottom: 4.2rem;
  }

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

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

  .movie-card--horizontal .poster-link {
    aspect-ratio: 16 / 9;
  }

  .player-section,
  .detail-panel,
  .side-panel {
    padding: 0.85rem;
  }

  .play-cover span {
    width: 4rem;
    height: 4rem;
    font-size: 1.7rem;
  }
}
