:root {
  --bg: #0c0a09;
  --panel: #1c1917;
  --panel-soft: #292524;
  --panel-line: rgba(255, 255, 255, 0.08);
  --text: #fafaf9;
  --muted: #a8a29e;
  --soft: #d6d3d1;
  --amber: #d97706;
  --amber-light: #fbbf24;
  --amber-pale: #fef3c7;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100%;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 2%, rgba(217, 119, 6, 0.18), transparent 32rem),
    radial-gradient(circle at 82% 18%, rgba(251, 191, 36, 0.08), transparent 28rem),
    linear-gradient(180deg, #0c0a09 0%, #11100f 42%, #0c0a09 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--amber-pale);
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 12px;
  color: #fff7ed;
  background: linear-gradient(135deg, #f59e0b, #b45309 70%);
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.32);
}

.logo-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.35rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #fde68a;
  font-size: 0.96rem;
  font-weight: 700;
}

.main-nav a {
  transition: color 180ms ease;
}

.main-nav a:hover {
  color: #fff;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #fde68a;
  background: transparent;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 16px 16px;
  background: rgba(28, 25, 23, 0.96);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: #fde68a;
  font-weight: 700;
}

.hero {
  position: relative;
  height: 66vh;
  min-height: 520px;
  overflow: hidden;
  background: #0c0a09;
}

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

.hero-slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 900ms ease, visibility 900ms ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 6s ease;
}

.hero-slide.is-active img {
  transform: scale(1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.96) 0%, rgba(12, 10, 9, 0.72) 42%, rgba(12, 10, 9, 0.18) 100%),
    linear-gradient(0deg, #0c0a09 0%, rgba(12, 10, 9, 0.55) 34%, transparent 76%);
}

.hero-content {
  position: absolute;
  left: max(16px, calc((100vw - 1180px) / 2));
  right: max(16px, calc((100vw - 1180px) / 2));
  bottom: 52px;
  max-width: 720px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 12px;
  border: 1px solid rgba(251, 191, 36, 0.26);
  border-radius: 999px;
  color: #fcd34d;
  background: rgba(120, 53, 15, 0.28);
  font-size: 0.88rem;
  font-weight: 800;
}

.hero h1,
.hero-title {
  margin: 0 0 18px;
  max-width: 820px;
  color: #fff7ed;
  font-size: clamp(2.35rem, 6vw, 5.2rem);
  line-height: 1.03;
  font-weight: 950;
  letter-spacing: -0.04em;
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.56);
}

.hero-text {
  margin: 0 0 26px;
  max-width: 680px;
  color: #e7e5e4;
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  line-height: 1.8;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.button-secondary,
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 12px;
  font-weight: 850;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.button {
  color: #fff7ed;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 16px 36px rgba(217, 119, 6, 0.26);
}

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

.button-secondary {
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.24);
  background: rgba(28, 25, 23, 0.72);
}

.button-ghost {
  color: #f5f5f4;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
}

.hero-dots {
  position: absolute;
  left: max(16px, calc((100vw - 1180px) / 2));
  bottom: 22px;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 26px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.34);
}

.hero-dot.is-active {
  background: #f59e0b;
}

main {
  position: relative;
  z-index: 1;
}

.section {
  margin: 54px 0;
}

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

.section-title {
  margin: 0;
  color: #fef3c7;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.18;
  font-weight: 950;
}

.section-lead {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.75;
}

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

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.32);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #292524, #0c0a09);
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms ease, opacity 220ms ease;
}

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

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

.badge {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 8px;
  color: white;
  background: rgba(217, 119, 6, 0.94);
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

.poster-line {
  position: absolute;
  z-index: 1;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: -webkit-box;
  overflow: hidden;
  color: #f5f5f4;
  font-size: 0.82rem;
  line-height: 1.45;
  text-shadow: 0 2px 12px #000;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-body {
  padding: 13px 13px 15px;
}

.card-title {
  margin: 0 0 8px;
  overflow: hidden;
  color: #fff7ed;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #d6d3d1;
  font-size: 0.8rem;
}

.card-meta span {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.scroll-row {
  overflow-x: auto;
  margin: 0 -16px;
  padding: 0 16px 18px;
}

.scroll-content {
  display: flex;
  gap: 18px;
  width: max-content;
}

.scroll-content .movie-card {
  width: 220px;
}

.category-panel {
  display: grid;
  grid-template-columns: 1.1fr 1.9fr;
  gap: 22px;
  padding: 22px;
  border: 1px solid rgba(251, 191, 36, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(41, 37, 36, 0.96), rgba(28, 25, 23, 0.78));
  box-shadow: var(--shadow);
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  color: #e7e5e4;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 800;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.chip:hover,
.chip.is-active {
  color: #fff7ed;
  background: #b45309;
  transform: translateY(-1px);
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 72px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 108px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background: rgba(28, 25, 23, 0.88);
  transition: transform 180ms ease, border-color 180ms ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 191, 36, 0.28);
}

.rank-num {
  width: 34px;
  color: #f59e0b;
  font-size: 1.5rem;
  font-weight: 950;
  text-align: center;
}

.rank-thumb {
  width: 72px;
  height: 92px;
  overflow: hidden;
  border-radius: 12px;
  background: #292524;
}

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

.rank-title {
  margin: 0 0 8px;
  color: #fff7ed;
  font-weight: 900;
}

.rank-desc {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #a8a29e;
  font-size: 0.88rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.page-hero {
  padding: 66px 0 24px;
}

.page-hero h1 {
  margin: 0 0 14px;
  color: #fff7ed;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.page-hero p {
  margin: 0;
  max-width: 820px;
  color: var(--muted);
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: #a8a29e;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #fcd34d;
}

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

.player-card,
.detail-card,
.side-card,
.search-panel,
.content-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(28, 25, 23, 0.9);
  box-shadow: var(--shadow);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.28));
  transition: opacity 180ms ease, visibility 180ms ease;
}

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

