:root {
  --stone-950: #0c0a09;
  --stone-900: #1c1917;
  --stone-800: #292524;
  --stone-700: #44403c;
  --stone-600: #57534e;
  --stone-500: #78716c;
  --stone-300: #d6d3d1;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --stone-50: #fafaf9;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-100: #fef3c7;
  --white: #ffffff;
  --shadow: 0 18px 48px rgba(28, 25, 23, 0.14);
  --shadow-soft: 0 10px 30px rgba(28, 25, 23, 0.10);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--stone-800);
  background: linear-gradient(180deg, #fffaf0 0%, var(--stone-50) 360px, var(--stone-100) 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(214, 211, 209, 0.7);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber-600), var(--stone-800));
  box-shadow: 0 10px 26px rgba(217, 119, 6, 0.25);
}

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

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-text em {
  margin-top: 4px;
  color: var(--stone-600);
  font-size: 12px;
  font-style: normal;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}

.main-nav a {
  color: var(--stone-700);
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--amber-600);
}

.top-search {
  width: 310px;
  display: flex;
  align-items: center;
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  background: white;
  padding: 4px;
  box-shadow: 0 8px 20px rgba(28, 25, 23, 0.04);
}

.top-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 9px 12px;
  background: transparent;
}

.top-search button,
.quick-search button,
.search-controls button,
.filter-panel button {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  color: white;
  background: var(--amber-600);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.top-search button:hover,
.quick-search button:hover,
.search-controls button:hover,
.filter-panel button:hover {
  transform: translateY(-1px);
  background: var(--amber-700);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--amber-100);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--stone-800);
}

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

.hero-track,
.hero-slide {
  min-height: 520px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  transition: opacity 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  position: relative;
}

.hero-content {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 120px 0 76px;
  max-width: 760px;
}

.hero-tags,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  color: white;
  background: rgba(41, 37, 36, 0.82);
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span:first-child {
  background: var(--amber-500);
}

.hero h1 {
  margin: 18px 0 14px;
  color: white;
  font-size: clamp(34px, 7vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.22);
}

.hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.75;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 13px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: white;
  background: var(--amber-600);
  box-shadow: 0 14px 30px rgba(217, 119, 6, 0.27);
}

.btn-primary:hover {
  background: var(--amber-700);
}

.btn-ghost {
  color: white;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px);
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 30px;
  background: var(--amber-500);
}

.quick-search-section {
  width: min(960px, calc(100% - 32px));
  margin: -31px auto 0;
  position: relative;
  z-index: 2;
}

.quick-search {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow);
}

.quick-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--stone-200);
  border-radius: 14px;
  padding: 14px 16px;
  outline: 0;
}

.section-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 52px auto;
}

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

.section-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--amber-700);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head h2,
.info-panel h2,
.text-panel h2,
.side-card h2 {
  margin: 0;
  color: var(--stone-900);
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 8px 0 0;
  max-width: 680px;
  color: var(--stone-600);
}

.section-more {
  min-width: max-content;
  color: var(--amber-700);
  font-weight: 900;
}

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

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

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--stone-900);
}

.poster-link img,
.category-card img,
.ranking-poster img,
.detail-poster,
.overview-posters img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.72));
}

.poster-year,
.poster-type {
  position: absolute;
  top: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.poster-year {
  left: 10px;
  background: var(--amber-600);
}

.poster-type {
  right: 10px;
  background: rgba(28, 25, 23, 0.75);
}

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.ranking-info h2 a:hover,
.overview-body h2 a:hover {
  color: var(--amber-700);
}

.card-meta {
  margin: 0 0 8px;
  color: var(--stone-500);
  font-size: 13px;
  line-height: 1.45;
}

.card-desc {
  min-height: 42px;
  margin: 0 0 10px;
  color: var(--stone-600);
  font-size: 13px;
  line-height: 1.6;
}

.tag-row span {
  min-height: 24px;
  color: var(--amber-800, #92400e);
  background: var(--amber-100);
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  color: white;
}

.category-card img,
.category-overlay {
  position: absolute;
  inset: 0;
}

.category-card img {
  transition: transform 0.35s ease;
}

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

.category-overlay {
  background: linear-gradient(180deg, rgba(28, 25, 23, 0.12), rgba(28, 25, 23, 0.82));
}

.category-card strong,
.category-card em {
  position: relative;
  z-index: 1;
}

.category-card strong {
  font-size: 22px;
}

.category-card em {
  margin-top: 4px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.76);
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: white;
  box-shadow: var(--shadow-soft);
}

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

.rank-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.rank-score {
  color: var(--stone-500);
  font-weight: 900;
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 310px;
  display: flex;
  align-items: center;
  background: radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.28), transparent 32%), linear-gradient(135deg, var(--stone-950), var(--stone-800));
  color: white;
}

