:root {
  color-scheme: dark;
  --bg: #0d0f14;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.13);
  --line: rgba(255, 255, 255, 0.14);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --gold: #f59e0b;
  --gold-2: #fbbf24;
  --red: #991b1b;
  --orange: #c2410c;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(153, 27, 27, 0.28), transparent 42rem),
    linear-gradient(180deg, #111827 0%, #0f172a 46%, #050505 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.95), rgba(127, 29, 29, 0.95), rgba(154, 52, 18, 0.95));
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.nav-wrap {
  width: min(1220px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fde68a, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #7c2d12;
  background: linear-gradient(135deg, #fde68a, #f97316);
  box-shadow: 0 12px 28px rgba(251, 146, 60, 0.35);
}

.main-nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.nav-link,
.mobile-panel a {
  padding: 9px 13px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-panel a:hover {
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.13);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.header-search input,
.large-search input,
.filter-input,
.filter-year {
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.header-search input {
  width: 150px;
  padding: 7px 10px;
}

.header-search button,
.large-search button,
.btn,
.play-trigger {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.header-search button,
.large-search button,
.btn.primary,
.play-trigger {
  color: #451a03;
  background: linear-gradient(135deg, var(--gold-2), #fb923c);
  box-shadow: 0 14px 36px rgba(245, 158, 11, 0.25);
}

.header-search button {
  padding: 8px 13px;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-panel {
  display: none;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  gap: 8px;
  flex-wrap: wrap;
}

main {
  min-height: 70vh;
}

.hero-carousel {
  position: relative;
  height: min(720px, 74vh);
  min-height: 560px;
  overflow: hidden;
  background: #111827;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.93) 0%, rgba(17, 24, 39, 0.72) 48%, rgba(17, 24, 39, 0.22) 100%),
    linear-gradient(0deg, #111827 0%, rgba(17, 24, 39, 0.0) 46%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: max(24px, calc((100vw - 1220px) / 2));
  bottom: 104px;
  width: min(720px, calc(100% - 48px));
}

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

.hero-tags span,
.tag-row span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.2);
}

.hero-content h1 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-content p,
.page-hero p,
.search-band p {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
}

.btn.ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.11);
  color: white;
  backdrop-filter: blur(12px);
}

.btn:hover,
.play-trigger:hover,
.header-search button:hover,
.large-search button:hover {
  transform: translateY(-2px);
}

.hero-cover {
  position: absolute;
  right: max(24px, calc((100vw - 1220px) / 2));
  bottom: 92px;
  z-index: 2;
  width: min(280px, 24vw);
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 38px;
  line-height: 1;
}

.hero-arrow.prev {
  left: 18px;
}

.hero-arrow.next {
  right: 18px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dot.active {
  width: 34px;
  border-radius: 999px;
  background: #fbbf24;
}

.hero-thumbs {
  position: absolute;
  z-index: 3;
  right: max(24px, calc((100vw - 1220px) / 2));
  top: 94px;
  display: grid;
  gap: 12px;
  width: 220px;
}

.hero-thumbs a {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.hero-thumbs img {
  width: 54px;
  height: 70px;
  border-radius: 12px;
  object-fit: cover;
}

.search-band,
.page-hero,
.detail-top,
.player-section,
.section-wrap,
.filter-bar {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.search-band {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 24px;
  align-items: center;
  margin-top: -42px;
  position: relative;
  z-index: 8;
  padding: 26px;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-band h2,
.section-head h2,
.page-hero h1,
.detail-info h1,
.text-panel h2,
.info-panel h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.search-band h2,
.section-head h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.large-search,
.filter-bar {
  display: flex;
  gap: 10px;
}

.large-search {
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.large-search input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
}

.large-search button {
  padding: 0 20px;
}

.section-wrap {
  padding: 56px 0 0;
}

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

.section-head a {
  color: #fde68a;
  font-weight: 800;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: #fbbf24;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 900;
}

.category-strip,
.category-large-grid,
.movie-grid {
  display: grid;
  gap: 18px;
}

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

.category-pill,
.category-card-large,
.movie-card,
.rank-panel,
.rank-item,
.text-panel,
.info-panel,
.player-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.055));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
}

.category-pill {
  min-height: 112px;
  padding: 18px;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-pill strong {
  font-size: 19px;
}

.category-pill span {
  color: #fde68a;
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.4);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.07));
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background: rgba(245, 158, 11, 0.12);
}

.poster-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: #451a03;
  background: #fbbf24;
}

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

.movie-card h2 {
  margin: 11px 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.movie-card p,
.rank-item p,
.category-card-large p,
.text-panel p,
.info-panel dd {
  color: var(--muted);
  line-height: 1.7;
}

.movie-card p {
  margin: 0 0 14px;
  font-size: 14px;
}

.movie-card.compact .movie-card-body {
  padding: 13px;
}

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

.movie-meta {
  color: var(--dim);
  font-size: 12px;
}

.movie-meta span {
  min-height: 23px;
  padding: 3px 7px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.12);
}

.tag-row span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

.rank-panel {
  position: sticky;
  top: 92px;
  border-radius: 26px;
  padding: 18px;
}

.compact-head {
  margin-bottom: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 76px 1fr;
  gap: 13px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
}

.rank-no {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #451a03;
  font-weight: 1000;
  background: linear-gradient(135deg, #fde68a, #f97316);
}

.rank-thumb {
  width: 76px;
  aspect-ratio: 2 / 3;
  border-radius: 13px;
  overflow: hidden;
  background: rgba(245, 158, 11, 0.1);
}

.rank-item h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.rank-item p {
  margin: 0 0 8px;
  font-size: 13px;
}

.page-hero {
  margin-top: 36px;
  padding: 58px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.22), transparent 24rem),
    linear-gradient(135deg, rgba(127, 29, 29, 0.62), rgba(15, 23, 42, 0.72));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1;
}

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

.category-card-large {
  padding: 22px;
  border-radius: 26px;
}

.category-card-main {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 8px;
}

.category-card-main span {
  font-size: 28px;
  font-weight: 900;
}

.category-card-main strong {
  color: #fde68a;
  font-size: 32px;
}

.mini-posters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 9px;
  margin-top: 16px;
}

.mini-posters a {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 2 / 3;
  background: rgba(245, 158, 11, 0.1);
}

.mini-posters img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-posters span {
  position: absolute;
  inset: auto 0 0;
  padding: 18px 7px 7px;
  font-size: 11px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
}

.filter-bar {
  margin-top: 26px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.filter-input,
.filter-year {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
}

.filter-input {
  flex: 1;
}

.filter-year {
  color: white;
}

.full-rank .rank-item {
  grid-template-columns: 58px 92px 1fr;
}

.detail-top {
  margin-top: 36px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--dim);
}

.breadcrumb a {
  color: #fde68a;
}

.detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 32px;
  align-items: end;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.18), transparent 22rem),
    linear-gradient(135deg, rgba(127, 29, 29, 0.35), rgba(15, 23, 42, 0.72));
  box-shadow: var(--shadow);
}

