
:root {
  --bg: #f8f5f0;
  --paper: #ffffff;
  --ink: #1c1917;
  --muted: #78716c;
  --line: rgba(120, 113, 108, 0.18);
  --amber: #d97706;
  --amber-soft: #f59e0b;
  --dark: #1c1917;
  --shadow: 0 18px 50px rgba(28, 25, 23, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(180deg, #fafaf9 0%, #f5f5f4 48%, #f8f5f0 100%);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 800;
  flex-shrink: 0;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), #fbbf24);
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.35);
}

.logo-text {
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #d6d3d1;
  font-size: 14px;
  overflow: hidden;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  transition: color 0.22s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: #fbbf24;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.quick-search {
  position: relative;
}

.site-search-input,
.category-filter-input {
  width: 260px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  outline: none;
  padding: 10px 16px;
}

.site-search-input::placeholder {
  color: #a8a29e;
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, 90vw);
  max-height: 460px;
  overflow: auto;
  display: none;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

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

.search-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  color: var(--ink);
}

.search-item:hover {
  background: #f5f5f4;
}

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

.search-item strong {
  display: block;
  font-size: 14px;
}

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

.mobile-toggle {
  display: none;
  color: #ffffff;
  font-size: 26px;
}

.mobile-nav {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 18px 18px;
  color: #d6d3d1;
  background: #1c1917;
}

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

.hero-carousel {
  position: relative;
  min-height: 70vh;
  height: 680px;
  background: #1c1917;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

.hero-bg,
.hero-bg img,
.detail-bg,
.detail-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-bg img,
.detail-bg img {
  object-fit: cover;
  opacity: 0.62;
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(28, 25, 23, 0.96) 0%, rgba(28, 25, 23, 0.72) 40%, rgba(28, 25, 23, 0.30) 100%),
              linear-gradient(0deg, #1c1917 0%, rgba(28, 25, 23, 0) 38%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  height: 100%;
  margin: 0 auto;
  padding: 120px 18px 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 16px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--amber);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  color: #ffffff;
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 720px;
  margin-top: 18px;
  color: #e7e5e4;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.movie-tags span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #f5f5f4;
  padding: 6px 10px;
  font-size: 12px;
}

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

.btn-primary,
.btn-ghost,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  padding: 0 26px;
  color: #ffffff;
  background: var(--amber);
  box-shadow: 0 18px 36px rgba(217, 119, 6, 0.28);
}

.btn-primary:hover,
.section-more:hover {
  transform: translateY(-2px);
  background: var(--amber-soft);
}

.btn-ghost {
  padding: 0 22px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.16);
}