.player-start {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 18px 52px rgba(217, 119, 6, 0.36);
  font-size: 2rem;
}

.player-title-row,
.detail-card,
.side-card,
.content-card {
  padding: 22px;
}

.player-title-row h1 {
  margin: 0 0 10px;
  color: #fff7ed;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.16;
  font-weight: 950;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: #d6d3d1;
}

.meta-line span {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.detail-card h2,
.side-card h2,
.content-card h2 {
  margin: 0 0 14px;
  color: #fef3c7;
  font-size: 1.35rem;
  font-weight: 950;
}

.detail-card p,
.content-card p {
  margin: 0 0 16px;
  color: #d6d3d1;
  line-height: 1.88;
}

.detail-poster {
  overflow: hidden;
  border-radius: 16px;
  background: #292524;
}

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

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag-cloud span,
.tag-cloud a {
  padding: 6px 10px;
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(180, 83, 9, 0.32);
  font-size: 0.88rem;
  font-weight: 800;
}

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

.related-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.related-item img {
  width: 58px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
  background: #292524;
}

.related-item strong {
  display: block;
  margin-bottom: 5px;
  color: #fff7ed;
  line-height: 1.35;
}

.related-item span {
  color: #a8a29e;
  font-size: 0.84rem;
}

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

.category-card {
  min-height: 132px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(41, 37, 36, 0.96), rgba(28, 25, 23, 0.78));
  transition: transform 180ms ease, border-color 180ms ease;
}

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

.category-card h2 {
  margin: 0 0 10px;
  color: #fff7ed;
  font-size: 1.2rem;
}

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

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 34px 0 0;
}

.pagination a,
.pagination span {
  min-width: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  color: #fef3c7;
  text-align: center;
  background: rgba(255, 255, 255, 0.06);
  font-weight: 850;
}

.pagination span {
  color: #fff;
  background: #b45309;
}

.search-panel {
  padding: 20px;
  margin-bottom: 24px;
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(130px, 0.6fr));
  gap: 12px;
}

.search-controls input,
.search-controls select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff7ed;
  outline: none;
  background: rgba(12, 10, 9, 0.68);
}

.search-controls input:focus,
.search-controls select:focus {
  border-color: rgba(251, 191, 36, 0.5);
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid rgba(251, 191, 36, 0.1);
  background: linear-gradient(180deg, rgba(28, 25, 23, 0.72), #0c0a09);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  padding: 44px 0;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: #fef3c7;
}

.site-footer p,
.site-footer a {
  color: #a8a29e;
  line-height: 1.75;
}

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

.copyright {
  padding: 18px 0 28px;
  color: #78716c;
  font-size: 0.9rem;
}

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

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

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

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

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

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

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

  .hero {
    height: 68vh;
    min-height: 560px;
  }

  .hero-shade {
    background:
      linear-gradient(0deg, #0c0a09 0%, rgba(12, 10, 9, 0.66) 48%, rgba(12, 10, 9, 0.22) 100%),
      linear-gradient(90deg, rgba(12, 10, 9, 0.88), rgba(12, 10, 9, 0.42));
  }

  .hero-content {
    bottom: 58px;
  }

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

  .scroll-content .movie-card {
    width: 180px;
  }

  .section-header {
    display: block;
  }

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

  .ranking-list,
  .category-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: auto 62px 1fr;
  }

  .search-controls {
    grid-template-columns: 1fr;
  }

  .player-title-row,
  .detail-card,
  .side-card,
  .content-card {
    padding: 18px;
  }
}
