:root {
  --red-50: #fef2f2;
  --red-100: #fee2e2;
  --red-500: #ef4444;
  --red-600: #dc2626;
  --red-700: #b91c1c;
  --red-800: #991b1b;
  --red-900: #7f1d1d;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.12);
  --shadow-lg: 0 24px 60px rgba(17, 24, 39, 0.22);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--gray-900);
  background: var(--gray-50);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: 0 8px 26px rgba(17, 24, 39, 0.06);
  backdrop-filter: blur(14px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-text {
  font-size: 22px;
}

.brand-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red-500), var(--red-800));
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.32);
}

.brand-mark span {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid var(--white);
}

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

.desktop-nav a,
.nav-dropdown button {
  color: var(--gray-700);
  border: 0;
  background: transparent;
  padding: 8px 0;
  transition: color 0.2s ease;
}

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

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  width: 190px;
  padding: 8px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

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

.dropdown-panel a {
  display: block;
  padding: 9px 12px;
  border-radius: 9px;
}

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

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(330px, 28vw);
}

.search-box input,
.wide-search input,
.filter-bar input,
.search-tools input,
.search-tools select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  background: var(--white);
  color: var(--gray-900);
  outline: none;
  padding: 11px 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus,
.wide-search input:focus,
.filter-bar input:focus,
.search-tools input:focus,
.search-tools select:focus {
  border-color: var(--red-500);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.search-box button,
.wide-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  white-space: nowrap;
  font-weight: 700;
}

.search-box button,
.wide-search button,
.primary-btn {
  color: var(--white);
  background: linear-gradient(135deg, var(--red-500), var(--red-700));
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.22);
}

.ghost-btn {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--gray-800);
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

.mobile-nav a {
  display: block;
  padding: 10px 0;
  color: var(--gray-700);
}

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

.hero-section {
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 20% 20%, rgba(239, 68, 68, 0.45), transparent 32%),
    linear-gradient(135deg, var(--red-900), var(--gray-900) 56%, #0f172a);
}

.hero-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: 42px;
  min-height: 620px;
  padding: 58px 0;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: var(--red-100);
  background: rgba(255, 255, 255, 0.08);
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--red-100);
  font-size: 19px;
}

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

.hero-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-auto-rows: 172px;
  gap: 14px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 172px;
  border-radius: 20px;
  background: var(--gray-800);
  box-shadow: var(--shadow-lg);
}

.hero-card-large {
  grid-column: span 3;
  grid-row: span 2;
}

.hero-card:not(.hero-card-large) {
  grid-column: span 2;
}

.hero-card img,
.category-tile img,
.poster-link img,
.compact-card img,
.rank-thumb img,
.timeline-item img,
.detail-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card img,
.poster-link img,
.category-tile img {
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.hero-card:hover img,
.movie-card:hover .poster-link img,
.category-tile:hover img {
  transform: scale(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 15%, rgba(0, 0, 0, 0.82));
}

.hero-content {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-content strong {
  font-size: 22px;
  line-height: 1.2;
}

.hero-card-large .hero-content strong {
  font-size: 34px;
}

.hero-content em,
.hero-content small {
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
}

.hero-content small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.search-panel {
  margin-top: -34px;
  position: relative;
  z-index: 2;
}

.search-panel-inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 24px;
  align-items: center;
  padding: 26px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.search-panel h2,
.section-head h2,
.category-overview-card h2,
.detail-content h1,
.page-hero h1,
.side-card h2 {
  margin: 0;
  line-height: 1.2;
}

.search-panel p,
.section-head p,
.category-overview-card p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--gray-600);
}

.wide-search {
  display: flex;
  gap: 10px;
}

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

.alt-bg {
  background: var(--white);
}

.red-soft {
  background: linear-gradient(180deg, var(--red-50), var(--white));
}

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

.section-head h2 {
  font-size: 30px;
  letter-spacing: -0.03em;
}

.section-head a,
.text-link {
  color: var(--red-600);
  font-weight: 700;
}

.compact {
  align-items: center;
  margin-bottom: 20px;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  border-radius: 20px;
  color: var(--white);
  background: var(--gray-900);
  box-shadow: var(--shadow);
}

.category-tile:before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.86), rgba(17, 24, 39, 0.42));
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 2;
  display: block;
  padding: 0 20px;
}

.category-tile span {
  padding-top: 90px;
  font-size: 23px;
  font-weight: 800;
}

.category-tile small {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
}

.category-tile img {
  position: absolute;
  inset: 0;
  opacity: 0.38;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(220, 38, 38, 0.35);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  height: 250px;
  overflow: hidden;
  background: var(--gray-200);
}

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--white);
  background: rgba(185, 28, 28, 0.9);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card h2,
.movie-card h3 {
  margin: 0;
  color: var(--gray-900);
  font-size: 18px;
  line-height: 1.32;
}

.movie-card h2 a,
.movie-card h3 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.movie-meta {
  margin: 8px 0 0;
  color: var(--gray-500);
  font-size: 13px;
}

.movie-line {
  display: -webkit-box;
  min-height: 44px;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--gray-700);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--red-700);
  background: var(--red-50);
  font-size: 12px;
  font-weight: 700;
}

.large-tags span {
  font-size: 13px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: start;
}

.rank-panel,
.side-card,
.category-overview-card {
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06);
}

