:root {
  color-scheme: dark;
  --bg: #0c0a09;
  --panel: #1c1917;
  --panel-soft: #292524;
  --border: #44403c;
  --text: #fafaf9;
  --muted: #a8a29e;
  --muted-2: #78716c;
  --accent: #f59e0b;
  --accent-2: #d97706;
  --dark: #000000;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(28, 25, 23, 0.95);
  border-bottom: 1px solid rgba(68, 64, 60, 0.8);
  backdrop-filter: blur(14px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #1c1917;
  font-size: 13px;
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.45);
}

.brand-name {
  font-size: 21px;
}

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

.nav-link,
.mobile-link {
  color: #d6d3d1;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 10px;
  background: var(--panel-soft);
}

.menu-button span {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 12px 24px 18px;
  border-top: 1px solid var(--border);
  background: var(--panel);
}

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

.hero-slider {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #111111;
}

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

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 1s ease, transform 1.2s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 58%, rgba(245, 158, 11, 0.23), transparent 30%),
    linear-gradient(to top, #0c0a09 0%, rgba(12, 10, 9, 0.86) 36%, rgba(12, 10, 9, 0.12) 100%);
}

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

.hero-kicker,
.pill,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 8px;
  background: var(--accent);
  color: #1c1917;
  font-size: 13px;
  font-weight: 800;
  padding: 5px 11px;
}

.eyebrow {
  margin-bottom: 12px;
}

.hero-content h1 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

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

.hero-meta,
.meta-row,
.movie-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  color: var(--muted);
}

.hero-meta span:first-child,
.rank-score,
.movie-stats span:first-child {
  color: var(--accent);
  font-weight: 800;
}

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

.primary-button,
.ghost-button,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 13px 24px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.primary-button,
.home-search button {
  background: var(--accent);
  color: #1c1917;
}

.primary-button:hover,
.home-search button:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text);
  background: rgba(0, 0, 0, 0.26);
}

.ghost-button:hover {
  border-color: var(--accent);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.52);
  color: var(--text);
  font-size: 34px;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.76);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--accent);
}

.home-layout {
  padding: 48px 0 18px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 28px;
  align-items: center;
  margin-bottom: 56px;
  padding: 30px;
  border: 1px solid rgba(68, 64, 60, 0.9);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(28, 25, 23, 0.96), rgba(41, 37, 36, 0.86));
  box-shadow: var(--shadow);
}

.search-panel h2,
.page-title-block h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.15;
}

.search-panel p,
.page-title-block p {
  margin: 0;
  color: var(--muted);
}

.home-search,
.search-box {
  display: flex;
  gap: 12px;
}

.home-search input,
.search-box input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  background: rgba(12, 10, 9, 0.86);
  color: var(--text);
  outline: none;
}

.home-search input:focus,
.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.content-section {
  margin-bottom: 62px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.section-more {
  color: var(--accent);
  font-weight: 700;
}

.card-grid,
.poster-grid,
.large-grid,
.horizontal-grid,
.category-grid {
  display: grid;
  gap: 22px;
}

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

.poster-grid,
.listing-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

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

.video-card {
  position: relative;
  overflow: hidden;
  display: block;
  border: 1px solid rgba(68, 64, 60, 0.72);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.video-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
}

.card-image,
.horizontal-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #111111;
}

.wide-image {
  aspect-ratio: 16 / 9;
}

.card-image img,
.horizontal-thumb img,
.category-preview img,
.side-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.score-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
}

.card-body,
.large-card-content,
.horizontal-content {
  padding: 15px;
}

.card-body h3,
.large-card-content h3,
.horizontal-content h3 {
  margin: 0 0 9px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-card:hover h3 {
  color: var(--accent);
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.card-tags {
  margin: 8px 0 0;
  min-height: 20px;
  color: var(--muted-2);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-card-large {
  min-height: 330px;
}

.video-card-large::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.06));
  pointer-events: none;
}

.video-card-large .wide-image {
  height: 100%;
  aspect-ratio: auto;
}

.large-card-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 24px;
}

.large-card-content h3 {
  margin-top: 12px;
  font-size: 25px;
  white-space: normal;
}

.large-card-content p,
.horizontal-content p {
  display: -webkit-box;
  margin: 0 0 12px;
  color: #d6d3d1;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.horizontal-card {
  display: flex;
  min-height: 160px;
}

.horizontal-card:hover {
  transform: translateY(-3px);
}

.horizontal-thumb {
  width: 140px;
  flex: 0 0 140px;
  aspect-ratio: auto;
}

.highlight-section {
  padding: 32px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(28, 25, 23, 0.92), rgba(41, 37, 36, 0.86));
}

.page-main,
.detail-main {
  padding: 108px 0 24px;
  min-height: 72vh;
}

.page-title-block {
  margin-bottom: 30px;
  max-width: 780px;
}

