:root {
  color-scheme: dark;
  --bg: #1c1917;
  --bg-2: #292524;
  --card: rgba(41, 37, 36, 0.78);
  --card-solid: #292524;
  --line: rgba(245, 158, 11, 0.18);
  --text: #fff7ed;
  --muted: #d6d3d1;
  --dim: #a8a29e;
  --amber: #fbbf24;
  --amber-2: #f59e0b;
  --red: #ef4444;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 158, 11, 0.18), transparent 32rem),
    radial-gradient(circle at 80% 2%, rgba(239, 68, 68, 0.12), transparent 30rem),
    linear-gradient(180deg, #1c1917 0%, #292524 45%, #1c1917 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(251, 191, 36, 0.14);
  background: rgba(28, 25, 23, 0.78);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1240px, calc(100% - 28px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fef3c7;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #1c1917;
  background: linear-gradient(135deg, var(--amber), #fed7aa 48%, #fb923c);
  box-shadow: 0 10px 30px rgba(251, 191, 36, 0.26);
  font-size: 13px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 10px 12px;
  border-radius: 999px;
  color: #fde68a;
  transition: 0.2s ease;
  font-weight: 700;
  font-size: 14px;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(251, 191, 36, 0.13);
}

.top-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 999px;
  background: rgba(68, 64, 60, 0.58);
}

.top-search input,
.filter-bar input,
.filter-bar select {
  min-width: 220px;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  padding: 9px 12px;
}

.top-search input::placeholder,
.filter-bar input::placeholder {
  color: rgba(231, 229, 228, 0.64);
}

.top-search button,
.btn,
.section-more,
.filter-bar select,
.menu-toggle {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.top-search button {
  padding: 9px 14px;
  color: #1c1917;
  background: linear-gradient(135deg, var(--amber), #fb923c);
  font-weight: 900;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  padding: 10px 12px;
  color: #fef3c7;
  background: rgba(251, 191, 36, 0.12);
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 28px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid rgba(251, 191, 36, 0.16);
  border-radius: 24px;
  background: rgba(41, 37, 36, 0.94);
}

.mobile-panel a {
  display: inline-flex;
  margin: 4px;
  padding: 9px 12px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(255, 255, 255, 0.04);
}

.mobile-cats {
  padding-top: 8px;
  border-top: 1px solid rgba(251, 191, 36, 0.13);
}

.hero-shell {
  width: min(1320px, calc(100% - 24px));
  margin: 24px auto 0;
}

.hero-carousel {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 34px;
  background: #1c1917;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

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

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(28, 25, 23, 0.94), rgba(28, 25, 23, 0.62) 48%, rgba(28, 25, 23, 0.1)),
    linear-gradient(0deg, rgba(28, 25, 23, 0.96), rgba(28, 25, 23, 0.08) 54%, rgba(28, 25, 23, 0.34));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 0 52px 62px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: #fff7ed;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-content p,
.page-hero p,
.detail-info .lead {
  max-width: 700px;
  margin: 18px 0 0;
  color: #e7e5e4;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.mini-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.1);
  font-size: 12px;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 900;
  transition: 0.2s ease;
}

.btn-primary {
  color: #1c1917;
  background: linear-gradient(135deg, var(--amber), #fb923c);
  box-shadow: 0 16px 36px rgba(245, 158, 11, 0.25);
}

.btn-ghost {
  color: #fef3c7;
  border: 1px solid rgba(251, 191, 36, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.btn:hover,
.section-more:hover,
.category-tile:hover,
.movie-card:hover {
  transform: translateY(-2px);
}

.hero-tabs {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 3;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100% - 56px));
}

.hero-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  color: #fef3c7;
  border: 1px solid rgba(251, 191, 36, 0.16);
  border-radius: 18px;
  background: rgba(41, 37, 36, 0.62);
  backdrop-filter: blur(16px);
  text-align: left;
  transition: 0.2s ease;
}

.hero-tab span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 12px;
  color: #1c1917;
  background: var(--amber);
  font-weight: 900;
}

.hero-tab strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-tab.is-active {
  border-color: rgba(251, 191, 36, 0.72);
  background: rgba(120, 53, 15, 0.6);
}

.quick-entry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.quick-entry a {
  min-height: 116px;
  padding: 22px;
  border: 1px solid rgba(251, 191, 36, 0.16);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(68, 64, 60, 0.88), rgba(41, 37, 36, 0.78));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.quick-entry span,
.card-meta,
.detail-meta-grid span {
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.quick-entry strong {
  display: block;
  margin-top: 10px;
  color: #fff7ed;
  font-size: 20px;
}

.block-section,
.page-main {
  margin-top: 54px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3.2vw, 42px);
  letter-spacing: -0.045em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--dim);
}

.section-more {
  padding: 10px 15px;
  color: #fef3c7;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.18);
  white-space: nowrap;
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.14);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  border-color: rgba(251, 191, 36, 0.44);
  background: rgba(68, 64, 60, 0.86);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #1c1917;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  background: linear-gradient(0deg, rgba(28, 25, 23, 0.86), transparent);
}

.play-dot,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #1c1917;
  background: linear-gradient(135deg, var(--amber), #fb923c);
  font-weight: 900;
}

.play-dot {
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  opacity: 0;
  transform: translateY(6px);
  transition: 0.2s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border-radius: 12px;
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.movie-card h3 {
  margin: 0;
  color: #fff7ed;
  font-size: 17px;
  line-height: 1.36;
}

.movie-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.mini-tags {
  gap: 6px;
  margin-top: 12px;
}

.mini-tags span {
  min-height: 24px;
  padding: 4px 8px;
}

.compact-card {
  display: grid;
  grid-template-columns: 108px 1fr;
  min-height: 162px;
}

.compact-card .poster-wrap {
  aspect-ratio: auto;
  min-height: 100%;
}

.compact-card .movie-card-body {
  align-self: center;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
}

.scroll-row .movie-card {
  scroll-snap-align: start;
}

.home-category-row {
  margin-top: 44px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 44px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(120, 53, 15, 0.82), rgba(41, 37, 36, 0.94)),
    radial-gradient(circle at 90% 10%, rgba(251, 191, 36, 0.22), transparent 22rem);
  box-shadow: var(--shadow);
}

.small-hero h1,
.rank-hero h1 {
  font-size: clamp(32px, 4vw, 58px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--dim);
  font-size: 14px;
}

.breadcrumb a {
  color: #fde68a;
}

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

.category-tile {
  border: 1px solid rgba(251, 191, 36, 0.16);
  border-radius: 28px;
  background: rgba(41, 37, 36, 0.72);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  border-color: rgba(251, 191, 36, 0.42);
}

.category-tile a {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  align-items: center;
  padding: 18px;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  overflow: hidden;
  border-radius: 20px;
}

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

.category-tile h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

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

.category-tile span {
  display: inline-flex;
  margin-top: 18px;
  color: var(--amber);
  font-weight: 900;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0;
  padding: 12px;
  border: 1px solid rgba(251, 191, 36, 0.16);
  border-radius: 26px;
  background: rgba(41, 37, 36, 0.78);
}

.filter-bar input {
  flex: 1;
  min-width: 0;
}

.filter-bar select {
  min-width: 150px;
  color: #fef3c7;
  border: 1px solid rgba(251, 191, 36, 0.18);
  background: rgba(28, 25, 23, 0.9);
}

.detail-main {
  max-width: 1180px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 34px;
  align-items: center;
  padding: 26px;
  border: 1px solid rgba(251, 191, 36, 0.16);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(68, 64, 60, 0.85), rgba(28, 25, 23, 0.94)),
    radial-gradient(circle at 10% 10%, rgba(251, 191, 36, 0.2), transparent 20rem);
  box-shadow: var(--shadow);
}

