* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #f5f5f4;
  background: #1c1917;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(28, 25, 23, 0.9);
  border-bottom: 1px solid rgba(87, 83, 78, 0.75);
  backdrop-filter: blur(14px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #d97706, #44403c);
  color: #fff7ed;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.28);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-text strong {
  color: #fef3c7;
  font-size: 1.1rem;
}

.brand-text small {
  color: #a8a29e;
  margin-top: 4px;
}

.desktop-nav,
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.icon-button,
.mobile-link {
  border: 0;
  color: #d6d3d1;
  background: transparent;
  border-radius: 12px;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
}

.nav-link:hover,
.nav-link.active,
.icon-button:hover,
.mobile-link:hover,
.mobile-link.active {
  color: #fff;
  background: #92400e;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  font-size: 1.25rem;
  cursor: pointer;
}

.menu-button {
  display: none;
}

.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  padding: 8px;
  border-radius: 14px;
  background: #292524;
  border: 1px solid #44403c;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #d6d3d1;
}

.dropdown-menu a:hover {
  background: #44403c;
  color: #fbbf24;
}

.header-panel,
.mobile-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.quick-search,
.hero-search {
  display: flex;
  gap: 10px;
}

.quick-search input,
.hero-search input,
.filter-bar input,
.filter-bar select {
  min-width: 0;
  border: 1px solid #57534e;
  border-radius: 14px;
  color: #fff;
  background: rgba(68, 64, 60, 0.86);
  outline: none;
}

.quick-search input,
.hero-search input {
  flex: 1;
  padding: 12px 14px;
}

.quick-search input:focus,
.hero-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #f59e0b;
}

.quick-search button,
.hero-search button,
.primary-button,
.ghost-button,
.panel-link {
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 700;
}

.quick-search button,
.hero-search button,
.primary-button {
  color: #fff;
  background: #d97706;
  box-shadow: 0 12px 30px rgba(217, 119, 6, 0.28);
}

.quick-search button:hover,
.hero-search button:hover,
.primary-button:hover {
  background: #b45309;
}

.ghost-button,
.panel-link {
  color: #fef3c7;
  background: rgba(68, 64, 60, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.26);
}

.ghost-button:hover,
.panel-link:hover {
  color: #fff;
  background: #44403c;
}

.mobile-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-link {
  padding: 10px 12px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #1c1917 2%, rgba(28, 25, 23, 0.72) 48%, rgba(28, 25, 23, 0.18)), linear-gradient(to right, rgba(28, 25, 23, 0.92), rgba(28, 25, 23, 0.34), rgba(28, 25, 23, 0.72));
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  bottom: 96px;
  width: min(680px, calc(100% - 64px));
}

.hero-kicker,
.breadcrumb {
  color: #fbbf24;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-content h1 {
  margin: 12px 0 14px;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1;
  color: #fff7ed;
}

.hero-content p {
  margin: 0;
  color: #e7e5e4;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
}

