:root {
  --bg: #f8fafc;
  --paper: #ffffff;
  --ink: #1f2937;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.26);
  --amber: #d97706;
  --orange: #f97316;
  --blue: #2563eb;
  --green: #16a34a;
  --purple: #7c3aed;
  --shadow: 0 22px 54px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --radius: 24px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0));
}

body.is-scrolled .site-header,
.site-header:hover,
.site-header:focus-within {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
  white-space: nowrap;
}

body.is-scrolled .brand,
.site-header:hover .brand,
.site-header:focus-within .brand {
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.32);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.nav-link {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

body.is-scrolled .nav-link,
.site-header:hover .nav-link,
.site-header:focus-within .nav-link {
  color: #475569;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--amber) !important;
  transform: translateY(-1px);
}

.header-search,
.mobile-search,
.page-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search {
  width: 190px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  color: #fff;
}

body.is-scrolled .header-search,
.site-header:hover .header-search,
.site-header:focus-within .header-search {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: var(--ink);
}

.header-search input,
.mobile-search input,
.page-filter input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
}

.header-search input::placeholder {
  color: currentColor;
  opacity: 0.68;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

body.is-scrolled .menu-toggle,
.site-header:hover .menu-toggle,
.site-header:focus-within .menu-toggle {
  color: var(--ink);
  background: #f1f5f9;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--soft-shadow);
}

.mobile-panel.is-open {
  display: grid;
  gap: 10px;
}

.mobile-search {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  color: #334155;
  font-weight: 700;
}

.mobile-link:hover,
.mobile-link.is-active {
  color: var(--amber);
  background: #fff7ed;
}

.hero-carousel {
  position: relative;
  min-height: 700px;
  overflow: hidden;
  background: #0f172a;
}

.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-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.06);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 24%, rgba(245, 158, 11, 0.24), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.60) 44%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.10) 70%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100% - 1180px) / 2));
  right: max(24px, calc((100% - 1180px) / 2));
  bottom: 118px;
  max-width: 760px;
  color: #fff;
}

.hero-badges,
.card-badges,
.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-badges a,
.hero-badges span,
.card-badges span,
.detail-badges a,
.detail-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.hero-badges a,
.detail-badges a,
.card-badges span:first-child {
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 18px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.06;
  letter-spacing: -0.04em;
  text-shadow: 0 14px 30px rgba(0, 0, 0, 0.34);
}

.hero-content p {
  margin: 0;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(16px, 2vw, 21px);
}

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

.primary-action,
.ghost-action,
.page-filter button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-action,
.page-filter button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 14px 30px rgba(217, 119, 6, 0.32);
}

.ghost-action {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
}

.primary-action:hover,
.ghost-action:hover,
.page-filter button:hover {
  transform: translateY(-2px) scale(1.01);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  gap: 10px;
  width: min(760px, calc(100% - 40px));
  transform: translateX(-50%);
}

.hero-dot {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(14px);
  text-align: left;
}

.hero-dot.is-current {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.44);
}

.hero-dot span {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-weight: 900;
}

.hero-dot strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

main {
  min-height: 60vh;
}

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

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.detail-copy h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.detail-info p,
.site-footer p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--amber);
  font-weight: 900;
}

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

.movie-card {
  display: block;
  min-width: 0;
  border-radius: 24px;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #f59e0b, #0f172a);
}

.poster-frame img,
.category-covers img,
.tile-covers img,
.rank-row img,
.detail-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-frame img {
  transition: transform 0.45s ease;
}

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

.poster-glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.72), transparent);
}

