:root {
  --red: #dc2626;
  --red-dark: #b91c1c;
  --red-soft: #fef2f2;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --page: #f9fafb;
  --dark: #0f172a;
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

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(--ink);
  background: var(--page);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(16px);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.logo-icon {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: var(--red);
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.25);
}

.logo-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.brand-text strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.brand-text small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  color: #374151;
  font-weight: 600;
}

.desktop-nav a,
.nav-dropdown > button {
  padding: 8px 2px;
  border: 0;
  color: #374151;
  background: transparent;
  cursor: pointer;
}

.desktop-nav a:hover,
.nav-dropdown > button:hover {
  color: var(--red);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 330px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.22s ease;
}

.dropdown-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
}

.dropdown-panel a:hover {
  background: var(--red-soft);
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.top-search,
.mobile-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.top-search {
  width: 300px;
}

.top-search input,
.mobile-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: none;
  padding: 10px 12px;
  background: transparent;
}

.top-search button,
.mobile-search button {
  border: 0;
  color: #ffffff;
  background: var(--red);
  padding: 10px 14px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #111827;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 16px;
  background: #ffffff;
}

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

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.mobile-panel nav a {
  padding: 12px;
  border-radius: 12px;
  background: #f9fafb;
  color: #374151;
}

.hero {
  position: relative;
  height: 620px;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.58) 44%, rgba(0, 0, 0, 0.2)), linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.04) 55%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding-bottom: 92px;
}

.hero-copy {
  width: min(680px, 100%);
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  margin-bottom: 16px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--red);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-copy h1,
.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
  font-weight: 900;
}

.hero-copy p,
.page-hero p {
  margin: 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
}

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

.hero-meta {
  margin-top: 18px;
}

.hero-meta span,
.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 13px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-red {
  color: #ffffff;
  background: var(--red);
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.28);
}

.btn-red:hover {
  background: var(--red-dark);
}

.btn-dark {
  color: #ffffff;
  background: rgba(17, 24, 39, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-light {
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
}

.hero-side {
  position: absolute;
  inset: auto 0 76px 0;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.hero-panel {
  width: 330px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.55);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.hero-panel h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 20px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  color: #ffffff;
}

.hero-thumb:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hero-thumb img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 10px;
}

.hero-thumb strong,
.hero-thumb small {
  display: block;
}

.hero-thumb strong {
  line-height: 1.35;
}

.hero-thumb small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
}

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

.hero-arrow,
.hero-dot {
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 28px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
}

.hero-dot.is-active {
  width: 32px;
  background: var(--red);
}

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

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

.section-heading,
.category-block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.section-heading h2,
.category-block-head h2,
.side-ranking h2,
.detail-main h2,
.detail-side h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
}

.section-heading p,
.category-block-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

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

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

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

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

.movie-card {
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

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

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

.poster-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  transition: 0.25s ease;
}

.poster-mask span {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--red);
  font-weight: 800;
}

.poster-link:hover .poster-mask {
  opacity: 1;
  background: rgba(0, 0, 0, 0.42);
}

.year-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

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

.rank-badge {
  right: 10px;
  background: rgba(0, 0, 0, 0.72);
}

.card-body {
  padding: 12px 2px 0;
}

.card-body h3 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--red);
}

.card-body p {
  margin: 0;
  min-height: 43px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.card-meta {
  margin-top: 8px;
  color: #9ca3af;
  font-size: 13px;
}

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

.category-tile {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
  transition: 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(220, 38, 38, 0.28);
  box-shadow: var(--shadow);
}

.category-tile span {
  color: var(--red);
  font-weight: 900;
  font-size: 18px;
}

.category-tile strong {
  font-size: 30px;
}

.category-tile small {
  color: var(--muted);
}

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

.side-ranking,
.detail-side {
  position: sticky;
  top: 92px;
  padding: 22px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.ranking-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 32px 52px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: #f9fafb;
}

.ranking-row:hover {
  background: var(--red-soft);
}

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

.list-rank {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--red);
  font-weight: 900;
  font-size: 13px;
}

.list-dot {
  color: var(--red);
  background: #fee2e2;
}

.ranking-info strong,
.ranking-info small {
  display: block;
}