.detail-poster {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 26px;
  background: rgba(245, 158, 11, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
}

.detail-info h1 {
  margin-top: 18px;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.02;
}

.lead-text {
  max-width: 840px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.75;
}

.large-tags {
  margin-top: 20px;
}

.player-section {
  padding-top: 34px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #000;
}

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-trigger {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-width: 156px;
  min-height: 56px;
  font-size: 18px;
  z-index: 3;
}

.player-card.is-playing .play-trigger {
  opacity: 0;
  pointer-events: none;
}

.detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
}

.text-panel,
.info-panel {
  border-radius: 26px;
  padding: 24px;
}

.text-panel h2,
.info-panel h2 {
  font-size: 28px;
  margin-bottom: 12px;
}

.text-panel p {
  font-size: 17px;
}

.info-panel dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.info-panel dt {
  color: #fde68a;
  font-weight: 900;
}

.info-panel dd {
  margin: -10px 0 0;
}

.site-footer {
  margin-top: 68px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), #020617);
  border-top: 1px solid var(--line);
}

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

.site-footer p {
  max-width: 520px;
  color: var(--dim);
  line-height: 1.7;
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.site-footer a:not(.footer-logo) {
  display: block;
  margin: 8px 0;
  color: var(--muted);
}

.copyright {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 28px;
}

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

@media (max-width: 1120px) {
  .header-search {
    display: none;
  }

  .hero-thumbs,
  .hero-cover {
    display: none;
  }

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

  .rank-panel {
    position: static;
  }

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

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

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

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  body.menu-open .mobile-panel {
    display: flex;
  }

  .nav-wrap {
    width: min(100% - 22px, 1220px);
  }

  .brand {
    font-size: 20px;
  }

  .hero-carousel {
    min-height: 620px;
    height: 78vh;
  }

  .hero-content {
    left: 18px;
    bottom: 92px;
    width: calc(100% - 36px);
  }

  .search-band,
  .detail-grid,
  .footer-grid,
  .category-large-grid {
    grid-template-columns: 1fr;
  }

  .search-band,
  .page-hero,
  .detail-grid {
    padding: 24px;
    border-radius: 26px;
  }

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

  .detail-grid {
    align-items: start;
  }

  .detail-poster {
    width: min(240px, 100%);
  }

  .filter-bar,
  .large-search {
    border-radius: 22px;
    flex-direction: column;
  }

  .rank-item {
    grid-template-columns: 44px 64px 1fr;
  }
}

@media (max-width: 520px) {
  .hero-actions,
  .detail-actions,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid,
  .category-strip,
  .mini-posters {
    grid-template-columns: 1fr;
  }

  .mini-posters {
    display: flex;
    overflow-x: auto;
  }

  .mini-posters a {
    min-width: 86px;
  }

  .rank-item,
  .full-rank .rank-item {
    grid-template-columns: 38px 58px 1fr;
    gap: 10px;
  }

  .rank-item p {
    display: none;
  }

  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }
}
