:root {
  --bg: #f7f2ea;
  --panel: #ffffff;
  --stone-950: #14110f;
  --stone-900: #1c1917;
  --stone-800: #292524;
  --stone-700: #44403c;
  --stone-600: #57534e;
  --stone-500: #78716c;
  --stone-300: #d6d3d1;
  --stone-200: #e7e5e4;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-100: #fef3c7;
  --orange-600: #ea580c;
  --shadow: 0 18px 45px rgba(41, 37, 36, 0.16);
  --soft-shadow: 0 10px 30px rgba(41, 37, 36, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--stone-800);
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 34rem), var(--bg);
  font-family: Inter, 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,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

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

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff7ed;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

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

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

.site-nav a {
  color: #fde68a;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: white;
  background: rgba(255, 255, 255, 0.11);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: white;
  border-radius: 4px;
}

main {
  min-height: 60vh;
}

.hero-shell {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: linear-gradient(135deg, #1c1917, #451a03 52%, #1c1917);
}

.hero-slide {
  display: none;
  position: relative;
  min-height: 70vh;
  align-items: center;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
  gap: 44px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0 90px;
}

.hero-slide.is-active {
  display: grid;
}

.hero-backdrop,
.detail-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: linear-gradient(to top, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.1)), var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(22px) brightness(0.55);
  transform: scale(1.12);
}

.hero-content,
.hero-cover {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 9px 15px;
  color: #fde68a;
  background: rgba(217, 119, 6, 0.20);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 800;
}

.hero-kicker strong {
  color: white;
}

.hero-content h1 {
  max-width: 760px;
  margin: 24px 0 18px;
  color: white;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero-intro {
  max-width: 740px;
  margin: 0 0 22px;
  color: #e7e5e4;
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags span,
.detail-genres span,
.detail-tags span,
.movie-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: white;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
}

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

.primary-button,
.ghost-button,
.search-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-button,
.search-link {
  color: white;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
  box-shadow: 0 16px 32px rgba(217, 119, 6, 0.28);
}

.primary-button:hover,
.search-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(217, 119, 6, 0.36);
}

.ghost-button {
  color: #fde68a;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.ghost-button:hover {
  color: white;
  background: rgba(255, 255, 255, 0.16);
}

.hero-cover {
  display: block;
  max-width: 360px;
  justify-self: end;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #292524, #92400e);
}

.hero-dots {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--amber-500);
}

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

.quick-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
  gap: 28px;
  margin-top: -38px;
  position: relative;
  z-index: 5;
  padding: 30px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  border: 1px solid rgba(231, 229, 228, 0.9);
  backdrop-filter: blur(18px);
}

.quick-search h2,
.section-heading h2,
.page-hero h1,
.detail-main h1 {
  margin: 0;
  color: var(--stone-800);
  line-height: 1.18;
}

.quick-search h2 {
  font-size: clamp(26px, 4vw, 40px);
}

.quick-search p {
  margin: 10px 0 0;
  color: var(--stone-600);
}

.search-box {
  display: grid;
  gap: 12px;
}

.search-box input,
.filter-panel input,
.page-search input,
.filter-panel select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--stone-200);
  border-radius: 14px;
  padding: 0 16px;
  color: var(--stone-800);
  background: white;
  outline: none;
  transition: 0.2s ease;
}

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

.quick-categories {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-categories a {
  padding: 9px 13px;
  color: var(--amber-700);
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

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

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

.section-heading span,
.page-hero span {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--amber-700);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2 {
  font-size: clamp(26px, 4vw, 38px);
}

.section-heading a {
  color: var(--amber-700);
  font-weight: 900;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  display: block;
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  background: white;
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(231, 229, 228, 0.8);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(245, 158, 11, 0.45);
}

.movie-poster {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #292524, #92400e);
}

.movie-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.28s ease;
}

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

.movie-score,
.movie-type {
  position: absolute;
  top: 10px;
  z-index: 1;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.movie-score {
  left: 10px;
  color: white;
  background: rgba(217, 119, 6, 0.88);
}

.movie-type {
  right: 10px;
  color: var(--stone-800);
  background: rgba(255, 255, 255, 0.88);
}

.movie-info {
  padding: 14px;
}

.movie-info h3 {
  margin: 0 0 8px;
  color: var(--stone-800);
  font-size: 16px;
  line-height: 1.32;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card:hover h3 {
  color: var(--amber-700);
}

.movie-line {
  min-height: 42px;
  margin: 0 0 12px;
  color: var(--stone-600);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-tags span {
  color: var(--stone-700);
  background: var(--amber-100);
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--stone-200);
  color: var(--stone-500);
  font-size: 12px;
  font-weight: 700;
}

.highlight-section {
  padding: 36px;
  margin-top: 64px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fffbeb, #fff7ed);
  box-shadow: var(--soft-shadow);
}

.category-stack {
  display: grid;
  gap: 36px;
}

.category-strip {
  min-width: 0;
}

.small-heading {
  margin-bottom: 16px;
}

.small-heading h3 {
  margin: 0;
  color: var(--stone-800);
  font-size: 24px;
}

.white-panel {
  padding: 36px;
  margin-top: 64px;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--soft-shadow);
}

.page-hero {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 36px auto 0;
  padding: 52px;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #fff7ed, #ffffff 55%, #fffbeb);
  box-shadow: var(--soft-shadow);
}

.compact-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.45fr);
  gap: 28px;
  align-items: center;
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 56px);
}

