* {
  box-sizing: border-box;
}

:root {
  --amber-950: #451a03;
  --amber-900: #78350f;
  --amber-800: #92400e;
  --amber-700: #b45309;
  --amber-600: #d97706;
  --yellow-500: #eab308;
  --yellow-300: #fde047;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --paper: #fffaf0;
  --text: #1f2937;
  --muted: #6b7280;
  --ring: rgba(251, 191, 36, 0.32);
  --shadow: 0 24px 60px rgba(69, 26, 3, 0.18);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--slate-50), #fff7ed 45%, #f8fafc);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--amber-950), var(--amber-800), var(--amber-950));
  color: #fffbeb;
  box-shadow: 0 12px 30px rgba(69, 26, 3, 0.3);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, #fef3c7, #fde047);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--amber-950);
  background: radial-gradient(circle at 30% 30%, #fff7ad, var(--yellow-300));
  box-shadow: 0 0 28px rgba(253, 224, 71, 0.65);
  font-size: 14px;
}

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

.site-nav a {
  color: #fffbeb;
  font-weight: 700;
  opacity: 0.88;
  transition: color 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--yellow-300);
  opacity: 1;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #fffbeb;
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  background: var(--slate-950);
  color: #fff7ed;
}

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

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

.hero-bg,
.detail-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.34), transparent 32%), linear-gradient(135deg, #1e293b, #78350f 52%, #020617);
}

.hero-bg img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: saturate(1.12) contrast(1.04);
}

.visual-soft img {
  display: none;
}

.visual-soft {
  background: radial-gradient(circle at 30% 25%, rgba(253, 224, 71, 0.36), transparent 30%), linear-gradient(135deg, #111827, #92400e 55%, #020617);
}

.hero-overlay,
.detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(69, 26, 3, 0.72), rgba(2, 6, 23, 0.28));
}

.hero-layout {
  position: relative;
  z-index: 2;
  min-height: 640px;
  padding: 84px 0 148px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 64px;
}

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

.eyebrow {
  margin: 0 0 14px;
  color: var(--yellow-300);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--amber-700);
}

.hero-summary,
.detail-one-line {
  margin: 24px 0 0;
  max-width: 680px;
  color: #fde68a;
  font-size: 20px;
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  color: #fef3c7;
  border: 1px solid rgba(253, 224, 71, 0.32);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
}

.tag-row {
  margin-top: 14px;
}

.tag-row span {
  color: var(--amber-800);
  background: #fffbeb;
  border-color: #fde68a;
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  padding: 0 22px;
  font-weight: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
  color: var(--amber-950);
  background: linear-gradient(135deg, var(--yellow-300), var(--yellow-500));
  box-shadow: 0 14px 36px rgba(234, 179, 8, 0.34);
}

.secondary-button {
  color: #fffbeb;
  border: 1px solid rgba(253, 224, 71, 0.42);
  background: rgba(255, 255, 255, 0.1);
}

.secondary-button.light {
  color: var(--amber-950);
  background: #fffbeb;
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(69, 26, 3, 0.22);
}

.hero-poster,
.detail-poster {
  position: relative;
  min-height: 500px;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-900), var(--slate-900));
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(253, 224, 71, 0.25);
}

.hero-poster img,
.detail-poster img,
.poster-shell img,
.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster span {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 60px;
  height: 60px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--yellow-300);
  color: var(--amber-950);
  box-shadow: 0 0 36px rgba(253, 224, 71, 0.65);
}

.hero-tools {
  position: relative;
  z-index: 3;
  margin-top: -120px;
  padding-bottom: 38px;
}

.hero-dots {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dot.is-active {
  background: var(--yellow-300);
}

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

.hero-thumb {
  position: relative;
  height: 96px;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--amber-900), var(--slate-900));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
}

.hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.hero-thumb span {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  color: #fff7ed;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.search-panel {
  position: relative;
  z-index: 4;
  margin-top: -12px;
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 24px;
  align-items: center;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel h1,
.section-title h2,
.ranking-copy h2,
.content-card h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}

.search-panel p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.home-search,
.inline-filter {
  display: flex;
  gap: 10px;
}

.home-search input,
.inline-filter input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  background: #fff7ed;
  padding: 0 16px;
  color: var(--text);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.home-search input:focus,
.inline-filter input:focus {
  border-color: var(--amber-600);
  box-shadow: 0 0 0 4px var(--ring);
}

.home-search button {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  color: var(--amber-950);
  background: var(--yellow-300);
  padding: 0 20px;
  font-weight: 900;
}

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

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

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

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

.category-pill,
.category-card {
  min-height: 138px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #fff7ed);
  padding: 22px;
  box-shadow: 0 16px 38px rgba(69, 26, 3, 0.09);
  border: 1px solid #fed7aa;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-pill:hover,
.category-card:hover,
.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 54px rgba(69, 26, 3, 0.16);
}

.category-pill strong,
.category-card-title {
  display: block;
  color: var(--amber-900);
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 10px;
}

.category-pill span,
.category-card p {
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(69, 26, 3, 0.1);
  border: 1px solid #ffedd5;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-shell {
  position: relative;
  height: 310px;
  overflow: hidden;
  display: block;
  background: linear-gradient(135deg, var(--amber-900), var(--slate-900));
}

.compact-card .poster-shell {
  height: 210px;
}

.poster-shell img {
  transition: transform 0.35s ease, opacity 0.25s ease;
}

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

