:root {
  --bg-main: #030712;
  --bg-soft: #0b1120;
  --bg-card: rgba(17, 24, 39, 0.78);
  --bg-card-strong: rgba(31, 41, 55, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(251, 191, 36, 0.36);
  --text: #f9fafb;
  --muted: #9ca3af;
  --soft: #d1d5db;
  --amber: #d97706;
  --amber-light: #fbbf24;
  --amber-dark: #92400e;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-main);
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(217, 119, 6, 0.16), transparent 32rem),
    radial-gradient(circle at 90% 8%, rgba(99, 102, 241, 0.12), transparent 28rem),
    linear-gradient(180deg, #111827 0%, #030712 44%, #111827 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(75, 85, 99, 0.72);
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(31, 41, 55, 0.94), rgba(17, 24, 39, 0.96));
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--amber-light), var(--amber-dark));
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.28);
}

.brand:hover .brand-icon {
  transform: scale(1.05);
}

.brand-text {
  display: grid;
  line-height: 1.05;
}

.brand-text strong {
  font-size: 21px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--amber-light), var(--amber));
  -webkit-background-clip: text;
  color: transparent;
}

.brand-text em {
  margin-top: 4px;
  font-size: 12px;
  font-style: normal;
  color: var(--muted);
}

.desktop-nav,
.mobile-nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link,
.footer-links a {
  color: #d1d5db;
  font-weight: 600;
  transition: color 0.22s ease, transform 0.22s ease;
}

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

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(31, 41, 55, 0.95);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: #e5e7eb;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 0 18px;
  align-items: flex-start;
  flex-direction: column;
}

.mobile-nav.is-open {
  display: flex;
}

.site-main {
  min-height: 70vh;
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.45) 54%, rgba(0, 0, 0, 0.22)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.76), transparent 68%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  padding: 70px 0 86px;
}

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

.hero-kicker,
.section-heading span,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--amber-light);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 8vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 680px;
  margin: 22px 0 0;
  color: #d1d5db;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 0;
  color: #d1d5db;
}

.hero-meta span,
.detail-meta span,
.category-pill,
.tag-line span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.68);
  color: #f3f4f6;
}

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

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--amber-dark));
  box-shadow: 0 18px 36px rgba(146, 64, 14, 0.38);
}

.secondary-button,
.ghost-button {
  color: #f8fafc;
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(17, 24, 39, 0.72);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  border-color: rgba(251, 191, 36, 0.56);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.32);
}

.hero-dots {
  position: absolute;
  z-index: 4;
  right: max(24px, calc((100vw - 1200px) / 2));
  bottom: 42px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(156, 163, 175, 0.9);
  cursor: pointer;
  transition: width 0.26s ease, background 0.26s ease;
}

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

.hero-search {
  position: relative;
  z-index: 5;
  width: min(1200px, calc(100% - 32px));
  margin: -38px auto 0;
  padding: 18px;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 22px;
  background: rgba(17, 24, 39, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-search form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  color: white;
  background: rgba(3, 7, 18, 0.72);
  outline: none;
  padding: 0 16px;
}

.hero-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(251, 191, 36, 0.7);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.16);
}

.content-section,
.page-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

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

.page-shell {
  padding: 44px 0 0;
}

.section-heading,
.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.page-heading {
  align-items: flex-start;
  padding: 34px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.88), rgba(3, 7, 18, 0.82));
  box-shadow: var(--shadow);
}

.section-heading h2,
.page-heading h1,
.detail-title h1 {
  margin: 0;
  color: white;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-heading p,
.page-heading p,
.detail-title p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

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

.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 {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.82), rgba(3, 7, 18, 0.9));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.44);
  box-shadow: 0 26px 62px rgba(0, 0, 0, 0.36);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(217, 119, 6, 0.2), rgba(15, 23, 42, 0.82)),
    radial-gradient(circle at 40% 20%, rgba(251, 191, 36, 0.2), transparent 42%);
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 46%, rgba(0, 0, 0, 0.55));
}

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

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

img.is-hidden {
  opacity: 0;
}

.card-content {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.card-content strong {
  min-height: 1.35em;
  color: white;
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-content em,
.ranking-copy em {
  color: var(--amber-light);
  font-style: normal;
  font-size: 13px;
}

.card-desc {
  min-height: 3.1em;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-line span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
  color: #fde68a;
}

.movie-card-large {
  display: grid;
  grid-template-columns: minmax(160px, 42%) 1fr;
}

.movie-card-large .poster-frame {
  aspect-ratio: auto;
  min-height: 280px;
}

.movie-card-large .card-content {
  align-content: center;
  padding: 22px;
}

.movie-card-large .card-content strong {
  white-space: normal;
  font-size: 24px;
}

.movie-card-large .card-desc {
  -webkit-line-clamp: 4;
}

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

.category-card {
  min-height: 180px;
  padding: 24px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 85% 15%, rgba(251, 191, 36, 0.18), transparent 36%),
    linear-gradient(135deg, rgba(31, 41, 55, 0.88), rgba(3, 7, 18, 0.92));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.48);
}