.rank-panel {
  padding: 22px;
  position: sticky;
  top: 92px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 80px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 10px;
  background: var(--gray-50);
}

.rank-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red-500), var(--red-800));
  font-weight: 900;
}

.rank-thumb {
  overflow: hidden;
  width: 80px;
  height: 58px;
  border-radius: 12px;
  background: var(--gray-200);
}

.rank-item h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}

.rank-item p {
  margin: 3px 0 0;
  color: var(--gray-500);
  font-size: 12px;
}

.rank-item span {
  color: var(--red-600);
  font-size: 12px;
  font-weight: 800;
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 16px;
  padding: 16px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06);
}

.timeline-item a:first-child {
  overflow: hidden;
  height: 120px;
  border-radius: 14px;
}

.timeline-item span {
  color: var(--red-600);
  font-weight: 800;
}

.timeline-item h3 {
  margin: 6px 0;
}

.timeline-item p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--gray-600);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 84% 12%, rgba(239, 68, 68, 0.36), transparent 34%),
    linear-gradient(135deg, var(--gray-900), var(--red-900));
  padding: 62px 0;
}

.page-hero h1 {
  max-width: 850px;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  color: var(--red-100);
  font-size: 18px;
}

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

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

.breadcrumb span:before,
.breadcrumb a + a:before,
.breadcrumb a + span:before {
  content: "/";
  margin-right: 8px;
  color: rgba(255, 255, 255, 0.48);
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.category-links a {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

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

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

.category-overview-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

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

.compact-grid.single {
  grid-template-columns: 1fr;
}

.compact-card {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: var(--gray-50);
}

.compact-card img {
  height: 106px;
  background: var(--gray-200);
}

.compact-card span,
.compact-card small {
  display: block;
  padding: 0 10px;
}

.compact-card span {
  padding-top: 10px;
  overflow: hidden;
  color: var(--gray-900);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card small {
  padding-bottom: 10px;
  color: var(--gray-500);
}

.filter-bar,
.search-tools {
  margin-bottom: 22px;
}

.search-tools {
  display: grid;
  grid-template-columns: 1fr 190px 150px;
  gap: 12px;
}

.empty-state {
  display: none;
  margin-top: 26px;
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  color: var(--gray-500);
  background: var(--white);
}

.empty-state.is-visible {
  display: block;
}

.detail-hero {
  padding: 30px 0 64px;
  background: linear-gradient(180deg, var(--gray-900) 0, var(--gray-900) 310px, var(--gray-50) 310px, var(--gray-50) 100%);
}

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

.detail-main {
  min-width: 0;
}

.player-section {
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  box-shadow: var(--shadow-lg);
}

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

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

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(0, 0, 0, 0.35);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-layer span {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.94);
  box-shadow: 0 18px 42px rgba(220, 38, 38, 0.42);
}

.play-layer span:after {
  content: "";
  position: absolute;
  margin-top: 24px;
  margin-left: 29px;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-left: 20px solid var(--white);
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-error {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--white);
  background: rgba(185, 28, 28, 0.88);
}

.detail-content {
  margin-top: 24px;
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 26px;
  background: var(--white);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06);
}

.detail-content h1 {
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: -0.04em;
}

.detail-meta {
  margin: 12px 0 0;
  color: var(--gray-500);
  font-weight: 700;
}

.detail-content h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-content p {
  margin: 0;
  color: var(--gray-700);
  font-size: 17px;
}

.detail-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
}

.detail-cover {
  height: 450px;
  border-radius: 22px;
  background: var(--gray-800);
  box-shadow: var(--shadow-lg);
}

.side-card {
  padding: 20px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px 12px;
  margin: 16px 0 0;
}

.side-card dt {
  color: var(--gray-500);
}

.side-card dd {
  margin: 0;
  color: var(--gray-900);
  font-weight: 700;
}

.site-footer {
  color: var(--gray-300);
  background: var(--gray-900);
  padding-top: 52px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 28px;
}

.footer-brand {
  color: var(--white);
  font-size: 22px;
}

.site-footer p {
  max-width: 420px;
  color: var(--gray-400);
}

.site-footer h3 {
  margin: 0 0 12px;
  color: var(--white);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a:hover {
  color: var(--red-500);
}

.footer-bottom {
  margin-top: 38px;
  border-top: 1px solid var(--gray-800);
  padding: 20px 16px;
  text-align: center;
  color: var(--gray-500);
}

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

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

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

  .rank-panel,
  .detail-side {
    position: static;
  }

  .detail-cover {
    max-width: 360px;
  }
}

@media (max-width: 860px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

  .desktop-nav {
    display: none;
  }

  .search-box {
    order: 3;
    width: 100%;
  }

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

  .hero-inner,
  .search-panel-inner,
  .category-overview-grid,
  .footer-grid,
  .search-tools,
  .rank-page-list {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    min-height: auto;
  }

  .hero-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 170px;
  }

  .hero-card-large,
  .hero-card:not(.hero-card-large) {
    grid-column: span 2;
  }

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

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

  .poster-link {
    height: 220px;
  }
}

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

  .hero-grid,
  .category-grid,
  .movie-grid,
  .small-grid,
  .timeline-list,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .hero-card-large .hero-content strong {
    font-size: 26px;
  }

  .section-head,
  .category-overview-head {
    align-items: start;
    flex-direction: column;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 36px 74px 1fr;
  }

  .detail-content,
  .side-card {
    padding: 18px;
  }
}
