:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --orange-700: #c2410c;
  --teal-600: #0d9488;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(41, 37, 36, 0.12);
  --shadow-soft: 0 10px 28px rgba(41, 37, 36, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--stone-800);
  background: var(--stone-50);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  color: var(--white);
  background: linear-gradient(90deg, var(--amber-800), var(--orange-700), var(--amber-700));
  box-shadow: 0 10px 30px rgba(41, 37, 36, 0.22);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--amber-800);
  background: var(--amber-100);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 21px;
  letter-spacing: 0.08em;
}

.brand-text small {
  color: var(--amber-100);
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 650;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.94);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: var(--amber-100);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--stone-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(28, 25, 23, 0.92), rgba(28, 25, 23, 0.45), rgba(28, 25, 23, 0.12)),
    linear-gradient(0deg, rgba(28, 25, 23, 0.92), rgba(28, 25, 23, 0.1) 55%, rgba(28, 25, 23, 0.5));
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--amber-100);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.hero-copy strong {
  display: block;
  margin-bottom: 10px;
  color: var(--amber-100);
  font-size: clamp(22px, 3vw, 34px);
}

.hero-copy p {
  max-width: 640px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2vw, 20px);
}

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

.btn,
.home-search-form button,
.filter-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  padding: 0 22px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary,
.home-search-form button {
  color: var(--white);
  background: var(--amber-600);
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.28);
}

.btn.primary:hover,
.home-search-form button:hover {
  background: var(--amber-700);
  transform: translateY(-2px);
}

.btn.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: 0;
  border-radius: 999px;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

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

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

.panel-section {
  padding: 58px 0;
}

.warm-bg {
  background: linear-gradient(180deg, var(--amber-50), var(--white));
}

.search-band {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  align-items: center;
  gap: 24px;
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.search-band h2,
.section-heading h2,
.ranking-head h2,
.category-preview h3,
.page-hero h1,
.detail-info-card h1,
.content-panel h2,
.ranking-card h2 {
  margin: 0;
  color: var(--stone-800);
  line-height: 1.25;
}

.search-band p,
.section-heading p,
.category-preview p,
.page-hero p,
.movie-card p,
.movie-row p,
.detail-info-card p,
.content-panel p,
.ranking-card p {
  color: var(--stone-600);
}

.home-search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

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

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

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.section-heading span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--white);
  background: var(--amber-600);
  border-radius: 14px;
  font-weight: 900;
}

.section-heading p {
  margin: 4px 0 0;
}

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

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

.movie-card,
.movie-row,
.ranking-card,
.category-tile,
.content-panel,
.detail-info-card,
.ranking-panel,
.category-preview {
  background: var(--white);
  border: 1px solid rgba(231, 229, 228, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card figure {
  position: relative;
  aspect-ratio: 2 / 3;
  margin: 0;
  overflow: hidden;
  background: var(--stone-200);
}

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

.movie-card:hover img,
.category-tile:hover img {
  transform: scale(1.06);
}

.movie-card figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  color: var(--white);
  background: rgba(28, 25, 23, 0.66);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.movie-card-body {
  padding: 14px;
}

.movie-card h3 {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--stone-800);
  font-size: 16px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

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

.movie-card p {
  display: -webkit-box;
  min-height: 42px;
  margin: 0 0 12px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--stone-500);
  font-size: 12px;
}

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

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 18px;
}

.ranking-head,
.category-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.ranking-head a,
.category-preview-head a {
  color: var(--amber-700);
  font-weight: 800;
}

.ranking-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-list a {
  display: grid;
  grid-template-columns: 44px 54px 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.ranking-list a:hover {
  background: var(--amber-50);
}

.rank-num {
  color: var(--amber-700);
  font-weight: 900;
}

.ranking-list img {
  width: 54px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
}

.ranking-list strong {
  display: block;
  overflow: hidden;
  color: var(--stone-800);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-list p {
  margin: 2px 0 0;
  color: var(--stone-500);
  font-size: 12px;
}

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

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

.category-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  overflow: hidden;
  color: var(--white);
  isolation: isolate;
}

.category-tile::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(28, 25, 23, 0.88), rgba(28, 25, 23, 0.18));
  content: "";
}