.card-copy {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.card-copy strong {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  font-size: 16px;
  line-height: 1.35;
}

.card-copy small,
.card-copy em,
.card-tags {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

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

.card-badges span {
  min-height: 22px;
  padding: 2px 8px;
  font-size: 11px;
}

.movie-card.large {
  position: relative;
  height: 100%;
  min-height: 450px;
}

.movie-card.large .poster-frame {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card.large .card-copy {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px;
  color: #fff;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), transparent);
}

.movie-card.large .card-copy small,
.movie-card.large .card-copy em,
.movie-card.large .card-tags {
  color: rgba(255, 255, 255, 0.82);
}

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

.category-tile,
.category-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card {
  min-height: 100%;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.tile-covers,
.category-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  height: 120px;
}

.category-covers {
  grid-template-columns: repeat(4, 1fr);
  height: 150px;
}

.tile-covers img,
.category-covers img {
  min-width: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #f59e0b, #0f172a);
}

.category-tile strong,
.category-card strong {
  display: block;
  font-size: 20px;
}

.category-tile small,
.category-card small,
.category-card em,
.category-card b {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: auto 84px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.rank-row:hover {
  transform: translateX(4px);
}

.rank-no {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.rank-row img {
  width: 84px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #0f172a);
}

.rank-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row small {
  color: var(--muted);
}

.page-shell,
.detail-shell {
  padding-top: 104px;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px;
  border-radius: 34px;
  color: #fff;
  background:
    radial-gradient(circle at 76% 18%, rgba(251, 191, 36, 0.36), transparent 30%),
    linear-gradient(135deg, #111827, #334155 52%, #d97706);
  box-shadow: var(--shadow);
}

.channel-hero,
.search-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 28px;
  align-items: center;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.78);
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 900;
}

.page-filter {
  min-height: 58px;
  padding: 8px 8px 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -24px 0 28px;
}

.filter-chip {
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 8px 14px;
  color: #9a3412;
  background: #fff7ed;
  font-weight: 800;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.top-three {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 22px;
  margin-bottom: 26px;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.9fr);
  gap: 26px;
}

.player-card,
.detail-side,
.detail-copy article {
  border-radius: 30px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

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

.video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(217, 119, 6, 0.28), rgba(2, 6, 23, 0.72));
  transition: opacity 0.25s ease;
}

.play-cover span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-size: 30px;
  box-shadow: 0 18px 40px rgba(217, 119, 6, 0.38);
}

.play-cover strong {
  font-size: 20px;
}

.video-wrap.is-playing .play-cover {
  opacity: 0;
  pointer-events: none;
}

.detail-side {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  background: linear-gradient(135deg, #f59e0b, #0f172a);
}

.detail-info h1 {
  margin-top: 16px;
  font-size: clamp(28px, 3vw, 40px);
}

.detail-info dl {
  display: grid;
  gap: 10px;
  margin: 22px 0;
}

.detail-info dl div {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  font-size: 14px;
}

.detail-info dt {
  color: var(--muted);
}

.detail-info dd {
  margin: 0;
  font-weight: 800;
}

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

.tag-cloud span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #9a3412;
  background: #fff7ed;
  font-weight: 800;
  font-size: 13px;
}

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

.detail-copy article {
  padding: 28px;
}

.detail-copy h2 {
  font-size: 28px;
}

.detail-copy p {
  color: #334155;
  font-size: 17px;
}

.related-section {
  padding-top: 52px;
}

.site-footer {
  margin-top: 48px;
  background: #0f172a;
  color: rgba(255, 255, 255, 0.86);
}

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

.site-footer strong {
  color: #fff;
  font-size: 22px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: start;
  gap: 14px;
}

.site-footer a:hover {
  color: #fbbf24;
}

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

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

  .desktop-nav {
    display: none;
  }

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

  .header-search {
    margin-left: auto;
  }
}

@media (max-width: 820px) {
  .hero-carousel {
    min-height: 620px;
  }

  .hero-content {
    bottom: 96px;
  }

  .hero-dots {
    overflow-x: auto;
    justify-content: start;
  }

  .hero-dot {
    flex: 0 0 180px;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .top-three,
  .full-rank,
  .rank-layout,
  .detail-layout,
  .detail-copy,
  .channel-hero,
  .search-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .detail-side {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .header-search {
    display: none;
  }
}

@media (max-width: 560px) {
  .brand-name {
    font-size: 17px;
  }

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

  .hero-content {
    left: 18px;
    right: 18px;
  }

  .hero-actions {
    display: grid;
  }

  .content-section {
    padding: 46px 0;
  }

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

  .card-copy {
    padding: 12px;
  }

  .card-copy em,
  .card-tags {
    display: none;
  }

  .page-hero {
    padding: 34px 24px;
    border-radius: 26px;
  }

  .rank-row {
    grid-template-columns: auto 68px minmax(0, 1fr);
  }

  .rank-row img {
    width: 68px;
    height: 48px;
  }

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

  .detail-poster {
    width: 180px;
  }
}
