* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #0c0a09;
  --panel: #1c1917;
  --panel-soft: #292524;
  --border: rgba(120, 113, 108, 0.36);
  --text: #f5f5f4;
  --muted: #a8a29e;
  --soft: #d6d3d1;
  --amber: #f59e0b;
  --amber-deep: #b45309;
  --red: #dc2626;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(180, 83, 9, 0.18), transparent 34rem), var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.96), rgba(127, 29, 29, 0.94), rgba(120, 53, 15, 0.96));
  border-bottom: 1px solid rgba(251, 191, 36, 0.22);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #dc2626);
  color: white;
  font-weight: 900;
  font-size: 22px;
  box-shadow: 0 12px 36px rgba(245, 158, 11, 0.25);
}

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

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

.brand-copy em {
  margin-top: 4px;
  color: rgba(254, 243, 199, 0.82);
  font-style: normal;
  font-size: 12px;
}

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

.desktop-nav a,
.mobile-nav a {
  color: #fffbeb;
  padding: 9px 14px;
  border-radius: 12px;
  font-weight: 700;
  transition: 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  background: rgba(146, 64, 14, 0.58);
}

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

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 14px;
  background: rgba(68, 64, 60, 0.5);
  color: #fffbeb;
  outline: none;
  padding: 11px 14px;
}

.header-search input::placeholder,
.mobile-search input::placeholder,
.filter-panel input::placeholder {
  color: rgba(254, 243, 199, 0.62);
}

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 14px;
  background: #f59e0b;
  color: white;
  font-weight: 800;
  padding: 11px 15px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(68, 64, 60, 0.5);
  cursor: pointer;
  padding: 11px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: white;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px 18px;
}

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

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

.hero-carousel {
  position: relative;
  height: 640px;
  overflow: hidden;
  background: #050505;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.64) 44%, rgba(0, 0, 0, 0.1)), linear-gradient(0deg, #0c0a09, transparent 42%);
}

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

.hero-kicker,
.page-hero span,
.section-title span {
  color: var(--amber);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  margin: 14px 0 16px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 22px;
  color: #d6d3d1;
  font-size: 18px;
}

.hero-meta,
.watch-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span,
.watch-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 999px;
  background: rgba(28, 25, 23, 0.74);
  color: #fde68a;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.watch-info .primary-btn {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.primary-btn,
.ghost-btn,
.section-title a,
.ranking-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 14px;
  padding: 0 20px;
  font-weight: 900;
  transition: 0.22s ease;
}

.primary-btn {
  background: linear-gradient(90deg, #d97706, #dc2626);
  color: white;
  box-shadow: 0 18px 42px rgba(220, 38, 38, 0.26);
}

.primary-btn:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.08);
}

.ghost-btn,
.section-title a,
.ranking-action {
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: rgba(28, 25, 23, 0.68);
  color: #fde68a;
}

.ghost-btn:hover,
.section-title a:hover,
.ranking-action:hover {
  background: rgba(146, 64, 14, 0.5);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-control:hover {
  background: rgba(180, 83, 9, 0.88);
}

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

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

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

.content-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 20px;
}

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

.section-title h2 {
  margin: 5px 0 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-title p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(41, 37, 36, 0.92), rgba(28, 25, 23, 0.96));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
  transition: 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.35), rgba(28, 25, 23, 0.95));
}

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

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

.card-year,
.card-rank {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: #fde68a;
  padding: 5px 10px;
  font-weight: 900;
  font-size: 12px;
}

.card-rank {
  background: linear-gradient(90deg, #d97706, #dc2626);
  color: white;
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  color: white;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.card-body h3 a:hover,
.ranking-copy h3 a:hover,
.footer-inner a:hover {
  color: var(--amber);
}

.card-meta {
  margin: 8px 0 8px;
  color: #a8a29e;
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #d6d3d1;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.large-tags {
  margin: 22px 0 26px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.9fr);
  gap: 28px;
}

.ranking-panel {
  align-self: start;
  position: sticky;
  top: 96px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(28, 25, 23, 0.78);
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-head span {
  color: var(--amber);
  font-size: 20px;
  font-weight: 900;
}

.panel-head a {
  color: #fde68a;
  font-size: 14px;
  font-weight: 800;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 46px 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(120, 113, 108, 0.26);
  border-radius: 18px;
  background: rgba(41, 37, 36, 0.58);
  padding: 10px;
  transition: 0.2s ease;
}

.ranking-item:hover {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(68, 64, 60, 0.52);
}

.ranking-rank {
  color: var(--amber);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.ranking-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(68, 64, 60, 0.5);
}

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

.ranking-copy h3 {
  margin: 0 0 5px;
  font-size: 17px;
}

.ranking-copy p {
  display: -webkit-box;
  margin: 0 0 5px;
  overflow: hidden;
  color: #d6d3d1;
  font-size: 14px;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.ranking-copy span {
  color: var(--muted);
  font-size: 12px;
}

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

.category-tile,
.category-overview-card,
.article-section,
.detail-article,
.related-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(41, 37, 36, 0.84), rgba(28, 25, 23, 0.96));
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.22);
}

