* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #f8fafc;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 30rem),
    radial-gradient(circle at 80% 10%, rgba(120, 113, 108, 0.22), transparent 26rem),
    #1c1917;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(68, 64, 60, 0.82);
  background: rgba(28, 25, 23, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: min(1200px, calc(100% - 2rem));
  min-height: 4.5rem;
  margin: 0 auto;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 0.9rem;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, #d97706, #44403c);
  box-shadow: 0 18px 35px rgba(217, 119, 6, 0.26);
}

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

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

.brand-text small {
  color: #a8a29e;
  margin-top: 0.25rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-link,
.mobile-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.9rem;
  border-radius: 0.75rem;
  color: #d6d3d1;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: #ffffff;
  background: #d97706;
}

.header-search,
.mobile-search,
.search-page-form,
.library-filter {
  display: flex;
  gap: 0.55rem;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.library-filter input,
.library-filter select {
  min-width: 0;
  border: 1px solid #57534e;
  border-radius: 0.75rem;
  color: #f5f5f4;
  outline: none;
  background: rgba(68, 64, 60, 0.86);
  padding: 0.75rem 0.95rem;
}

.header-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.library-filter input:focus,
.library-filter select:focus {
  border-color: #f59e0b;
}

.header-search button,
.mobile-search button,
.search-page-form button,
.library-filter button {
  border: 0;
  border-radius: 0.75rem;
  color: white;
  background: #d97706;
  padding: 0.75rem 1rem;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 0.75rem;
  color: #f5f5f4;
  background: #292524;
  padding: 0.7rem 0.85rem;
}

.mobile-panel {
  display: none;
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 1rem;
}

.mobile-panel.is-open {
  display: grid;
  gap: 0.65rem;
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 76vh;
  background: #0c0a09;
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #292524, #78350f);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.92), rgba(12, 10, 9, 0.56), rgba(12, 10, 9, 0.1)),
    linear-gradient(0deg, #1c1917 0%, rgba(28, 25, 23, 0.28) 46%, rgba(28, 25, 23, 0.1) 100%);
}

.hero-content {
  position: absolute;
  left: max(2rem, calc((100vw - 1200px) / 2));
  bottom: 8rem;
  width: min(680px, calc(100% - 4rem));
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.7rem;
  color: #fbbf24;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: #ffffff;
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-content h2 {
  max-width: 760px;
  font-size: clamp(2.4rem, 6vw, 5.4rem);
}

.hero-content p,
.hero-index-card p,
.page-hero p,
.section-heading p,
.detail-info .lead,
.detail-article p,
.movie-card p,
.site-footer p {
  color: #d6d3d1;
  line-height: 1.8;
}

.hero-content p {
  max-width: 620px;
  margin: 1.2rem 0 0;
  font-size: 1.08rem;
}

.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-tags,
.detail-tags {
  margin-top: 1.25rem;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(120, 53, 15, 0.42);
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.9rem;
  min-height: 2.85rem;
  padding: 0 1.15rem;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: #d97706;
  box-shadow: 0 18px 42px rgba(217, 119, 6, 0.26);
}

.ghost-btn,
.section-more {
  border: 1px solid rgba(214, 211, 209, 0.22);
  color: #f5f5f4;
  background: rgba(41, 37, 36, 0.7);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  left: max(2rem, calc((100vw - 1200px) / 2));
  bottom: 4rem;
  display: flex;
  gap: 0.55rem;
}

.hero-dot {
  width: 2.4rem;
  height: 0.28rem;
  border: 0;
  border-radius: 999px;
  background: rgba(231, 229, 228, 0.35);
  cursor: pointer;
}

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

.hero-index-card {
  position: absolute;
  right: max(2rem, calc((100vw - 1200px) / 2));
  bottom: 4rem;
  width: min(380px, calc(100% - 4rem));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 1.5rem;
  background: rgba(41, 37, 36, 0.72);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
  padding: 1.35rem;
}

.hero-index-card h1 {
  margin: 0;
  color: #fef3c7;
  font-size: 1.35rem;
  line-height: 1.35;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.hero-links a {
  border-radius: 999px;
  color: #fef3c7;
  background: rgba(120, 53, 15, 0.5);
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
}

.page-main {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 5rem;
}

.page-hero {
  position: relative;
  margin-bottom: 2rem;
  border: 1px solid rgba(120, 113, 108, 0.38);
  border-radius: 1.6rem;
  background:
    linear-gradient(135deg, rgba(217, 119, 6, 0.22), rgba(41, 37, 36, 0.86)),
    radial-gradient(circle at 88% 18%, rgba(251, 191, 36, 0.16), transparent 18rem);
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem);
}

.page-hero h1 {
  max-width: 860px;
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.page-hero p {
  max-width: 760px;
  margin: 1rem 0 0;
}

.content-section {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4.5rem 0 0;
}

.page-main .content-section {
  width: 100%;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 1.4rem;
}

.section-heading h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1.16;
}

.section-heading p {
  max-width: 720px;
  margin: 0.55rem 0 0;
}

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

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

.movie-card {
  border: 1px solid rgba(87, 83, 78, 0.7);
  border-radius: 1.15rem;
  overflow: hidden;
  background: rgba(41, 37, 36, 0.84);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

.movie-card[hidden] {
  display: none;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.2;
  background: linear-gradient(135deg, #292524, #78350f);
  overflow: hidden;
}

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

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

.poster-badge {
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.62);
  padding: 0.3rem 0.58rem;
  font-size: 0.78rem;
}

.movie-card-body {
  padding: 1rem;
}

.movie-card h2 {
  margin: 0.7rem 0 0.45rem;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.35;
}

.movie-card h2 a:hover,
.ranking-table a:hover,
.breadcrumb a:hover {
  color: #fbbf24;
}

.movie-card p {
  display: -webkit-box;
  min-height: 4.95rem;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 0.9rem;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
  color: #a8a29e;
  font-size: 0.82rem;
}

.category-grid,
.category-panels {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.category-tile,
.category-panel a {
  display: grid;
  min-height: 10rem;
  border: 1px solid rgba(120, 113, 108, 0.55);
  border-radius: 1.2rem;
  background:
    linear-gradient(135deg, rgba(120, 53, 15, 0.52), rgba(41, 37, 36, 0.9)),
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.22), transparent 8rem);
  padding: 1.1rem;
  transition: transform 0.2s ease, border 0.2s ease;
}

.category-tile:hover,
.category-panel a:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.65);
}

.category-tile span,
.category-panel h2 {
  color: #fef3c7;
  font-size: 1.1rem;
  font-weight: 900;
}

.category-tile strong,
.category-panel p {
  align-self: end;
  color: #d6d3d1;
  font-size: 0.88rem;
  line-height: 1.7;
}

.category-order {
  color: #f59e0b;
  font-weight: 900;
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.9rem;
  border: 1px solid rgba(87, 83, 78, 0.72);
  border-radius: 1rem;
  background: rgba(41, 37, 36, 0.75);
  padding: 0.9rem 1rem;
}

.rank-num {
  display: inline-grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border-radius: 0.7rem;
  color: white;
  background: #d97706;
  font-weight: 900;
}

.rank-title {
  color: #ffffff;
  font-weight: 800;
}

.rank-meta {
  color: #a8a29e;
  font-size: 0.85rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(87, 83, 78, 0.72);
  border-radius: 1.2rem;
  background: rgba(41, 37, 36, 0.72);
}

.ranking-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.ranking-table th,
.ranking-table td {
  border-bottom: 1px solid rgba(87, 83, 78, 0.6);
  padding: 0.9rem 1rem;
  text-align: left;
}

.ranking-table th {
  color: #fef3c7;
  font-size: 0.85rem;
}

.ranking-table td {
  color: #d6d3d1;
}

.library-filter,
.search-page-form {
  max-width: 760px;
  margin-top: 1.5rem;
}

.library-filter input,
.search-page-form input {
  flex: 1;
}

.detail-main {
  padding-top: 1.5rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: #a8a29e;
  margin-bottom: 1.5rem;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  border: 1px solid rgba(120, 113, 108, 0.45);
  border-radius: 1.6rem;
  background:
    linear-gradient(135deg, rgba(68, 64, 60, 0.9), rgba(28, 25, 23, 0.94)),
    radial-gradient(circle at 80% 10%, rgba(245, 158, 11, 0.16), transparent 22rem);
  padding: clamp(1.2rem, 3vw, 2rem);
}

.detail-poster {
  aspect-ratio: 3 / 4.2;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, #292524, #78350f);
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.detail-info h1 {
  font-size: clamp(2rem, 5vw, 4.3rem);
}

.detail-info .lead {
  max-width: 760px;
  margin: 1rem 0 0;
  font-size: 1.08rem;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1.5rem 0;
}

.detail-meta div {
  border: 1px solid rgba(87, 83, 78, 0.62);
  border-radius: 1rem;
  background: rgba(28, 25, 23, 0.52);
  padding: 0.85rem 1rem;
}

.detail-meta dt {
  color: #a8a29e;
  font-size: 0.78rem;
}

.detail-meta dd {
  margin: 0.25rem 0 0;
  color: #f5f5f4;
  font-weight: 800;
}

.player-section {
  padding-top: 3rem;
}

.player-frame {
  position: relative;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 1.25rem;
  background: #000000;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 0.7rem;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18));
  cursor: pointer;
}

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

.play-circle {
  display: grid;
  width: 5rem;
  height: 5rem;
  place-items: center;
  border-radius: 999px;
  background: #d97706;
  box-shadow: 0 18px 42px rgba(217, 119, 6, 0.32);
  font-size: 2rem;
}

.player-overlay strong {
  max-width: min(90%, 720px);
  text-align: center;
  font-size: clamp(1.1rem, 3vw, 2rem);
}

.detail-article {
  border: 1px solid rgba(87, 83, 78, 0.62);
  border-radius: 1.2rem;
  background: rgba(41, 37, 36, 0.75);
  padding: clamp(1.2rem, 3vw, 2rem);
}

.detail-article h2 {
  color: #ffffff;
  margin: 1.4rem 0 0.5rem;
}

.site-footer {
  border-top: 1px solid rgba(68, 64, 60, 0.82);
  background: #0c0a09;
  padding: 3.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-footer h2 {
  margin: 0 0 1rem;
  color: #ffffff;
  font-size: 1rem;
}

.site-footer ul {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

.copyright {
  width: min(1200px, calc(100% - 2rem));
  margin: 2rem auto 0;
  color: #78716c;
  font-size: 0.85rem;
}

.empty-results {
  grid-column: 1 / -1;
  border: 1px solid rgba(87, 83, 78, 0.72);
  border-radius: 1.2rem;
  color: #d6d3d1;
  background: rgba(41, 37, 36, 0.72);
  padding: 2rem;
  text-align: center;
}

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

  .hero-index-card {
    left: 1rem;
    right: 1rem;
    bottom: auto;
    width: auto;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .brand-text small {
    display: none;
  }

  .hero {
    min-height: 70vh;
  }

  .hero-content {
    left: 1rem;
    bottom: 5rem;
    width: calc(100% - 2rem);
  }

  .hero-index-card {
    padding: 1rem;
  }

  .hero-index-card p,
  .hero-links {
    display: none;
  }

  .hero-dots {
    left: 1rem;
    bottom: 2rem;
  }

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

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

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

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

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

@media (max-width: 560px) {
  .header-inner,
  .mobile-panel,
  .content-section,
  .page-main,
  .footer-grid,
  .copyright {
    width: min(100% - 1rem, 1200px);
  }

  .movie-grid,
  .wide-grid,
  .category-grid,
  .category-panels,
  .ranking-list,
  .detail-meta {
    grid-template-columns: 1fr;
  }

  .ranking-list a {
    grid-template-columns: auto 1fr;
  }

  .rank-meta {
    grid-column: 2;
  }

  .library-filter,
  .search-page-form,
  .mobile-search {
    flex-direction: column;
  }

  .page-hero {
    border-radius: 1rem;
    padding: 1.4rem;
  }
}
