
:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: #1e293b;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --line: #334155;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --green: #22c55e;
  --red: #ef4444;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
}

.nav-shell {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 178px;
  transition: transform 0.25s ease;
}

.brand:hover {
  transform: scale(1.03);
}

.brand-mark,
.footer-brand span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--amber);
  color: #fff;
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.38);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 22px;
  letter-spacing: 0.03em;
}

.brand-copy small {
  color: #fde68a;
  font-size: 12px;
  opacity: 0.9;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  color: #e2e8f0;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: #fbbf24;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-nav input,
.filter-panel input,
.filter-panel select {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.78);
  color: var(--text);
  border-radius: 999px;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 210px;
  padding: 10px 14px;
}

.header-search input:focus,
.mobile-nav input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.header-search button,
.mobile-nav button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--amber);
  color: #fff;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  border: 0;
  background: rgba(148, 163, 184, 0.12);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.mobile-nav.open {
  display: block;
}

.mobile-nav form {
  display: flex;
  gap: 8px;
  margin: 14px 0;
}

.mobile-nav input {
  flex: 1;
  padding: 11px 14px;
}

.mobile-nav nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.74);
  color: #e2e8f0;
}

.hero-section {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--bg-soft);
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.56) 52%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--amber);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 14px 36px rgba(245, 158, 11, 0.34);
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 16px;
  max-width: 740px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 0;
  color: #e2e8f0;
  font-size: clamp(17px, 2.1vw, 22px);
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.detail-tags span,
.card-tags span {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 12px;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-button,
.ghost-button,
.text-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border 0.25s ease;
}

.primary-button {
  padding: 12px 24px;
  background: var(--amber);
  color: #fff;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.32);
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.primary-button:hover {
  background: var(--amber-dark);
}

.ghost-button {
  padding: 11px 22px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(14px);
}

.text-button {
  color: #fbbf24;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
}

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

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

.section-block {
  padding: 56px 0;
}

.muted-section {
  background: rgba(15, 23, 42, 0.56);
}

.intro-strip {
  padding: 34px 0;
  background: rgba(15, 23, 42, 0.86);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.intro-grid h2,
.section-head h2,
.page-hero h1,
.detail-heading h1,
.detail-copy h2,
.side-card h2 {
  margin: 0;
  color: #fff;
}

.intro-grid h2,
.section-head h2,
.detail-copy h2,
.side-card h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.intro-grid p,
.section-head p,
.page-hero p,
.detail-heading p,
.detail-copy p,
.side-card,
.site-footer p {
  color: var(--muted);
}

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

.wide-head {
  align-items: flex-end;
}

.section-head p {
  margin: 8px 0 0;
  max-width: 720px;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-actions button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #334155;
  color: #fff;
  font-size: 26px;
  transition: background 0.2s ease;
}

.section-actions button:hover {
  background: #475569;
}

.section-link {
  padding: 9px 16px;
  border: 1px solid rgba(245, 158, 11, 0.38);
  color: #fbbf24;
}

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

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

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

.rail-item {
  width: 280px;
  flex: 0 0 auto;
}

.movie-card {
  height: 100%;
  background: var(--panel);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border 0.28s ease;
}

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

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

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

.card-poster {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: #111827;
}

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

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

.card-poster::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.02) 56%);
}

.card-category,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--amber);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: auto;
  right: 12px;
  min-width: 34px;
  text-align: center;
  background: rgba(239, 68, 68, 0.94);
}

.card-play {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--amber);
  color: #fff;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.28s ease, transform 0.28s ease;
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.38);
}

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

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.card-body h2 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  color: var(--muted-2);
  font-size: 13px;
}

.card-heat {
  color: #fde68a;
  font-size: 13px;
}

.compact-card .card-poster {
  height: 210px;
}

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

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--radius);
  background: #111827;
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
}

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

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

.category-card span,
.category-card strong,
.category-card p {
  position: relative;
  z-index: 2;
  display: block;
}

.category-card span {
  color: #fbbf24;
  font-size: 14px;
  font-weight: 800;
}

.category-card strong {
  margin-top: 70px;
  color: #fff;
  font-size: 26px;
  line-height: 1.2;
}

.category-card p {
  margin: 10px 0 0;
  color: #cbd5e1;
  font-size: 14px;
}

.category-card:hover img {
  opacity: 0.52;
  transform: scale(1.07);
}

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

.large-category {
  min-height: 300px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
}

.slim-hero {
  padding: 70px 0 54px;
  background: radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.14), transparent 28%), linear-gradient(135deg, #020617, #111827 52%, #0f172a);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.ranking-hero {
  padding: 86px 0;
  background-position: center;
  background-size: cover;
}

.page-hero h1 {
  margin-top: 12px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #fbbf24;
}

.breadcrumb span::before,
.breadcrumb a + a::before {
  content: "/";
  margin-right: 8px;
  color: var(--muted-2);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 190px auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 12px 14px;
}

.filter-panel strong {
  color: #fbbf24;
  white-space: nowrap;
}

.detail-hero {
  padding: 54px 0 48px;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(1.1);
}

.detail-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background: radial-gradient(circle at 70% 20%, rgba(245, 158, 11, 0.18), transparent 32%);
}

.detail-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

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

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

.detail-heading h1 {
  margin: 14px 0 14px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-heading p {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: 19px;
}

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.66);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  box-shadow: var(--shadow);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.62));
  color: #fff;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--amber);
  font-size: 34px;
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.36);
}

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

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-message {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fecaca;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.player-message.show {
  opacity: 1;
}

.detail-copy,
.side-card {
  margin-top: 24px;
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.13);
}

.detail-copy h2,
.side-card h2 {
  margin-bottom: 12px;
  font-size: 24px;
}

.detail-copy p {
  margin: 0 0 14px;
  color: #cbd5e1;
  font-size: 16px;
}

.detail-copy p:last-child {
  margin-bottom: 0;
}

.side-card {
  margin-top: 0;
  margin-bottom: 18px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

.side-card dt {
  color: var(--muted-2);
}

.side-card dd {
  margin: 0;
  color: #e2e8f0;
}

.next-card {
  display: grid;
  gap: 10px;
}

.next-card a {
  color: #fbbf24;
}

.index-list {
  columns: 3 280px;
  gap: 28px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.index-list li {
  break-inside: avoid;
  margin-bottom: 9px;
}

.index-list a {
  display: inline-flex;
  flex-direction: column;
  color: #e2e8f0;
}

.index-list span {
  color: var(--muted-2);
  font-size: 13px;
}

.site-footer {
  padding: 54px 0;
  background: linear-gradient(180deg, #0f172a, #020617);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: #fff;
  font-size: 20px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

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

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

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

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

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

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

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

@media (max-width: 860px) {
  .nav-shell {
    min-height: 68px;
  }

  .header-search {
    display: none;
  }

  .hero-section {
    height: 560px;
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 78px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

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

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

  .brand-copy strong {
    font-size: 18px;
  }

  .brand-copy small {
    font-size: 11px;
  }

  .mobile-nav nav {
    grid-template-columns: 1fr;
  }

  .hero-section {
    height: 520px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 38px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .section-block {
    padding: 42px 0;
  }

  .section-head,
  .wide-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .card-poster {
    height: 230px;
  }

  .detail-heading h1 {
    font-size: 34px;
  }

  .player-overlay span {
    width: 68px;
    height: 68px;
  }
}
