:root {
  --stone-950: #0c0a09;
  --stone-900: #1c1917;
  --stone-800: #292524;
  --stone-700: #44403c;
  --stone-600: #57534e;
  --stone-500: #78716c;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --stone-50: #fafaf9;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-300: #fcd34d;
  --white: #ffffff;
  --shadow: 0 20px 50px rgba(28, 25, 23, 0.12);
  --shadow-soft: 0 12px 32px rgba(28, 25, 23, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(12, 10, 9, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber-300), var(--amber-600));
  color: var(--stone-950);
  box-shadow: 0 12px 32px rgba(245, 158, 11, 0.32);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 9px 14px;
  color: rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  font-size: 15px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--stone-950);
  background: var(--amber-500);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 90vh;
  overflow: hidden;
  background: var(--stone-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, transform 1.1s ease;
}

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

.hero-mask,
.detail-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(12, 10, 9, 0.96) 0%, rgba(12, 10, 9, 0.58) 52%, rgba(12, 10, 9, 0.18) 100%);
}

.hero-content {
  position: absolute;
  left: max(28px, calc((100% - 1180px) / 2));
  right: 28px;
  bottom: 120px;
  max-width: 760px;
  color: var(--white);
}

.hero-badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--amber-500);
  color: var(--stone-950);
  font-size: 13px;
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-copy p {
  max-width: 760px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(16px, 2vw, 20px);
}

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

.hero-meta span,
.detail-meta span,
.card-meta span,
.rank-meta span,
.detail-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

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

.btn-primary,
.btn-ghost,
.section-link,
.rank-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--amber-500);
  color: var(--stone-950);
  box-shadow: 0 16px 40px rgba(245, 158, 11, 0.32);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--amber-600);
}

.btn-ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
}

.btn-ghost.dark {
  color: var(--stone-900);
  border-color: rgba(28, 25, 23, 0.16);
  background: rgba(255, 255, 255, 0.76);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  border-color: var(--amber-500);
}

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

.hero-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(28, 25, 23, 0.62);
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: 0.2s ease;
}

.hero-tab img {
  width: 58px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
}

.hero-tab.is-active,
.hero-tab:hover {
  color: var(--white);
  border-color: rgba(245, 158, 11, 0.7);
  background: rgba(245, 158, 11, 0.18);
}

.intro-search {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 28px;
  margin-top: -52px;
  position: relative;
  z-index: 5;
}

.intro-copy,
.filter-panel,
.detail-panel,
.category-overview-card {
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.intro-copy {
  padding: 30px;
}

.intro-copy h2,
.section-heading h2,
.detail-panel h2,
.category-overview-head h2 {
  margin: 0 0 10px;
  color: var(--stone-900);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.intro-copy p,
.section-heading p,
.detail-panel p,
.category-overview-head p {
  margin: 0;
  color: var(--stone-600);
}

.filter-panel {
  padding: 20px;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 14px;
  align-items: end;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--stone-600);
  font-size: 13px;
  font-weight: 700;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--stone-200);
  border-radius: 14px;
  outline: none;
  background: var(--stone-50);
  color: var(--stone-900);
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.no-result {
  display: none;
  margin-top: 18px;
  padding: 18px;
  border-radius: 16px;
  background: #fff7ed;
  color: var(--amber-700);
  font-weight: 700;
}

.no-result.is-visible {
  display: block;
}

.content-section,
.category-overview-list {
  padding: 72px 0;
}

.soft-section {
  padding: 72px 0;
  background: linear-gradient(135deg, #fffbeb, #f5f5f4);
}

.section-heading,
.category-overview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.compact-heading {
  margin-bottom: 18px;
}

.section-link,
.rank-play {
  min-height: 40px;
  color: var(--stone-950);
  background: var(--amber-500);
}

.section-link:hover,
.rank-play:hover {
  background: var(--amber-600);
  transform: translateY(-2px);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: 0.25s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--stone-900);
}

.card-compact .card-cover {
  aspect-ratio: 3 / 4;
}

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

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

.card-year,
.card-rank {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(12, 10, 9, 0.76);
  font-size: 12px;
  font-weight: 800;
}

.card-rank {
  left: 10px;
  right: auto;
  background: var(--amber-500);
  color: var(--stone-950);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  margin-bottom: 8px;
  overflow: hidden;
  color: var(--stone-900);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover,
.rank-title:hover,
.category-card a:hover {
  color: var(--amber-600);
}

.card-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--stone-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.rank-meta,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.card-meta span,
.rank-meta span,
.card-tags span,
.detail-tags span {
  color: var(--stone-600);
  background: var(--stone-100);
}

.card-tags {
  margin-top: 10px;
}

.card-tags span {
  font-size: 12px;
}

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

.category-card {
  min-height: 190px;
  padding: 20px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: 0.2s ease;
}

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

.category-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--amber-600);
  font-weight: 900;
}