.category-tile img {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.category-tile span {
  margin: auto 18px 6px;
  font-size: 24px;
  font-weight: 900;
}

.category-tile small {
  margin: 0 18px 18px;
  color: rgba(255, 255, 255, 0.82);
}

.category-preview {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 34px;
  padding: 24px;
}

.movie-row-list {
  display: grid;
  gap: 16px;
}

.movie-row {
  overflow: hidden;
}

.movie-row a {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.movie-row img {
  width: 150px;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  object-fit: cover;
}

.movie-row strong {
  display: block;
  margin-bottom: 6px;
  color: var(--stone-800);
  font-size: 20px;
}

.movie-row p {
  margin: 0 0 8px;
}

.movie-row span {
  color: var(--stone-500);
  font-size: 14px;
}

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.28), transparent 36%),
    linear-gradient(100deg, var(--stone-900), var(--amber-800), var(--orange-700));
}

.page-hero.slim {
  padding: 72px 0;
}

.page-hero h1 {
  max-width: 860px;
  color: var(--white);
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

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

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 14px;
  margin-bottom: 28px;
}

.filter-bar.full {
  grid-template-columns: 1fr 200px 180px;
}

.empty-state {
  padding: 40px;
  text-align: center;
  color: var(--stone-600);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

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

.ranking-card {
  overflow: hidden;
}

.ranking-card a {
  display: grid;
  grid-template-columns: 82px 92px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
}

.ranking-index {
  color: var(--amber-700);
  font-size: 24px;
  font-weight: 900;
}

.ranking-card img {
  width: 92px;
  height: 124px;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-card p {
  margin: 8px 0;
}

.ranking-card small {
  color: var(--stone-500);
}

.movie-detail-top {
  padding: 28px 0 40px;
  color: var(--white);
  background:
    linear-gradient(180deg, var(--stone-900), #2f2117 70%, var(--stone-50) 70%);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.7fr);
  gap: 26px;
  align-items: stretch;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  background: rgba(28, 25, 23, 0.42);
  border: 0;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-cover img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.58);
}

.play-cover .play-circle {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin-bottom: 92px;
  padding-left: 6px;
  color: var(--amber-700);
  background: var(--white);
  border-radius: 999px;
  font-size: 36px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.play-cover strong {
  position: absolute;
  z-index: 1;
  bottom: calc(50% - 72px);
  font-size: 22px;
}

.player-shell.is-ready .play-cover,
.player-shell.is-playing .play-cover {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.detail-info-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  padding: 18px;
  color: var(--stone-800);
}

.detail-info-card > img {
  width: 150px;
  height: 220px;
  border-radius: 16px;
  object-fit: cover;
}

.detail-info-card h1 {
  font-size: clamp(26px, 3vw, 38px);
}

.detail-info-card p {
  margin: 12px 0 18px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.detail-meta div {
  padding: 10px 12px;
  background: var(--stone-100);
  border-radius: 12px;
}

.detail-meta dt {
  color: var(--stone-500);
  font-size: 12px;
}

.detail-meta dd {
  margin: 0;
  color: var(--stone-800);
  font-weight: 800;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span {
  color: var(--amber-800);
  background: var(--amber-100);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
}

.detail-content {
  display: grid;
  gap: 22px;
}

.content-panel {
  padding: 26px;
}

.content-panel p {
  margin: 12px 0 0;
  font-size: 17px;
}

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

.site-footer {
  color: var(--stone-200);
  background: linear-gradient(90deg, var(--stone-900), var(--stone-700), var(--stone-900));
}

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

.footer-brand {
  color: var(--white);
  font-size: 24px;
}

.site-footer p {
  max-width: 560px;
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.7);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px 18px;
}

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

.footer-copy {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

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

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

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

  .ranking-panel {
    position: static;
  }
}

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

  .brand-text small {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    background: rgba(146, 64, 14, 0.98);
    border-radius: 16px;
    box-shadow: var(--shadow);
  }

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

  .nav-links a {
    padding: 12px 14px;
    border-radius: 12px;
  }

  .nav-links a:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: none;
  }

  .hero-slider {
    height: 62vh;
    min-height: 440px;
  }

  .hero-copy {
    left: 20px;
    bottom: 66px;
    width: calc(100% - 40px);
  }

  .hero-control {
    display: none;
  }

  .search-band,
  .home-search-form,
  .filter-bar,
  .filter-bar.full,
  .footer-inner,
  .detail-info-card,
  .movie-row a,
  .ranking-card a {
    grid-template-columns: 1fr;
  }

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

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

  .movie-row img,
  .ranking-card img {
    width: 100%;
  }

  .movie-row img {
    aspect-ratio: 16 / 9;
  }

  .ranking-card img {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .detail-info-card > img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
  }

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

  .page-hero.slim {
    padding: 48px 0;
  }
}

@media (max-width: 460px) {
  .container,
  .header-inner,
  .footer-inner,
  .category-preview {
    width: min(100% - 24px, 1180px);
  }

  .movie-grid,
  .movie-grid.compact {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 32px;
  }
}