.category-card strong {
  display: block;
  margin-bottom: 12px;
  color: white;
  font-size: 22px;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  margin: 28px 0;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.7);
}

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

.filter-panel select {
  min-width: 132px;
  color-scheme: dark;
}

.empty-state {
  margin: 28px 0 0;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-lg);
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.72);
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 54px 92px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.78);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.ranking-item:hover {
  transform: translateX(5px);
  border-color: rgba(251, 191, 36, 0.44);
}

.ranking-number,
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber-light), var(--amber-dark));
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.28);
}

.ranking-number {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 18px;
}

.rank-badge {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
}

.ranking-poster {
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(31, 41, 55, 0.9);
}

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

.ranking-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ranking-copy strong {
  color: white;
  font-size: 18px;
}

.ranking-copy > span:not(.tag-line) {
  color: var(--muted);
  line-height: 1.55;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  background: #030712;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
}

.detail-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  filter: blur(2px) saturate(1.08);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 7, 18, 0.25), #030712),
    linear-gradient(90deg, rgba(3, 7, 18, 0.92), rgba(3, 7, 18, 0.58));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-poster {
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.28), rgba(15, 23, 42, 0.9));
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-title h1 {
  font-size: clamp(36px, 6vw, 62px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  width: min(1200px, calc(100% - 32px));
  margin: 42px auto 0;
}

.panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.player-card {
  position: relative;
  overflow: hidden;
  padding: 0;
  background: black;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(217, 119, 6, 0.16), transparent),
    #000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.28), rgba(0, 0, 0, 0.64));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  font-size: 32px;
  background: linear-gradient(135deg, var(--amber-light), var(--amber-dark));
  box-shadow: 0 18px 44px rgba(217, 119, 6, 0.36);
}

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

.player-status {
  min-height: 48px;
  padding: 14px 18px;
  color: #d1d5db;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(3, 7, 18, 0.9);
}

.content-panel {
  padding: 28px;
}

.content-panel h2,
.sidebar-panel h2 {
  margin: 0 0 16px;
  color: white;
  font-size: 26px;
}

.content-panel p {
  margin: 0 0 18px;
  color: #d1d5db;
  line-height: 1.88;
}

.sidebar-panel {
  position: sticky;
  top: 96px;
  padding: 20px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.78);
}

.mini-card img {
  width: 62px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(31, 41, 55, 0.9);
}

.mini-card strong {
  display: block;
  color: white;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card em {
  display: block;
  margin-top: 4px;
  color: var(--amber-light);
  font-style: normal;
  font-size: 12px;
}

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

.site-footer {
  margin-top: 84px;
  border-top: 1px solid rgba(75, 85, 99, 0.55);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.86), #020617);
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  color: var(--muted);
}

.footer-brand strong {
  color: var(--amber-light);
}

[hidden] {
  display: none !important;
}

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

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

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

  .sidebar-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 76vh;
  }

  .hero-content {
    min-height: 76vh;
    padding-bottom: 78px;
  }

  .hero-search form,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .filter-selects {
    flex-wrap: wrap;
  }

  .filter-panel select,
  .filter-selects .ghost-button {
    flex: 1 1 160px;
  }

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

  .movie-card-large {
    display: block;
  }

  .movie-card-large .poster-frame {
    min-height: 0;
    aspect-ratio: 2 / 3;
  }

  .detail-hero-inner {
    grid-template-columns: 140px 1fr;
    gap: 18px;
  }

  .footer-inner,
  .section-heading,
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .mobile-nav,
  .content-section,
  .page-shell,
  .detail-layout,
  .detail-hero-inner,
  .hero-content,
  .hero-search,
  .footer-inner {
    width: min(100% - 22px, 1200px);
  }

  .brand-text em {
    display: none;
  }

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

  .hero-dots {
    right: 16px;
    bottom: 24px;
  }

  .hero-actions .primary-button,
  .hero-actions .secondary-button {
    width: 100%;
  }

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

  .ranking-item {
    grid-template-columns: 44px 70px 1fr;
    gap: 12px;
  }

  .ranking-copy > span:not(.tag-line) {
    display: none;
  }

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

  .detail-poster {
    width: 156px;
  }

  .content-panel {
    padding: 20px;
  }
}
