:root {
  --lamp-dark: #0f0f0f;
  --lamp-black: #050505;
  --lamp-charcoal: #1a1a1a;
  --lamp-panel: #211b18;
  --lamp-brown: #4e342e;
  --lamp-warm: #ffa726;
  --lamp-gold: #ffb74d;
  --lamp-beige: #d7ccc8;
  --lamp-muted: rgba(215, 204, 200, 0.68);
  --lamp-border: rgba(78, 52, 46, 0.58);
  --shadow-warm: 0 0 24px rgba(255, 167, 38, 0.26);
  --shadow-panel: 0 24px 70px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 167, 38, 0.12), transparent 34rem),
    radial-gradient(circle at top right, rgba(78, 52, 46, 0.42), transparent 30rem),
    var(--lamp-dark);
  color: var(--lamp-beige);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

body.menu-open {
  overflow: hidden;
}

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: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--lamp-border);
  background: rgba(15, 15, 15, 0.92);
  backdrop-filter: blur(18px);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--lamp-warm), var(--lamp-gold));
  color: #15100c;
  box-shadow: var(--shadow-warm);
}

.logo-text {
  font-size: 1.08rem;
  color: #fff4e6;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(215, 204, 200, 0.78);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: rgba(78, 52, 46, 0.54);
}

.mobile-menu-button {
  display: none;
  border: 1px solid var(--lamp-border);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(78, 52, 46, 0.24);
  color: var(--lamp-beige);
}

.hero-slider {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: #000;
}

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

.hero-stage {
  min-height: 520px;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.08)),
    linear-gradient(0deg, rgba(15, 15, 15, 1), rgba(15, 15, 15, 0.04) 52%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 112px;
  max-width: 1180px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 167, 38, 0.34);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 167, 38, 0.14);
  color: var(--lamp-gold);
  font-size: 0.83rem;
  font-weight: 700;
}

.hero-content h1,
.page-hero h1,
.detail-card h1 {
  margin: 0;
  background: linear-gradient(90deg, var(--lamp-warm), var(--lamp-gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.08;
}

.hero-content h1 {
  max-width: 680px;
  font-size: clamp(2.5rem, 6vw, 5rem);
}

.hero-content p {
  max-width: 650px;
  margin: 18px 0 0;
  color: rgba(245, 238, 232, 0.9);
  font-size: clamp(1rem, 2vw, 1.22rem);
}

.hero-meta,
.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

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

.hero-meta span,
.movie-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(78, 52, 46, 0.46);
  color: rgba(245, 238, 232, 0.82);
  font-size: 0.86rem;
}

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

.primary-button,
.ghost-button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.primary-button {
  min-height: 46px;
  padding: 0 22px;
  background: linear-gradient(135deg, var(--lamp-warm), var(--lamp-gold));
  color: #1b1208;
  box-shadow: var(--shadow-warm);
}

.ghost-button {
  min-height: 46px;
  border: 1px solid rgba(255, 167, 38, 0.42);
  padding: 0 22px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff3e0;
}

.small-button {
  min-height: 36px;
  padding: 0 14px;
  background: rgba(255, 167, 38, 0.16);
  color: var(--lamp-gold);
}

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

.ghost-button:hover {
  background: rgba(255, 167, 38, 0.14);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.46);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  opacity: 0.82;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.hero-control:hover {
  background: rgba(255, 167, 38, 0.82);
  opacity: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  right: 40px;
  bottom: 34px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

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

.hero-dot.is-active {
  width: 32px;
  background: var(--lamp-warm);
}

.home-search-panel {
  position: relative;
  z-index: 8;
  margin-top: -34px;
}

.search-strip,
.search-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--lamp-border);
  border-radius: 18px;
  padding: 14px;
  background: rgba(26, 26, 26, 0.96);
  box-shadow: var(--shadow-panel);
}

.search-strip label {
  color: var(--lamp-gold);
  font-weight: 800;
}

.search-strip input,
.search-box input {
  width: 100%;
  border: 1px solid rgba(78, 52, 46, 0.68);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  background: rgba(15, 15, 15, 0.82);
  color: #fff;
}