.detail-cover {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.36);
}

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

.detail-info h1 {
  font-size: clamp(32px, 4.5vw, 62px);
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.detail-meta-grid div {
  padding: 14px;
  border: 1px solid rgba(251, 191, 36, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.detail-meta-grid strong {
  display: block;
  margin-top: 7px;
  color: #fff7ed;
  font-size: 15px;
}

.player-section {
  margin-top: 32px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  color: #1c1917;
  background: linear-gradient(135deg, var(--amber), #fb923c);
  font-size: 28px;
  box-shadow: 0 18px 44px rgba(245, 158, 11, 0.34);
  cursor: pointer;
  transition: 0.2s ease;
}

.player-start:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

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

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 28px;
}

.story-card {
  padding: 24px;
  border: 1px solid rgba(251, 191, 36, 0.14);
  border-radius: 26px;
  background: rgba(41, 37, 36, 0.76);
}

.story-card h2 {
  margin: 0 0 12px;
  color: #fef3c7;
  font-size: 24px;
}

.story-card p {
  margin: 0;
  color: #e7e5e4;
  line-height: 1.9;
}

.detail-neighbor {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.detail-neighbor a {
  flex: 1;
  padding: 15px 18px;
  border: 1px solid rgba(251, 191, 36, 0.14);
  border-radius: 20px;
  color: #fde68a;
  background: rgba(41, 37, 36, 0.72);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.site-footer {
  margin-top: 72px;
  padding: 32px 0;
  border-top: 1px solid rgba(251, 191, 36, 0.14);
  background: rgba(28, 25, 23, 0.72);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-inner p {
  margin: 8px 0 0;
  color: var(--dim);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

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

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

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

  .hero-tabs {
    position: relative;
    right: auto;
    bottom: auto;
    width: auto;
    padding: 0 24px 24px;
    grid-template-columns: repeat(5, 1fr);
  }

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

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

  .menu-toggle {
    display: inline-flex;
  }

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

  .hero-content {
    padding: 0 24px 32px;
  }

  .hero-carousel {
    min-height: 620px;
    border-radius: 26px;
  }

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

  .quick-entry,
  .detail-content,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .compact-card {
    grid-template-columns: 96px 1fr;
  }

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

  .detail-cover {
    max-width: 320px;
  }

  .detail-meta-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-tile a {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .wrap,
  .hero-shell {
    width: min(100% - 20px, 1180px);
  }

  .header-inner {
    min-height: 64px;
  }

  .brand span:last-child {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero-carousel {
    min-height: 600px;
    border-radius: 22px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .hero-content p,
  .page-hero p,
  .detail-info .lead {
    font-size: 15px;
  }

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

  .section-head,
  .filter-bar,
  .detail-neighbor {
    align-items: stretch;
    flex-direction: column;
  }

  .page-hero,
  .detail-hero,
  .story-card {
    padding: 20px;
    border-radius: 24px;
  }

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