.page-hero > div {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 58px);
  letter-spacing: -0.05em;
}

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

.compact-hero {
  min-height: 260px;
}

.filter-panel,
.search-controls {
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid rgba(214, 211, 209, 0.7);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
}

.filter-line,
.search-controls {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.search-controls {
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
}

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

.filter-panel input,
.filter-panel select,
.search-controls input,
.search-controls select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--stone-200);
  border-radius: 12px;
  padding: 0 12px;
  outline: 0;
  background: white;
}

.filter-count {
  margin: 12px 0 0;
  color: var(--stone-600);
  font-weight: 800;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  padding: 18px;
  border-radius: var(--radius-xl);
  background: white;
  box-shadow: var(--shadow-soft);
}

.overview-posters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 6px;
  overflow: hidden;
  min-height: 240px;
  border-radius: 18px;
}

.overview-body h2 {
  margin: 0 0 8px;
}

.overview-body p {
  color: var(--stone-600);
  line-height: 1.7;
}

.overview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.overview-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--stone-100);
  color: var(--stone-600);
  font-size: 13px;
  font-weight: 800;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 86px 64px 1fr 120px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: white;
  box-shadow: var(--shadow-soft);
}

.ranking-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 13px;
  background: var(--stone-900);
}

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

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

.ranking-info p {
  margin: 0 0 8px;
  color: var(--stone-600);
  line-height: 1.6;
}

.ranking-score {
  text-align: right;
}

.ranking-score strong {
  display: block;
  color: var(--amber-700);
  font-size: 30px;
}

.ranking-score span,
.ranking-score em {
  display: block;
  color: var(--stone-500);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  color: white;
  background: var(--stone-950);
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

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

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

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

.detail-main {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.detail-copy h1 {
  margin: 18px 0 14px;
  max-width: 820px;
  font-size: clamp(36px, 7vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 860px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
  line-height: 1.75;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.detail-content,
.detail-side {
  display: grid;
  gap: 24px;
}

.player-section,
.info-panel,
.text-panel,
.side-card,
.standalone-panel {
  padding: 24px;
  border-radius: var(--radius-xl);
  background: white;
  box-shadow: var(--shadow-soft);
}

.compact-head {
  align-items: center;
  margin-bottom: 18px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: black;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.hls-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-big-button {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(245, 158, 11, 0.92);
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 20px 46px rgba(245, 158, 11, 0.35);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-shell.is-playing .player-big-button {
  opacity: 0;
  pointer-events: none;
}

.player-status {
  position: absolute;
  left: 14px;
  bottom: 12px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(0, 0, 0, 0.55);
  font-size: 12px;
}

.movie-info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.movie-info-list div {
  padding: 14px;
  border-radius: 14px;
  background: var(--stone-50);
}

.movie-info-list dt {
  color: var(--stone-500);
  font-size: 12px;
  font-weight: 900;
}

.movie-info-list dd {
  margin: 6px 0 0;
  color: var(--stone-900);
  font-weight: 900;
}

.text-panel p,
.standalone-panel p {
  color: var(--stone-700);
  font-size: 17px;
  line-height: 1.95;
}

.side-card {
  display: grid;
  gap: 10px;
}

.side-card strong {
  color: var(--amber-700);
  font-size: 52px;
  line-height: 1;
}

.side-card a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--stone-50);
  color: var(--stone-700);
  font-weight: 800;
}

.side-card a:hover {
  color: white;
  background: var(--amber-600);
}

.search-page-box {
  min-height: 520px;
}

.site-footer {
  margin-top: 72px;
  color: var(--stone-300);
  background: var(--stone-900);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-brand {
  color: white;
  font-size: 22px;
  font-weight: 900;
}

.footer-inner p {
  max-width: 680px;
  color: var(--stone-300);
  line-height: 1.75;
}

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

.footer-links a {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

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

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

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

  .top-search {
    display: none;
  }
}

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

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    padding: 18px;
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: start;
  }

  body.nav-open .main-nav {
    display: flex;
  }

  .hero,
  .hero-track,
  .hero-slide {
    min-height: 460px;
  }

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

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

  .category-overview-card,
  .detail-main {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: 220px;
  }

  .ranking-card {
    grid-template-columns: 72px 1fr;
  }

  .ranking-index,
  .ranking-score {
    grid-column: span 1;
    text-align: left;
  }

  .filter-line,
  .search-controls {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .brand-text em {
    display: none;
  }

  .hero-content {
    padding-bottom: 58px;
  }

  .quick-search,
  .section-head,
  .footer-inner {
    flex-direction: column;
    align-items: stretch;
  }

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

  .category-grid,
  .rank-strip {
    grid-template-columns: 1fr;
  }

  .filter-line,
  .search-controls,
  .movie-info-list {
    grid-template-columns: 1fr;
  }

  .player-big-button {
    width: 64px;
    height: 64px;
  }
}