.category-tile {
  min-height: 154px;
  padding: 22px;
  transition: 0.22s ease;
}

.category-tile:hover {
  border-color: rgba(245, 158, 11, 0.46);
  transform: translateY(-3px);
}

.category-tile strong {
  display: block;
  margin-bottom: 10px;
  color: #fef3c7;
  font-size: 22px;
}

.category-tile span {
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.24), transparent 28rem), linear-gradient(90deg, #451a03, #7f1d1d, #451a03);
}

.compact-hero {
  padding: 72px 20px;
}

.page-hero > div {
  max-width: 1240px;
  margin: 0 auto;
}

.page-hero h1 {
  max-width: 900px;
  margin: 8px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 20px;
  color: #fef3c7;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: white;
}

.category-overview-list {
  display: grid;
  gap: 22px;
}

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

.category-overview-card h2 {
  margin: 0 0 10px;
  color: var(--amber);
}

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

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

.movie-card-compact .card-desc,
.movie-card-compact .tag-row {
  display: none;
}

.movie-card-compact .card-body {
  padding: 12px;
}

.movie-card-compact .card-body h3 {
  font-size: 15px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 160px;
  gap: 14px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(28, 25, 23, 0.82);
  padding: 16px;
}

.filter-panel select {
  cursor: pointer;
}

.empty-state {
  display: none;
  margin-bottom: 24px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 18px;
  background: rgba(120, 53, 15, 0.18);
  color: #fde68a;
  padding: 18px;
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

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

.watch-layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 20px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
  gap: 28px;
  align-items: stretch;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 26px;
  background: black;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player,
.player-cover,
.player-cover img {
  width: 100%;
  height: 100%;
}

.movie-player {
  display: block;
  background: black;
}

.player-cover {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #111;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  object-fit: cover;
  filter: brightness(0.62) saturate(1.06);
}

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

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #dc2626);
  color: white;
  font-size: 34px;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 60px rgba(220, 38, 38, 0.34);
}

.watch-info {
  border: 1px solid var(--border);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(41, 37, 36, 0.86), rgba(28, 25, 23, 0.96));
  padding: 28px;
}

.watch-info h1 {
  margin: 18px 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.watch-line {
  color: #d6d3d1;
  font-size: 16px;
}

.detail-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 20px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 28px;
}

.detail-article,
.related-panel,
.article-section {
  padding: 28px;
}

.detail-article h2,
.related-panel h2,
.article-section h2 {
  margin: 0 0 14px;
  color: var(--amber);
  font-size: 24px;
}

.detail-article p,
.article-section p {
  margin: 0 0 26px;
  color: #d6d3d1;
  font-size: 16px;
}

.info-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.info-table div {
  border: 1px solid rgba(120, 113, 108, 0.28);
  border-radius: 14px;
  background: rgba(68, 64, 60, 0.34);
  padding: 13px;
}

.info-table span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.info-table strong {
  color: #fef3c7;
}

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

.article-section {
  max-width: 900px;
  margin: 56px auto;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(28, 25, 23, 0.96), #0c0a09);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 46px 20px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}

.footer-inner h2,
.footer-inner h3 {
  margin: 0 0 14px;
  color: var(--amber);
}

.footer-inner p,
.footer-inner a,
.footer-bottom {
  color: var(--muted);
}

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

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 20px 28px;
  border-top: 1px solid rgba(120, 113, 108, 0.2);
  font-size: 14px;
}

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

  .site-header-inner {
    justify-content: space-between;
  }

  .menu-toggle {
    display: block;
  }

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

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

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .brand {
    min-width: 0;
  }

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

  .brand-copy em {
    display: none;
  }

  .hero-carousel {
    height: 580px;
  }

  .hero-content {
    padding: 0 18px 50px;
    justify-content: flex-end;
  }

  .hero-meta {
    gap: 7px;
  }

  .hero-control {
    display: none;
  }

  .content-section,
  .compact-hero,
  .watch-layout,
  .detail-grid {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .movie-grid.two-col,
  .category-grid,
  .mini-card-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 16px;
  }

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

  .ranking-item {
    grid-template-columns: 38px 60px minmax(0, 1fr);
  }

  .ranking-action {
    display: none;
  }

  .info-table {
    grid-template-columns: 1fr;
  }

  .play-badge {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .movie-grid.two-col,
  .category-grid,
  .mini-card-row {
    grid-template-columns: 1fr;
  }
}