.card-year,
.card-play {
  position: absolute;
  z-index: 2;
}

.card-year {
  top: 12px;
  left: 12px;
  border-radius: 999px;
  background: rgba(69, 26, 3, 0.82);
  color: #fef3c7;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.card-play {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--amber-950);
  background: var(--yellow-300);
  box-shadow: 0 0 26px rgba(253, 224, 71, 0.62);
}

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

.meta-line {
  display: flex;
  gap: 8px;
  color: var(--amber-700);
  font-size: 13px;
  font-weight: 900;
}

.movie-card h2 {
  margin: 8px 0 10px;
  color: #111827;
  font-size: 20px;
  line-height: 1.3;
}

.compact-card h2 {
  font-size: 17px;
}

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

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

.ranking-band {
  margin-top: 76px;
  padding: 70px 0;
  color: #fffbeb;
  background: radial-gradient(circle at 15% 20%, rgba(253, 224, 71, 0.24), transparent 28%), linear-gradient(135deg, var(--slate-900), var(--amber-950) 60%, var(--slate-950));
}

.ranking-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 46px;
  align-items: start;
}

.ranking-copy p {
  color: #fde68a;
  line-height: 1.8;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 62px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(253, 224, 71, 0.24);
  transition: transform 0.25s ease, background 0.25s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.17);
}

.rank-number {
  color: var(--yellow-300);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-cover {
  width: 62px;
  height: 82px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber-900), var(--slate-900));
}

.rank-content {
  min-width: 0;
}

.rank-content strong,
.rank-content em {
  display: block;
}

.rank-content strong {
  color: #fff7ed;
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-content em {
  margin-top: 4px;
  color: #fde68a;
  font-style: normal;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.full-rank-list .rank-item {
  background: #ffffff;
  border-color: #fed7aa;
}

.full-rank-list .rank-content strong {
  color: #111827;
}

.full-rank-list .rank-content em {
  color: var(--amber-700);
}

.page-hero {
  padding: 90px 0;
  color: #fff7ed;
  background: radial-gradient(circle at 15% 20%, rgba(253, 224, 71, 0.22), transparent 30%), linear-gradient(135deg, var(--amber-950), var(--amber-800), var(--slate-900));
}

.page-hero p {
  max-width: 760px;
  color: #fde68a;
  line-height: 1.8;
  font-size: 18px;
}

.inline-filter {
  max-width: 560px;
  margin-top: 26px;
}

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

.mini-links {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.mini-links a {
  color: var(--amber-700);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  color: #fff7ed;
  overflow: hidden;
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 48px;
  align-items: end;
  padding: 76px 0 64px;
  min-height: 620px;
}

.detail-poster {
  min-height: 500px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: #fed7aa;
  font-weight: 800;
}

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

.detail-main {
  margin-top: -36px;
  position: relative;
  z-index: 3;
}

.watch-section,
.content-card {
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
  border: 1px solid #ffedd5;
  overflow: hidden;
}

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

.watch-player {
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--amber-950);
  background: radial-gradient(circle at center, rgba(253, 224, 71, 0.22), rgba(2, 6, 23, 0.46));
}

.player-cover span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--yellow-300);
  box-shadow: 0 0 46px rgba(253, 224, 71, 0.58);
  font-size: 24px;
}

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

.content-card {
  margin-top: 24px;
  padding: 34px;
}

.content-card h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 28px;
}

.content-card p {
  color: #374151;
  line-height: 1.9;
  font-size: 17px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.info-grid div {
  border-radius: 18px;
  background: #fff7ed;
  padding: 18px;
  border: 1px solid #fed7aa;
}

.info-grid strong,
.info-grid span {
  display: block;
}

.info-grid strong {
  color: var(--amber-800);
  margin-bottom: 8px;
}

.info-grid span {
  color: #111827;
  font-weight: 800;
}

.related-block {
  padding-bottom: 70px;
}

.site-footer {
  margin-top: 80px;
  color: #fde68a;
  background: linear-gradient(180deg, var(--slate-900), var(--amber-950));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
  padding: 54px 0;
}

.footer-brand {
  margin-bottom: 16px;
}

.site-footer p {
  max-width: 420px;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #fff7ed;
  font-size: 18px;
}

.site-footer a:not(.brand) {
  display: block;
  margin: 10px 0;
  color: #fde68a;
}

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

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(253, 224, 71, 0.18);
  text-align: center;
  color: #fed7aa;
}

.searchable-card.is-hidden {
  display: none;
}

@media (max-width: 1024px) {
  .hero-layout,
  .detail-layout,
  .ranking-layout,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .detail-poster {
    max-width: 360px;
    min-height: 480px;
  }

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

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

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

@media (max-width: 760px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-radius: 18px;
    padding: 10px;
    background: var(--amber-950);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
  }

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

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

  .hero-carousel {
    min-height: 760px;
  }

  .hero-layout {
    padding-top: 54px;
    gap: 28px;
  }

  .hero-poster,
  .detail-poster {
    min-height: 360px;
  }

  .hero-thumbs {
    display: none;
  }

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

  .poster-shell,
  .compact-card .poster-shell {
    height: 230px;
  }

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

  .home-search {
    flex-direction: column;
  }

  .footer-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 20px;
  }

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

  .poster-shell,
  .compact-card .poster-shell {
    height: 320px;
  }

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