.category-card strong {
  display: block;
  color: var(--stone-900);
  font-size: 15px;
}

.category-card div {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  color: var(--stone-600);
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 120px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--stone-900);
  color: var(--amber-300);
  font-weight: 900;
}

.rank-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: var(--stone-900);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-title {
  display: inline-flex;
  margin-bottom: 4px;
  color: var(--stone-900);
  font-size: 18px;
  font-weight: 900;
}

.rank-content p {
  margin: 0 0 8px;
  color: var(--stone-600);
}

.page-main {
  padding-top: 72px;
}

.page-hero {
  position: relative;
  padding: 84px 0 74px;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.24), transparent 28%), linear-gradient(135deg, var(--stone-950), var(--stone-800));
  color: var(--white);
}

.page-hero .eyebrow {
  margin-bottom: 18px;
}

.category-overview-list {
  display: grid;
  gap: 28px;
}

.category-overview-card {
  padding: 28px;
}

.category-list {
  margin-top: 26px;
}

.detail-main {
  background: var(--stone-50);
}

.detail-hero {
  position: relative;
  min-height: 76vh;
  padding: 132px 0 70px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  color: var(--white);
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
}

.detail-poster {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

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

.detail-tags {
  margin: 0 0 24px;
}

.player-section {
  padding: 72px 0 34px;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(0deg, rgba(12, 10, 9, 0.78), rgba(12, 10, 9, 0.26));
  color: var(--white);
  text-align: center;
  cursor: pointer;
  transition: opacity 0.25s ease;
}

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

.player-button {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--amber-500);
  color: var(--stone-950);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.36);
  transition: 0.2s ease;
}

.player-button:hover {
  transform: scale(1.08);
  background: var(--amber-600);
}

.player-cover strong {
  max-width: min(680px, 90%);
  font-size: clamp(22px, 3vw, 36px);
  line-height: 1.2;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding: 34px 0;
}

.detail-panel {
  padding: 28px;
}

.detail-panel p {
  font-size: 16px;
  line-height: 1.9;
}

.site-footer {
  margin-top: 34px;
  padding: 42px 0;
  color: rgba(255, 255, 255, 0.7);
  background: var(--stone-950);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-inner p {
  margin: 0;
}

.footer-links {
  display: flex;
  gap: 14px;
}

.footer-links a:hover {
  color: var(--amber-300);
}

.is-hidden-by-filter {
  display: none !important;
}

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

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

  .intro-search,
  .detail-hero-inner,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .header-inner {
    height: 64px;
  }

  .menu-button {
    display: grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    top: 64px;
    left: 14px;
    right: 14px;
    display: none;
    padding: 12px;
    border-radius: 18px;
    background: rgba(12, 10, 9, 0.96);
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    border-radius: 12px;
  }

  .hero {
    min-height: 86vh;
  }

  .hero-content {
    bottom: 148px;
  }

  .hero-tabs {
    grid-template-columns: 1fr;
    max-height: 118px;
    overflow: auto;
  }

  .hero-tab {
    min-width: 220px;
  }

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

  .section-heading,
  .category-overview-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .compact-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .rank-item {
    grid-template-columns: 42px 86px minmax(0, 1fr);
  }

  .rank-play {
    grid-column: 2 / -1;
    width: 100%;
  }

  .rank-content p {
    display: none;
  }

  .page-main {
    padding-top: 64px;
  }

  .detail-hero {
    padding-top: 104px;
  }

  .player-button {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .compact-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .inline-actions {
    width: 100%;
  }

  .btn-primary,
  .btn-ghost {
    flex: 1 1 auto;
  }
}