.ranking-info strong {
  line-height: 1.35;
}

.ranking-info small {
  color: var(--muted);
  margin-top: 3px;
}

.ranking-heat {
  color: var(--red);
  font-weight: 900;
}

.page-hero {
  padding: 86px 0;
  color: #ffffff;
}

.red-hero {
  background: radial-gradient(circle at top left, rgba(248, 113, 113, 0.44), transparent 36%), linear-gradient(135deg, #991b1b, #dc2626);
}

.dark-hero {
  background: radial-gradient(circle at top left, rgba(220, 38, 38, 0.34), transparent 34%), linear-gradient(135deg, #020617, #111827);
}

.filter-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
}

.filter-bar label {
  display: grid;
  gap: 8px;
  flex: 1;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 14px;
  outline: none;
  background: #ffffff;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.filter-bar select {
  max-width: 220px;
}

.result-note {
  min-height: 24px;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 700;
}

.stacked-sections {
  display: grid;
  gap: 38px;
  padding-bottom: 56px;
}

.category-block {
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

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

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

.archive-link {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.archive-link:hover {
  border-color: rgba(220, 38, 38, 0.28);
  background: var(--red-soft);
}

.archive-link strong {
  line-height: 1.35;
}

.archive-link span {
  color: var(--muted);
  font-size: 13px;
}

.player-section {
  padding: 26px 0 44px;
  background: #020617;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

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

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: stretch;
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.movie-player,
.player-cover,
.player-cover img,
.player-cover-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-player {
  z-index: 1;
  background: #000000;
}

.player-cover {
  z-index: 3;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #000000;
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-cover img {
  object-fit: cover;
}

.player-cover-shade {
  background: rgba(0, 0, 0, 0.46);
}

.player-play {
  position: relative;
  z-index: 4;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: var(--red);
  box-shadow: 0 18px 42px rgba(220, 38, 38, 0.36);
  font-size: 34px;
  transform: translateX(2px);
}

.player-info-card {
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.78);
}

.player-info-card img {
  width: 120px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 18px;
}

.player-info-card h1 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.25;
}

.player-info-card p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.74);
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  padding: 52px 0 0;
  align-items: start;
}

.detail-main {
  padding: 30px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
}

.detail-main h2 {
  margin-top: 26px;
  margin-bottom: 10px;
}

.detail-main h2:first-of-type {
  margin-top: 18px;
}

.detail-main p {
  margin: 0;
  color: #374151;
  font-size: 17px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-row span {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--red);
  background: var(--red-soft);
  font-weight: 800;
  font-size: 13px;
}

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

.info-card {
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
}

.info-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.info-card p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  margin-top: 70px;
  color: #e5e7eb;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

.footer-brand {
  color: #ffffff;
  font-weight: 900;
  font-size: 20px;
}

.site-footer p {
  color: #9ca3af;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0;
  text-align: center;
  color: #9ca3af;
}

.footer-bottom p {
  margin: 0;
}

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

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

  .desktop-nav {
    margin-left: auto;
  }

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

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

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

  .split-section,
  .player-layout,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .side-ranking,
  .detail-side {
    position: static;
  }

  .hero-panel {
    display: none;
  }

  .full-ranking,
  .archive-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .header-inner {
    height: 64px;
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .hero {
    height: 560px;
    min-height: 560px;
  }

  .hero-content {
    padding-bottom: 96px;
  }

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

  .hero-meta span,
  .detail-meta span {
    font-size: 13px;
  }

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

  .section-heading,
  .category-block-head,
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .card-body p {
    min-height: 0;
  }

  .page-hero {
    padding: 56px 0;
  }

  .filter-bar select {
    max-width: none;
  }

  .ranking-row {
    grid-template-columns: 28px 48px 1fr;
  }

  .ranking-heat {
    display: none;
  }

  .player-info-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 14px;
    align-items: start;
  }

  .player-info-card img {
    width: 92px;
    margin: 0;
  }

  .player-info-card h1 {
    font-size: 22px;
  }

  .detail-main {
    padding: 22px;
  }

  .mobile-panel nav {
    grid-template-columns: 1fr;
  }
}
