:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-300: #fcd34d;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --orange-600: #ea580c;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --text: #1f2937;
  --muted: #64748b;
  --line: rgba(180, 83, 9, 0.18);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 12px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--slate-50) 0%, var(--amber-50) 48%, var(--slate-100) 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  color: var(--amber-700);
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.28);
  font-size: 15px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #475569;
  font-size: 15px;
  font-weight: 650;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: var(--amber-700);
}

.header-actions {
  display: flex;
  gap: 10px;
}

.round-button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--amber-100);
  color: var(--amber-700);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.round-button:hover {
  transform: translateY(-1px);
  background: #fde68a;
}

.mobile-toggle {
  display: none;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  gap: 12px;
  flex-direction: column;
  color: #475569;
  font-weight: 650;
}

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

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--slate-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

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

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.58) 46%, rgba(15, 23, 42, 0.06));
}

.hero-content {
  position: absolute;
  left: max(16px, calc((100vw - 1180px) / 2));
  top: 50%;
  transform: translateY(-50%);
  width: min(650px, calc(100% - 32px));
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(252, 211, 77, 0.32);
  color: #fde68a;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.eyebrow.dark {
  color: var(--amber-700);
  background: var(--amber-100);
  border-color: rgba(217, 119, 6, 0.12);
}

.hero-content h1 {
  margin: 24px 0 14px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.8;
  max-width: 620px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 34px;
}

.hero-meta span {
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  min-height: 46px;
  padding: 0 24px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  box-shadow: 0 14px 32px rgba(217, 119, 6, 0.35);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px) scale(1.02);
}

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

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

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

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

.quick-search {
  margin-top: -42px;
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.quick-search h2,
.quick-search p {
  margin: 0;
}

.quick-search h2 {
  font-size: 28px;
  color: var(--slate-900);
}

.quick-search p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.section-title h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--slate-900);
  letter-spacing: -0.04em;
}

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

.small-title {
  align-items: center;
  margin-bottom: 16px;
}

.small-title span {
  font-size: 20px;
  font-weight: 850;
  color: var(--slate-900);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.14);
}

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.76));
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.8);
  border-radius: 999px;
  color: #fff;
  background: var(--amber-600);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-weight: 850;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
}

.card-body {
  padding: 18px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.meta-line span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--slate-100);
}

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 19px;
  line-height: 1.35;
  color: var(--slate-900);
}

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

.movie-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row,
.detail-tags,
.genre-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span,
.detail-tags span,
.genre-row span {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--amber-700);
  background: var(--amber-100);
  font-size: 12px;
  font-weight: 750;
}

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

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

.category-tile-grid a,
.overview-tile {
  border-radius: var(--radius-lg);
  padding: 22px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile-grid a:hover,
.overview-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.55);
}

.category-tile-grid strong,
.overview-tile strong {
  display: block;
  margin-bottom: 8px;
  color: var(--slate-900);
  font-size: 20px;
}

.category-tile-grid span,
.overview-tile span {
  color: var(--muted);
  line-height: 1.65;
}

.ranking-panel,
.ranking-list-block,
.info-card,
.detail-content,
.player-card {
  border-radius: var(--radius-xl);
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: var(--shadow-card);
}

.ranking-panel {
  padding: 22px;
  position: sticky;
  top: 96px;
}

.ranking-item {
  display: grid;
  grid-template-columns: 36px 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #f1f5f9;
}

.ranking-item:first-of-type {
  border-top: 0;
}

.ranking-item strong {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: var(--slate-800);
  font-size: 13px;
}

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

.ranking-item b,
.ranking-item em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-item b {
  color: var(--slate-900);
  font-size: 14px;
}

.ranking-item em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
}

.compact-card .card-poster {
  height: 100%;
  min-height: 150px;
  aspect-ratio: auto;
}

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

.inner-hero,
.category-hero {
  padding: 58px 0 8px;
}

.inner-hero h1,
.category-hero h1 {
  margin: 14px 0 10px;
  color: var(--slate-900);
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.inner-hero p,
.category-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.category-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: center;
}