.search-strip button,
.search-box button {
  border: 0;
  border-radius: 12px;
  padding: 12px 20px;
  background: var(--lamp-warm);
  color: #160e08;
  font-weight: 800;
}

.page-main {
  padding: 34px 0 72px;
}

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

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

.section-heading h2,
.category-directory-card h2,
.rank-content h2,
.detail-card h2,
.site-footer h2 {
  margin: 0;
  color: #fff2df;
  line-height: 1.2;
}

.section-heading h2 {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.section-heading p {
  margin: 7px 0 0;
  color: var(--lamp-muted);
}

.text-link {
  color: var(--lamp-gold);
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(78, 52, 46, 0.58);
  border-radius: 16px;
  background: var(--lamp-charcoal);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

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

.poster-link:hover img {
  transform: scale(1.07);
}

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), transparent 52%);
  opacity: 0.92;
}

.play-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 167, 38, 0.92);
  color: #1a1008;
  font-size: 0.78rem;
  font-weight: 900;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.poster-link:hover .play-badge {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--lamp-warm), var(--lamp-gold));
  color: #1b1208;
  font-weight: 900;
}

.movie-card h3 {
  margin: 11px 0 6px;
  color: #fff3e5;
  font-size: 1rem;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--lamp-gold);
}

.movie-card p {
  display: -webkit-box;
  min-height: 2.9em;
  margin: 0 0 8px;
  overflow: hidden;
  color: rgba(215, 204, 200, 0.7);
  font-size: 0.88rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  gap: 6px;
}

.movie-meta span {
  padding: 3px 8px;
  font-size: 0.74rem;
}

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

.category-card,
.category-directory-card {
  border: 1px solid var(--lamp-border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(33, 27, 24, 0.98), rgba(20, 16, 15, 0.98));
  box-shadow: var(--shadow-panel);
}

.category-card {
  display: block;
  padding: 14px;
  transition: transform 0.2s ease, border 0.2s ease;
}

.category-card:hover,
.category-directory-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 167, 38, 0.52);
}

.category-thumbs,
.category-directory-cover {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.category-thumbs img,
.category-directory-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  object-fit: cover;
}

.category-card h3,
.category-card p,
.category-card span {
  margin: 0;
}

.category-card h3 {
  color: #fff1df;
  font-size: 1.05rem;
}

.category-card p {
  margin-top: 7px;
  color: var(--lamp-muted);
  font-size: 0.88rem;
}

.category-card span {
  display: inline-flex;
  margin-top: 12px;
  color: var(--lamp-gold);
  font-size: 0.86rem;
  font-weight: 800;
}

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

.category-directory-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  padding: 16px;
  transition: transform 0.2s ease, border 0.2s ease;
}

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

.category-directory-card p {
  color: var(--lamp-muted);
}

.page-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--lamp-border);
  border-radius: 22px;
  padding: 40px;
  background:
    linear-gradient(135deg, rgba(255, 167, 38, 0.16), rgba(78, 52, 46, 0.2)),
    rgba(26, 26, 26, 0.92);
  box-shadow: var(--shadow-panel);
}

.narrow-hero h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.narrow-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: rgba(245, 238, 232, 0.84);
  font-size: 1.05rem;
}

.center-hero {
  text-align: center;
}

.center-hero .eyebrow,
.center-actions {
  margin-left: auto;
  margin-right: auto;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(215, 204, 200, 0.68);
  font-size: 0.92rem;
}

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

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

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

.rank-row {
  display: grid;
  grid-template-columns: 78px 54px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--lamp-border);
  border-radius: 16px;
  padding: 12px;
  background: rgba(26, 26, 26, 0.86);
}

.rank-cover {
  overflow: hidden;
  border-radius: 12px;
}

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

.rank-number {
  color: var(--lamp-warm);
  font-size: 1.5rem;
  font-weight: 900;
}

.rank-content h2 {
  font-size: 1.05rem;
}

.rank-content h2 a:hover {
  color: var(--lamp-gold);
}

