:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #1e293b;
  --bg-card-2: #334155;
  --border: rgba(245, 158, 11, 0.2);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --cyan: #22d3ee;
  --emerald: #34d399;
  --rose: #fb7185;
  --shadow-amber: 0 20px 50px rgba(245, 158, 11, 0.18);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(18px);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--amber-light);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #0f172a;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.4);
}

.logo-text {
  white-space: nowrap;
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

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

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

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

.header-search input,
.mobile-search input,
.hero-search input,
.search-page-form input,
.inline-filter input {
  min-width: 0;
  color: var(--text);
  border: 1px solid #334155;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.9);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.search-page-form input:focus,
.inline-filter input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

.header-search button,
.mobile-search button,
.hero-search button,
.search-page-form button {
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--amber);
  color: #0f172a;
  font-weight: 800;
  padding: 10px 14px;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  color: var(--text);
  border: 1px solid #334155;
  border-radius: var(--radius-sm);
  background: #0f172a;
  padding: 8px 12px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(245, 158, 11, 0.12);
  padding: 14px 16px 20px;
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-nav-link {
  display: block;
  padding: 10px 0;
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.mobile-search input {
  flex: 1;
  padding: 10px 12px;
}

.mobile-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.mobile-category-links a,
.quick-links a,
.detail-tags a,
.side-tags span,
.tag-row span {
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.85);
  color: #d1d5db;
  padding: 6px 10px;
  font-size: 13px;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

.hero-track,
.hero-slide,
.hero-slide img,
.hero-shade {
  position: absolute;
  inset: 0;
}

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

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

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

.hero-shade {
  background:
    radial-gradient(circle at 70% 30%, rgba(245, 158, 11, 0.24), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.68) 48%, rgba(2, 6, 23, 0.92));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-top: 20px;
}

.hero-kicker {
  color: var(--amber-light);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 12px 0 18px;
  color: var(--amber-light);
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: clamp(18px, 2vw, 24px);
}

.hero-tags,
.hero-actions,
.quick-links,
.detail-meta,
.movie-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span {
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.64);
  color: #fde68a;
  padding: 7px 12px;
}

.hero-actions {
  margin-top: 28px;
}

.primary-button,
.secondary-button,
.panel-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: var(--radius-sm);
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  background: var(--amber);
  color: #0f172a;
  padding: 12px 22px;
}

.secondary-button {
  border: 1px solid #475569;
  background: rgba(51, 65, 85, 0.72);
  color: var(--text);
  padding: 12px 22px;
}

.primary-button:hover,
.secondary-button:hover,
.panel-link:hover {
  transform: translateY(-2px);
}

.primary-button.wide {
  width: 100%;
  margin-top: 18px;
}

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

.hero-dot {
  width: 46px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

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

.section {
  padding: 72px 0;
}

.section-deep {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.7), rgba(30, 41, 59, 0.72));
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.section-heading span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 900;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
}

.section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
}

.section-heading.amber h2,
.section-heading.amber span {
  color: var(--amber-light);
}

.section-heading.emerald h2,
.section-heading.emerald span {
  color: var(--emerald);
}

.section-heading.rose h2,
.section-heading.rose span {
  color: var(--rose);
}

.section-heading.cyan h2,
.section-heading.cyan span {
  color: var(--cyan);
}

.section-heading.compact {
  margin-bottom: 20px;
}

.section-heading.compact h2 {
  font-size: 24px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius-md);
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.movie-cover {
  position: relative;
  height: 260px;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.movie-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.85), transparent 55%);
}

.movie-cover img,
.compact-card img,
.rank-item img,
.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.movie-card:hover .movie-cover img,
.compact-card:hover img,
.rank-item:hover img,
.category-card:hover img {
  transform: scale(1.08);
}

.movie-year {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  background: var(--amber);
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  padding: 4px 9px;
}

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

.movie-card-title {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  color: var(--amber-light);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-title:hover {
  color: #fde68a;
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 10px 0 14px;
  overflow: hidden;
  color: #94a3b8;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  color: #64748b;
  font-size: 13px;
}

.tag-row {
  margin-top: 12px;
}

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

.movie-card-horizontal .movie-cover {
  height: 150px;
}

.movie-card-horizontal .movie-card-title {
  min-height: auto;
  -webkit-line-clamp: 1;
}

.movie-card-horizontal .movie-card-body p {
  min-height: 44px;
}

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

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

.rank-panel,
.detail-side-card,
.detail-main-card,
.category-overview-card {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(30, 41, 59, 0.9);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 62px 1fr;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.68);
  padding: 10px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: rgba(51, 65, 85, 0.88);
}

.rank-item strong {
  color: var(--rose);
  font-size: 18px;
}

.rank-item img {
  width: 62px;
  height: 46px;
  border-radius: 10px;
}

.rank-item span {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-item small {
  color: #64748b;
}

.panel-link {
  width: 100%;
  margin-top: 18px;
  border: 1px solid #475569;
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  padding: 12px 16px;
}

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

.category-card {
  position: relative;
  height: 220px;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #0f172a;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.1));
}

.category-card span,
.category-card strong {
  position: absolute;
  z-index: 2;
  left: 18px;
}

.category-card span {
  bottom: 54px;
  color: #cbd5e1;
}

.category-card strong {
  bottom: 18px;
  color: var(--amber-light);
  font-size: 24px;
}

.cta-panel {
  margin-bottom: 72px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.42), rgba(30, 41, 59, 0.96));
  padding: 42px;
  text-align: center;
}