.hero-thumbs {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  width: min(1240px, calc(100% - 36px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 16px;
  color: #ffffff;
  text-align: left;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
}

.hero-thumb.is-active {
  background: rgba(217, 119, 6, 0.72);
}

.hero-thumb img {
  width: 74px;
  height: 48px;
  object-fit: cover;
  border-radius: 12px;
  background: #292524;
}

.hero-thumb span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 700;
}

.stats-strip {
  max-width: 1240px;
  margin: -36px auto 0;
  position: relative;
  z-index: 10;
  padding: 0 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stats-strip div {
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 22px;
  padding: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.stats-strip strong {
  color: var(--amber);
  font-size: 28px;
  line-height: 1;
}

.stats-strip span {
  color: var(--muted);
  margin-top: 8px;
}

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

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

.section-head h2 {
  color: #292524;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

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

.section-more {
  padding: 0 18px;
  color: #ffffff;
  background: var(--amber);
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(28, 25, 23, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(217, 119, 6, 0.35), #1c1917 62%);
}

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

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

.movie-score {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(217, 119, 6, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.movie-play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(28, 25, 23, 0.76);
  font-size: 12px;
  font-weight: 800;
}

.movie-info {
  padding: 16px;
}

.movie-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.movie-category {
  color: var(--amber);
  font-weight: 800;
}

.movie-info h3 {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-info h3 a:hover {
  color: var(--amber);
}

.movie-info p {
  height: 46px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  overflow: hidden;
}

.movie-tags span {
  color: #57534e;
  background: #f5f5f4;
}

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 188px;
  border-radius: 24px;
  padding: 22px;
  color: #ffffff;
  background: #1c1917;
  box-shadow: var(--shadow);
}

.category-tile img,
.category-cover-row img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  transition: transform 0.3s ease;
}

.category-tile:hover img,
.category-overview-card:hover img {
  transform: scale(1.08);
}

.category-tile div,
.category-overview-card h2,
.category-overview-card p,
.category-overview-card span {
  position: relative;
  z-index: 2;
}

.category-tile h3,
.category-overview-card h2 {
  font-size: 24px;
  font-weight: 900;
}

.category-tile p,
.category-overview-card p {
  margin: 10px 0;
  color: #e7e5e4;
  line-height: 1.7;
}

.category-tile span,
.category-overview-card span {
  color: #fbbf24;
  font-weight: 800;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: #1c1917;
}

.compact-hero {
  min-height: 340px;
  display: flex;
  align-items: center;
  padding: 80px 18px;
}

.compact-hero > div {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.compact-hero p {
  max-width: 780px;
  margin-top: 16px;
  color: #e7e5e4;
  font-size: 18px;
  line-height: 1.8;
}

.category-hero {
  background: radial-gradient(circle at top right, rgba(217, 119, 6, 0.45), transparent 38%), #1c1917;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  padding: 14px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(28, 25, 23, 0.06);
}

.filter-bar .category-filter-input {
  flex: 1 1 260px;
  color: var(--ink);
  border-color: var(--line);
  background: #fafaf9;
}

.filter-bar button {
  min-height: 42px;
  border-radius: 999px;
  padding: 0 14px;
  color: #57534e;
  background: #f5f5f4;
  font-weight: 800;
}

.filter-bar button.is-active,
.filter-bar button:hover {
  color: #ffffff;
  background: var(--amber);
}

.rank-list {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.rank-row {
  display: grid;
  grid-template-columns: 56px 82px 1fr auto 66px;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.rank-row:hover {
  background: #fafaf9;
}

.rank-no {
  color: var(--amber);
  font-size: 22px;
  font-weight: 900;
}

.rank-row img {
  width: 82px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
  background: #292524;
}

.rank-title {
  font-weight: 900;
}

.rank-meta {
  color: var(--muted);
  font-size: 14px;
}

.rank-row strong {
  color: var(--amber);
}

.detail-hero {
  min-height: 620px;
}

.detail-bg div {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(28, 25, 23, 0.98), rgba(28, 25, 23, 0.70) 45%, rgba(28, 25, 23, 0.34)),
              linear-gradient(0deg, #1c1917 0%, rgba(28, 25, 23, 0) 48%);
}

.detail-wrap {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 80px 18px;
  min-height: 620px;
  display: grid;
  grid-template-columns: 360px 1fr;
  align-items: end;
  gap: 42px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.42);
  background: #292524;
}

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

.breadcrumb {
  margin-bottom: 18px;
  color: #d6d3d1;
  font-size: 14px;
}

.breadcrumb a {
  color: #fbbf24;
}

.detail-one-line {
  max-width: 760px;
  margin-top: 18px;
  color: #e7e5e4;
  font-size: 20px;
  line-height: 1.75;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.detail-meta span {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #e7e5e4;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
}

.detail-tags {
  margin-bottom: 28px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.text-panel {
  overflow: hidden;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.video-shell {
  position: relative;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 10px;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.52));
}

.player-start.is-hidden {
  display: none;
}

.player-start span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 18px 36px rgba(217, 119, 6, 0.34);
}

.player-note {
  color: var(--muted);
  padding: 16px 18px;
}

.text-panel {
  padding: 28px;
}

.text-panel h2 {
  margin: 0 0 12px;
  color: #292524;
  font-size: 24px;
  font-weight: 900;
}

.text-panel h2:not(:first-child) {
  margin-top: 26px;
}

.text-panel p {
  color: #57534e;
  line-height: 2;
}

.site-footer {
  margin-top: 34px;
  background: #1c1917;
  color: #d6d3d1;
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 18px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 38px;
}

.footer-logo {
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 12px;
}

.site-footer p {
  max-width: 520px;
  color: #a8a29e;
  line-height: 1.8;
}

.site-footer h3 {
  color: #ffffff;
  margin-bottom: 14px;
  font-weight: 900;
}

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

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px;
  color: #78716c;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

  .mobile-toggle {
    display: block;
  }

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

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

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .quick-search,
  .site-search-input {
    width: 100%;
  }

  .header-actions {
    flex: 1;
  }

  .hero-carousel {
    height: 720px;
  }

  .hero-content {
    padding-bottom: 230px;
  }

  .hero-thumbs,
  .stats-strip,
  .movie-grid,
  .category-grid,
  .category-overview-grid,
  .footer-grid,
  .detail-wrap,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .stats-strip {
    margin-top: 0;
  }

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

  .rank-row {
    grid-template-columns: 42px 70px 1fr 46px;
  }

  .rank-meta {
    display: none;
  }

  .detail-wrap {
    padding-top: 42px;
    align-items: center;
  }

  .detail-poster {
    max-width: 300px;
  }
}

@media (max-width: 520px) {
  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .hero-thumb {
    grid-template-columns: 58px 1fr;
  }

  .hero-thumb img {
    width: 58px;
    height: 42px;
  }
}