.hero-tags,
.tag-list,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.tag-list span,
.detail-meta span {
  padding: 5px 10px;
  color: #fef3c7;
  background: rgba(146, 64, 14, 0.72);
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 999px;
  font-size: 0.82rem;
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-controls button {
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 999px;
  cursor: pointer;
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  font-size: 1.8rem;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  opacity: 0.55;
}

.hero-dot.active {
  width: 30px;
  opacity: 1;
  background: #f59e0b;
}

.quick-entry,
.content-section,
.page-hero,
.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-entry {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 18px;
  margin-top: -48px;
  position: relative;
  z-index: 2;
}

.quick-entry-card,
.category-card,
.rank-panel,
.player-card,
.detail-info {
  border: 1px solid rgba(87, 83, 78, 0.8);
  border-radius: 22px;
  background: rgba(41, 37, 36, 0.92);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.quick-entry-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 160px;
}

.quick-entry-card h2,
.page-hero h1,
.section-heading h2,
.rank-panel h2,
.detail-info h1,
.detail-copy h2 {
  margin: 0;
  color: #fff7ed;
}

.quick-entry-card p,
.quick-entry-card span,
.page-hero p,
.section-heading p,
.card-line,
.detail-line,
.detail-copy p,
.site-footer p {
  color: #d6d3d1;
  line-height: 1.75;
}

.content-section {
  padding: 52px 0 0;
}

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

.section-heading a {
  color: #fbbf24;
  font-weight: 700;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(87, 83, 78, 0.7);
  border-radius: 18px;
  background: #292524;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.56);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.32);
}

.poster-link {
  display: block;
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #44403c;
}

.movie-card.compact .poster-link {
  aspect-ratio: 3 / 4;
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 52%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-gradient {
  opacity: 1;
}

.type-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  color: #fff;
  background: #d97706;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.rank-badge {
  left: auto;
  right: 10px;
  background: rgba(0, 0, 0, 0.65);
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 1rem;
  line-height: 1.4;
}

.card-body h3 a:hover {
  color: #fbbf24;
}

.card-meta {
  margin: 0 0 8px;
  color: #a8a29e;
  font-size: 0.85rem;
}

.card-line {
  margin: 0 0 12px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.9rem;
}

.tag-list span {
  background: rgba(87, 83, 78, 0.82);
  color: #fef3c7;
}

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

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

.category-card {
  padding: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.55);
  background: #3b3028;
}

.category-card span {
  color: #fef3c7;
  font-size: 1.2rem;
  font-weight: 800;
}

.category-card p {
  margin: 10px 0 0;
  color: #c9c2bc;
  line-height: 1.7;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.rank-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(87, 83, 78, 0.55);
}

.rank-row span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: #d97706;
  font-weight: 800;
}

.rank-row strong {
  color: #f5f5f4;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-row em {
  grid-column: 2;
  color: #a8a29e;
  font-style: normal;
  font-size: 0.85rem;
}

.panel-link {
  display: block;
  margin-top: 18px;
  text-align: center;
}

.page-main {
  padding-bottom: 52px;
}

.page-hero {
  padding: 64px 0 16px;
}

.compact-hero {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.page-hero p {
  max-width: 780px;
  margin: 12px 0 0;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 160px;
  gap: 12px;
  margin-top: 24px;
}

.filter-bar input,
.filter-bar select {
  padding: 12px 14px;
}

.empty-state {
  padding: 56px 0;
  text-align: center;
  color: #a8a29e;
}

.detail-main {
  padding-bottom: 52px;
}

.detail-hero {
  padding: 36px 0 0;
}

.breadcrumb {
  margin: 0 0 18px;
  font-size: 0.92rem;
}

.breadcrumb a:hover {
  color: #fff7ed;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: stretch;
}

.player-card,
.detail-info {
  overflow: hidden;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  background: #0c0a09;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.55));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #d97706;
  font-size: 2rem;
  box-shadow: 0 20px 55px rgba(217, 119, 6, 0.45);
}

.detail-info {
  padding: 28px;
}

.detail-info h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.08;
}

.detail-line {
  margin: 18px 0;
}

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

.detail-copy {
  max-width: 980px;
}

.detail-copy h2 {
  margin: 0 0 14px;
  font-size: 1.55rem;
}

.detail-copy p {
  margin: 0 0 26px;
  font-size: 1.05rem;
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid rgba(87, 83, 78, 0.75);
  background: #15110f;
}

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

.footer-inner strong {
  color: #fef3c7;
  font-size: 1.1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: flex-end;
  align-content: start;
}

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

.footer-links a:hover {
  color: #fbbf24;
}

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

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

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

  .rank-panel {
    position: static;
  }
}

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

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

  .brand-text small {
    display: none;
  }

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

  .hero-content {
    left: 18px;
    bottom: 92px;
    width: calc(100% - 36px);
  }

  .quick-entry {
    grid-template-columns: 1fr;
    margin-top: -28px;
  }

  .quick-search,
  .hero-search,
  .section-heading,
  .hero-actions,
  .detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

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

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .small-grid,
  .ranking-grid,
  .category-grid,
  .category-grid.large,
  .mobile-nav {
    grid-template-columns: 1fr;
  }

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

  .play-button {
    width: 66px;
    height: 66px;
  }
}