.cta-panel h2 {
  margin: 0 0 24px;
  color: var(--amber-light);
  font-size: clamp(26px, 3vw, 36px);
}

.hero-search,
.search-page-form {
  display: flex;
  width: min(680px, 100%);
  margin: 0 auto;
  gap: 10px;
}

.hero-search input,
.search-page-form input {
  flex: 1;
  padding: 14px 16px;
}

.quick-links {
  justify-content: center;
  margin-top: 20px;
}

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

.page-hero {
  margin-top: 42px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 82% 20%, rgba(245, 158, 11, 0.16), transparent 35%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.84));
  padding: clamp(34px, 6vw, 70px);
}

.page-hero span {
  color: var(--amber-light);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.page-hero h1 {
  margin: 10px 0 12px;
  color: var(--amber-light);
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1;
}

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

.inline-filter {
  max-width: 460px;
  margin-top: 24px;
}

.inline-filter input {
  width: 100%;
  padding: 13px 14px;
}

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

.category-page-grid .movie-cover {
  height: 230px;
}

.empty-state,
.search-status {
  display: none;
  color: var(--muted);
  text-align: center;
}

.empty-state.visible,
.search-status.visible,
.search-status {
  display: block;
}

.search-status {
  margin-bottom: 22px;
}

.category-overview-list {
  display: grid;
  gap: 26px;
  padding: 54px 0 80px;
}

.category-overview-card {
  padding: 24px;
}

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

.category-overview-head span {
  color: var(--muted);
}

.category-overview-head h2 {
  margin: 4px 0 0;
  color: var(--amber-light);
  font-size: 28px;
}

.category-overview-head a {
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--amber);
  color: #0f172a;
  font-weight: 900;
  padding: 10px 14px;
}

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

.compact-card {
  overflow: hidden;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.74);
}

.compact-card img {
  height: 150px;
}

.compact-card span,
.compact-card small {
  display: block;
  padding: 0 12px;
}

.compact-card span {
  margin-top: 12px;
  overflow: hidden;
  color: var(--amber-light);
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.compact-card small {
  margin: 3px 0 12px;
  overflow: hidden;
  color: #64748b;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-page-layout {
  display: grid;
  gap: 28px;
  padding: 54px 0 80px;
}

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

.rank-more-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 28px 0 18px;
  color: #94a3b8;
}

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

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

.detail-main-card {
  overflow: hidden;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(0, 0, 0, 0.42);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover span {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--amber);
  color: #0f172a;
  font-size: 30px;
  box-shadow: 0 18px 45px rgba(245, 158, 11, 0.36);
}

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

.detail-content {
  padding: clamp(24px, 4vw, 36px);
}

.detail-content h1 {
  margin: 0 0 14px;
  color: var(--amber-light);
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.08;
}

.detail-meta {
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  color: #94a3b8;
}

.detail-content section {
  margin-top: 28px;
}

.detail-content h2,
.detail-side-card h2 {
  margin: 0 0 12px;
  color: var(--amber-light);
  font-size: 22px;
}

.detail-content p,
.detail-content blockquote {
  margin: 0;
  color: #cbd5e1;
}

.detail-content blockquote {
  border-left: 4px solid var(--amber);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  padding: 18px;
  font-style: italic;
}

.detail-tags div,
.side-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-tags a:hover {
  background: var(--amber);
  color: #0f172a;
}

.detail-side-card {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.detail-poster {
  width: 100%;
  height: 440px;
  border-radius: 18px;
  object-fit: cover;
  margin-bottom: 22px;
}

.detail-side-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-side-card dl div {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
}

.detail-side-card dt {
  color: #64748b;
}

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

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

.related-section {
  padding-top: 56px;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid rgba(245, 158, 11, 0.16);
  background: #020617;
}

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

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

.footer-grid p,
.footer-grid li,
.footer-bottom {
  color: #64748b;
  font-size: 14px;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 18px;
  text-align: center;
}

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

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

@media (max-width: 900px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-menu-button {
    display: inline-flex;
  }

  .header-inner {
    gap: 12px;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    align-items: center;
    text-align: center;
  }

  .hero-actions,
  .hero-tags {
    justify-content: center;
  }

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

  .rank-panel,
  .detail-side-card {
    position: static;
  }

  .movie-grid,
  .category-page-grid,
  .rank-list-large,
  .rank-more-grid,
  .compact-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .container,
  .header-inner,
  .footer-grid {
    width: min(100% - 24px, 1180px);
  }

  .logo-text {
    font-size: 18px;
  }

  .hero {
    height: 520px;
  }

  .hero h1 {
    font-size: 42px;
  }

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

  .hero-search,
  .search-page-form,
  .mobile-search {
    flex-direction: column;
  }

  .movie-grid,
  .category-page-grid,
  .rank-more-grid,
  .compact-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .movie-card-horizontal .movie-cover,
  .movie-cover {
    height: 260px;
  }

  .rank-item {
    grid-template-columns: 38px 56px 1fr;
  }

  .detail-side-card dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .cta-panel,
  .page-hero,
  .category-overview-card {
    padding: 24px;
  }
}