.category-cover {
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  background: var(--slate-900);
  aspect-ratio: 16 / 10;
}

.category-cover img,
.tile-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select,
.search-panel input {
  width: 100%;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 999px;
  padding: 14px 18px;
  background: #fff;
  color: var(--text);
  outline: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.overview-tile {
  overflow: hidden;
}

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

.tile-covers img {
  aspect-ratio: 1;
  border-radius: 12px;
  background: var(--slate-900);
}

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

.ranking-list-block {
  padding: 18px 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 36px;
}

.detail-shell {
  padding-top: 36px;
}

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

.player-card {
  overflow: hidden;
  margin-bottom: 24px;
}

.video-wrap {
  position: relative;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  z-index: 2;
  background: #020617;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  filter: saturate(1.05);
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
}

.big-play {
  position: relative;
  z-index: 3;
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  font-size: 28px;
  transition: transform 0.2s ease;
}

.big-play:hover {
  transform: scale(1.06);
}

.detail-content {
  padding: 30px;
}

.detail-content h1 {
  margin: 0 0 14px;
  color: var(--slate-900);
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.16;
}

.detail-content h2 {
  margin: 30px 0 12px;
  color: var(--slate-900);
  font-size: 24px;
}

.detail-content p {
  color: #475569;
  line-height: 1.9;
  font-size: 16px;
}

.lead-text {
  font-size: 18px;
  color: var(--slate-700);
}

.detail-aside {
  position: sticky;
  top: 96px;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  background: var(--slate-900);
}

.info-card {
  margin-top: 18px;
  padding: 24px;
}

.info-card h2 {
  margin: 0 0 16px;
  color: var(--slate-900);
}

.info-card dl {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

.info-card dt {
  color: var(--muted);
  font-weight: 700;
}

.info-card dd {
  margin: 0;
  color: var(--slate-800);
}

.search-modal[hidden] {
  display: none;
}

.search-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: start center;
  padding-top: 90px;
}

.search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(8px);
}

.search-panel {
  position: relative;
  width: min(760px, calc(100% - 28px));
  max-height: min(760px, calc(100vh - 120px));
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.32);
  padding: 24px;
}

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

.search-head h2 {
  margin: 0;
  color: var(--slate-900);
}

.search-head button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: var(--slate-100);
  cursor: pointer;
  font-size: 22px;
}

.search-results {
  max-height: 560px;
  overflow: auto;
  margin-top: 16px;
}

.search-result {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #f1f5f9;
}

.search-result img {
  width: 86px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--slate-900);
}

.search-result h3 {
  margin: 0 0 4px;
  color: var(--slate-900);
  font-size: 16px;
}

.search-result p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.site-footer {
  margin-top: 72px;
  padding: 48px 0 28px;
  color: #cbd5e1;
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
}

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

.footer-logo {
  color: #fff;
}

.footer-brand p {
  max-width: 480px;
  line-height: 1.8;
  color: #94a3b8;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: #fff;
}

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

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  text-align: center;
  color: #94a3b8;
}

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

@media (max-width: 1080px) {
  .desktop-nav {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

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

  .ranking-panel,
  .detail-aside {
    position: static;
  }
}

@media (max-width: 780px) {
  .hero-carousel {
    height: 560px;
  }

  .hero-mask {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.86));
  }

  .hero-content {
    top: auto;
    bottom: 76px;
    transform: none;
  }

  .quick-search,
  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .movie-grid,
  .featured-grid,
  .ranking-grid,
  .category-tile-grid,
  .overview-grid,
  .compact-grid,
  .wide-list,
  .ranking-list-block,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .compact-card {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .compact-card .card-poster {
    min-height: 132px;
  }

  .detail-content {
    padding: 22px;
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .header-inner {
    min-height: 64px;
  }

  .hero-carousel {
    height: 520px;
  }

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

  .hero-content p {
    font-size: 16px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-card {
    display: block;
  }

  .compact-card .card-poster {
    aspect-ratio: 16 / 10;
  }

  .ranking-item {
    grid-template-columns: 34px 64px minmax(0, 1fr);
  }
}