.rank-content p {
  display: -webkit-box;
  margin: 6px 0 8px;
  overflow: hidden;
  color: var(--lamp-muted);
  font-size: 0.9rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.search-page-panel {
  margin-top: 24px;
}

.search-box {
  grid-template-columns: minmax(0, 1fr) auto;
}

.search-count {
  margin: 12px 0 0;
  color: var(--lamp-muted);
}

.detail-main {
  padding-top: 24px;
}

.watch-panel {
  margin-bottom: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--lamp-border);
  border-radius: 20px;
  background: #000;
  box-shadow: var(--shadow-panel);
}

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

.player-cover-button {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.62));
  color: #fff;
}

.player-cover-button span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: rgba(255, 167, 38, 0.92);
  color: #1b1208;
  font-size: 2.4rem;
  box-shadow: var(--shadow-warm);
}

.player-shell.is-playing .player-cover-button {
  display: none;
}

.player-status {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.62);
  color: var(--lamp-beige);
  font-size: 0.85rem;
}

.player-shell.is-ready .player-status,
.player-shell.is-playing .player-status {
  display: none;
}

.player-controls {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-shell:hover .player-controls,
.player-shell:focus-within .player-controls,
.player-shell.is-paused .player-controls {
  opacity: 1;
  transform: translateY(0);
}

.player-controls button {
  border: 1px solid rgba(255, 167, 38, 0.28);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff6e8;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.detail-poster,
.detail-card {
  border: 1px solid var(--lamp-border);
  border-radius: 20px;
  background: rgba(26, 26, 26, 0.92);
  box-shadow: var(--shadow-panel);
}

.detail-poster {
  position: sticky;
  top: 96px;
  overflow: hidden;
  padding: 14px;
}

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

.full-button {
  width: 100%;
  margin-top: 14px;
}

.detail-card {
  padding: 28px;
}

.detail-card h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.detail-meta {
  margin-top: 18px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 26px;
}

.tag-list span {
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(15, 15, 15, 0.9);
  color: rgba(215, 204, 200, 0.78);
  font-size: 0.86rem;
}

.detail-card section {
  border-top: 1px solid var(--lamp-border);
  padding-top: 24px;
  margin-top: 24px;
}

.detail-card h2 {
  margin-bottom: 14px;
  color: var(--lamp-warm);
  font-size: 1.28rem;
}

.detail-card p {
  margin: 0 0 12px;
  color: rgba(215, 204, 200, 0.84);
}

.detail-card .lead-text {
  color: #fff2df;
  font-weight: 700;
}

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

.site-footer {
  border-top: 1px solid var(--lamp-border);
  padding: 34px 0;
  background: rgba(5, 5, 5, 0.72);
}

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

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

.site-footer p {
  margin: 10px 0 0;
  color: var(--lamp-muted);
}

.site-footer h2 {
  margin-bottom: 12px;
  font-size: 1rem;
}

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

.footer-links a {
  color: rgba(215, 204, 200, 0.72);
}

.footer-links a:hover {
  color: var(--lamp-gold);
}

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

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

  .compact-rank-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .mobile-menu-button {
    display: inline-flex;
  }

  .primary-nav {
    position: fixed;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--lamp-border);
    border-radius: 18px;
    padding: 12px;
    background: rgba(15, 15, 15, 0.98);
    box-shadow: var(--shadow-panel);
  }

  body.menu-open .primary-nav {
    display: flex;
  }

  .hero-slider,
  .hero-stage {
    min-height: 620px;
  }

  .hero-content {
    padding-top: 110px;
  }

  .hero-control {
    display: none;
  }

  .hero-dots {
    left: 24px;
    right: auto;
  }

  .search-strip,
  .search-box {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .detail-poster {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

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

  .primary-nav {
    top: 64px;
  }

  .logo-mark {
    width: 36px;
    height: 36px;
  }

  .logo-text {
    font-size: 1rem;
  }

  .hero-slider,
  .hero-stage {
    min-height: 570px;
  }

  .hero-content h1 {
    font-size: 2.45rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

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

  .page-hero,
  .detail-card {
    padding: 22px;
  }

  .rank-row {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .rank-number,
  .rank-row .small-button {
    display: none;
  }

  .player-controls {
    justify-content: center;
  }
}