.filter-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.filter-links a {
  border-radius: 12px;
  background: var(--panel-soft);
  color: #d6d3d1;
  padding: 9px 14px;
  font-weight: 700;
}

.filter-links a:hover {
  background: var(--accent);
  color: #1c1917;
}

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

.category-card {
  overflow: hidden;
  display: block;
  border: 1px solid rgba(68, 64, 60, 0.8);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 180px;
  overflow: hidden;
}

.category-info {
  padding: 24px;
}

.category-info h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.category-info p {
  margin: 0 0 14px;
  color: var(--muted);
}

.category-info span {
  color: var(--accent);
  font-weight: 800;
}

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

.page-link,
.page-ellipsis {
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--text);
  font-weight: 700;
  padding: 0 12px;
}

.page-link:hover,
.page-link.current {
  background: var(--accent);
  color: #1c1917;
}

.page-ellipsis {
  color: var(--muted);
  background: transparent;
}

.ranking-list {
  overflow: hidden;
  border: 1px solid rgba(68, 64, 60, 0.85);
  border-radius: 20px;
  background: var(--panel);
}

.rank-row {
  display: grid;
  grid-template-columns: 54px 64px minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(68, 64, 60, 0.55);
  transition: background 0.2s ease;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row:hover {
  background: rgba(245, 158, 11, 0.08);
}

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

.rank-row img {
  width: 56px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.rank-meta {
  color: var(--muted);
  white-space: nowrap;
}

.search-box {
  margin-bottom: 28px;
}

.search-box input {
  max-width: 680px;
  font-size: 16px;
}

.search-item.is-hidden {
  display: none;
}

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

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.8fr);
  gap: 30px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.25));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-play-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #1c1917;
  font-size: 32px;
  padding-left: 5px;
  box-shadow: 0 0 40px rgba(245, 158, 11, 0.55);
}

.movie-heading {
  margin: 28px 0 22px;
}

.movie-heading h1 {
  margin: 15px 0 12px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
}

.text-panel,
.side-card {
  margin-bottom: 22px;
  border: 1px solid rgba(68, 64, 60, 0.75);
  border-radius: 16px;
  background: var(--panel);
  padding: 24px;
}

.text-panel h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.text-panel p {
  margin: 0;
  color: #d6d3d1;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span {
  border-radius: 999px;
  background: var(--panel-soft);
  color: #d6d3d1;
  padding: 6px 12px;
  font-size: 13px;
}

.detail-side {
  position: sticky;
  top: 90px;
}

.side-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  margin-bottom: 18px;
}

.side-card dl {
  margin: 0;
}

.side-card div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(68, 64, 60, 0.6);
}

.side-card div:last-child {
  border-bottom: 0;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  color: var(--text);
  text-align: right;
  font-weight: 700;
}

.related-section {
  margin-top: 46px;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid rgba(68, 64, 60, 0.8);
  background: var(--panel);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding: 42px 0;
}

.footer-brand p,
.footer-column a,
.footer-bottom {
  color: var(--muted);
  font-size: 14px;
}

.footer-logo {
  margin-bottom: 14px;
}

.footer-column {
  display: grid;
  gap: 8px;
  align-content: start;
}

.footer-column h2 {
  margin: 0 0 8px;
  font-size: 17px;
}

.footer-column a:hover {
  color: var(--accent);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 24px;
  border-top: 1px solid rgba(68, 64, 60, 0.65);
}

@media (max-width: 1024px) {
  .card-grid,
  .poster-grid,
  .listing-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .large-grid,
  .horizontal-grid,
  .category-grid,
  .detail-grid,
  .search-panel,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }
}

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

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

  .hero-slider {
    height: 560px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 58px;
  }

  .hero-actions,
  .home-search {
    flex-direction: column;
  }

  .hero-arrow {
    display: none;
  }

  .home-layout,
  .page-main,
  .detail-main {
    padding-top: 92px;
  }

  .card-grid,
  .poster-grid,
  .listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .large-grid,
  .horizontal-grid {
    grid-template-columns: 1fr;
  }

  .horizontal-card {
    min-height: 140px;
  }

  .horizontal-thumb {
    width: 116px;
    flex-basis: 116px;
  }

  .rank-row {
    grid-template-columns: 38px 48px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .rank-meta {
    display: none;
  }

  .rank-row img {
    width: 48px;
    height: 64px;
  }

  .category-preview {
    height: 140px;
  }

  .highlight-section,
  .search-panel {
    padding: 22px;
  }
}

@media (max-width: 420px) {
  .card-grid,
  .poster-grid,
  .listing-grid {
    grid-template-columns: 1fr 1fr;
  }

  .card-body,
  .horizontal-content {
    padding: 12px;
  }

  .brand-name {
    font-size: 18px;
  }
}
