:root {
  --brand-red: #dc2626;
  --brand-orange: #f97316;
  --brand-yellow: #facc15;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f9fafb;
  --line: #f1f5f9;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

body {
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 48%, #fff7ed 100%);
  color: var(--ink);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.25);
}

.brand-name,
.footer-brand {
  font-size: 22px;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.site-nav a,
.mobile-nav a,
.footer-links a {
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: var(--brand-red);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #374151;
  background: #f3f4f6;
}

.mobile-nav {
  display: none;
  padding: 10px 16px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
}

.mobile-nav a:hover {
  background: #fef2f2;
}

.site-main {
  min-height: 70vh;
}

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange), #b91c1c);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  isolation: isolate;
  background-image: linear-gradient(90deg, rgba(127, 29, 29, 0.94), rgba(194, 65, 12, 0.78), rgba(17, 24, 39, 0.36)), var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 16% 20%, rgba(255, 255, 255, 0.24), transparent 26%), radial-gradient(circle at 90% 30%, rgba(250, 204, 21, 0.28), transparent 24%);
}

.hero-slide.is-active {
  display: flex;
  animation: heroFade 0.55s ease both;
}

@keyframes heroFade {
  from {
    opacity: 0.35;
    transform: scale(1.02);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
  color: #fff;
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-bottom: 22px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-weight: 800;
  font-size: 14px;
}

.hero-copy h1 {
  margin: 0 0 24px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.hero-copy h1 span {
  background: linear-gradient(90deg, #fde68a, #fdba74);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy p {
  max-width: 700px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 20px;
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-tags span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

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

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

.primary-button {
  color: var(--brand-red);
  background: #fff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
}

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

.ghost-button.light {
  color: var(--brand-red);
  border-color: rgba(220, 38, 38, 0.18);
  background: rgba(255, 255, 255, 0.7);
}

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

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(17, 24, 39, 0.38);
  transform: rotate(2deg);
}

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

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  color: var(--brand-red);
  background: rgba(255, 255, 255, 0.92);
  font-size: 28px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.hero-controls button {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  font-size: 22px;
  font-weight: 900;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.42);
}

.hero-dots button.is-active {
  width: 28px;
  background: #fff;
}

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

.warm-section {
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

.dark-section {
  color: #fff;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.dark-section .section-head h2,
.dark-section .rank-copy strong {
  color: #fff;
}

.dark-section .section-head p,
.dark-section .rank-copy em {
  color: #d1d5db;
}

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

.section-head h2 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 950;
  color: #111827;
}

.section-head p {
  color: var(--muted);
}

.section-link {
  color: var(--brand-red);
  font-weight: 900;
}

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #fecaca, #fed7aa);
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 28%, rgba(0, 0, 0, 0.82));
}

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

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.year-badge {
  right: 10px;
  background: var(--brand-red);
}

.rank-badge {
  left: 10px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.82);
  border-radius: 999px;
  color: var(--brand-red);
  background: rgba(255, 255, 255, 0.9);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.poster-title {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  color: #fff;
  font-weight: 900;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body {
  display: block;
  padding: 12px;
}

.card-body strong,
.card-body span {
  display: block;
}

.card-body strong {
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-body span {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.category-tile,
.category-overview-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile {
  padding: 22px;
}

.category-title,
.category-overview-card strong {
  display: block;
  margin-bottom: 10px;
  color: #111827;
  font-size: 20px;
  font-weight: 950;
}

.category-tile p,
.category-overview-card p {
  color: var(--muted);
  line-height: 1.7;
}

.tile-covers,
.overview-covers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.tile-covers img,
.overview-covers img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.category-overview-card {
  padding: 24px;
}

.rank-list,
.ranking-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: 46px 56px minmax(0, 1fr) 24px;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-board .rank-row {
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

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

.ranking-board .rank-row:hover {
  background: #fff7ed;
}

.rank-number {
  color: #fbbf24;
  font-size: 24px;
  font-weight: 950;
  text-align: center;
}

.ranking-board .rank-number {
  color: var(--brand-red);
}

.rank-row img {
  width: 56px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
}

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

.rank-copy strong {
  color: #111827;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.rank-arrow {
  color: var(--brand-red);
  font-size: 28px;
  font-weight: 900;
}

.page-shell {
  padding-bottom: 48px;
}

.page-hero {
  padding: 72px 0 24px;
}

.page-hero .page-kicker {
  color: var(--brand-red);
  background: #fef2f2;
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 780px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel {
  width: min(1280px, calc(100% - 32px));
  margin: 16px auto 0;
  padding: 22px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

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

.filter-title strong {
  font-size: 20px;
}

.filter-title span {
  color: var(--muted);
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f9fafb;
  outline: none;
}

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: #f87171;
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.18);
}

.quick-tags {
  margin-top: 14px;
}

.quick-tags button {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--brand-red);
  background: #fef2f2;
  font-weight: 800;
}

.empty-state {
  margin-top: 22px;
  padding: 20px;
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
  background: #f9fafb;
}

.detail-hero {
  position: relative;
  color: #fff;
  background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(127, 29, 29, 0.82), rgba(17, 24, 39, 0.56)), var(--detail-image);
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  padding: 40px 0 72px;
}

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

.breadcrumb a:hover {
  color: #fff;
}

.detail-copy {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  align-items: end;
}

.detail-cover {
  width: 220px;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 950;
}

.detail-copy p {
  max-width: 850px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.8;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  margin-top: -40px;
  padding-bottom: 70px;
  position: relative;
  z-index: 2;
}

.detail-main-card,
.sidebar-card {
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.detail-main-card {
  overflow: hidden;
}

.player-panel {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.player-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover-button {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover-button img {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.42);
}

.player-cover-button.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.large-play {
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--brand-red);
  background: rgba(255, 255, 255, 0.94);
  font-size: 34px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.32);
}

.player-cover-button strong {
  font-size: 22px;
}

.content-block {
  padding: 28px;
  border-top: 1px solid var(--line);
}

.content-block h2,
.sidebar-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 950;
}

.content-block p {
  color: #374151;
  font-size: 16px;
  line-height: 1.95;
}

.detail-sidebar {
  align-self: start;
  position: sticky;
  top: 96px;
}

.sidebar-card {
  padding: 22px;
}

.related-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.related-card:hover {
  background: #f9fafb;
}

.related-card img {
  width: 82px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.related-card strong,
.related-card em {
  display: block;
}

.related-card strong {
  margin-bottom: 6px;
  font-weight: 900;
  line-height: 1.35;
}

.related-card em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.site-footer {
  padding: 38px 0;
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin-top: 8px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

[hidden] {
  display: none !important;
}

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

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

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

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

  .detail-sidebar {
    position: static;
  }
}

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

  .menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .hero {
    height: auto;
    min-height: 620px;
  }

  .hero-slide {
    padding: 56px 0 88px;
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    width: min(260px, 78vw);
    margin: 0 auto;
  }

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

  .filter-title,
  .section-head,
  .footer-inner {
    align-items: start;
    flex-direction: column;
  }

  .rank-list,
  .ranking-board {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 560px) {
  .site-container,
  .filter-panel {
    width: min(100% - 24px, 1280px);
  }

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

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

  .header-inner {
    height: 64px;
  }

  .brand-name {
    font-size: 18px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-copy p {
    font-size: 16px;
  }

  .content-block,
  .sidebar-card {
    padding: 20px;
  }

  .rank-row {
    grid-template-columns: 36px 52px minmax(0, 1fr) 18px;
    gap: 10px;
  }
}