.page-hero p {
  max-width: 740px;
  margin: 14px 0 0;
  color: var(--stone-600);
  font-size: 18px;
}

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

.category-tile {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 22px;
  border-radius: 22px;
  background: white;
  box-shadow: var(--soft-shadow);
  border: 1px solid var(--stone-200);
  transition: 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: var(--shadow);
}

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

.category-covers img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 9px;
  background: linear-gradient(135deg, #292524, #92400e);
}

.category-tile h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.category-tile p {
  margin: 0;
  color: var(--stone-600);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 82px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-radius: 18px;
  background: white;
  border: 1px solid var(--stone-200);
  box-shadow: var(--soft-shadow);
  transition: 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.42);
}

.rank-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
  font-weight: 900;
}

.rank-row img {
  width: 82px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #292524, #92400e);
}

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-info p {
  margin: 0 0 6px;
  color: var(--stone-600);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.rank-info small {
  color: var(--stone-500);
}

.rank-row strong {
  color: var(--amber-700);
  font-size: 22px;
}

.filter-panel {
  margin-top: 28px;
  padding: 24px;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--soft-shadow);
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.filter-row label {
  display: grid;
  gap: 6px;
  color: var(--stone-600);
  font-size: 13px;
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  background: #111827;
}

.detail-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 54px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 22px;
  color: #fde68a;
  font-weight: 800;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border-radius: 22px;
  background: #050505;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.movie-player {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: contain;
  background: black;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: white;
  border: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.22));
  cursor: pointer;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
  box-shadow: 0 20px 44px rgba(217, 119, 6, 0.38);
}

.play-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid white;
}

.detail-side {
  overflow: hidden;
  border-radius: 22px;
  background: white;
  box-shadow: var(--shadow);
}

.detail-side img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #292524, #92400e);
}

.detail-score {
  padding: 18px;
  color: var(--amber-700);
  text-align: center;
  font-size: 30px;
  font-weight: 900;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.detail-main {
  padding: 34px;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--soft-shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--stone-500);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--amber-700);
  font-weight: 800;
}

.detail-main h1 {
  font-size: clamp(32px, 5vw, 54px);
}

.detail-main h2 {
  margin: 30px 0 12px;
  color: var(--stone-800);
  font-size: 24px;
}

.detail-main p {
  margin: 0;
  color: var(--stone-600);
  font-size: 17px;
}

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

.detail-meta span {
  padding: 7px 11px;
  color: var(--stone-700);
  background: var(--stone-200);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.detail-genres span,
.detail-tags span {
  color: var(--amber-700);
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.one-line {
  margin-top: 24px !important;
  padding: 18px 20px;
  border-left: 5px solid var(--amber-600);
  border-radius: 0 16px 16px 0;
  background: #fffbeb;
  color: var(--stone-700) !important;
  font-weight: 700;
}

.detail-tags {
  margin-top: 26px;
}

.mini-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.mini-card img {
  width: 56px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, #292524, #92400e);
}

.mini-card strong,
.mini-card span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-card span {
  color: var(--stone-500);
  font-size: 12px;
}

.site-footer {
  margin-top: 76px;
  color: #e7e5e4;
  background: var(--stone-900);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 26px;
  align-items: center;
}

.footer-inner strong {
  color: white;
  font-size: 20px;
}

.footer-inner p {
  margin: 5px 0 0;
  color: #d6d3d1;
}

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

.footer-links a {
  color: #fde68a;
  font-weight: 800;
}

.footer-copy {
  text-align: right;
}

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

@media (max-width: 1024px) {
  .featured-grid,
  .compact-grid,
  .library-grid,
  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero-cover {
    justify-self: start;
    max-width: 240px;
  }

  .detail-side {
    display: none;
  }

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

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

  .menu-button {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 18px;
    background: rgba(28, 25, 23, 0.98);
    box-shadow: var(--shadow);
  }

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

  .site-nav a {
    padding: 13px 14px;
  }

  .hero-slide {
    min-height: 620px;
    padding: 46px 0 78px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .quick-search,
  .compact-hero,
  .filter-row,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .quick-search,
  .page-hero,
  .highlight-section,
  .white-panel,
  .detail-main {
    padding: 24px;
  }

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

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

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

  .rank-row strong {
    grid-column: 3;
  }

  .rank-number {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

  .rank-row img {
    width: 64px;
  }

  .player-shell,
  .movie-player {
    min-height: 240px;
  }

  .footer-copy {
    text-align: left;
  }
}

@media (max-width: 420px) {
  .featured-grid,
  .compact-grid,
  .library-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }
}
