:root {
  --red: #dc2626;
  --red-dark: #b91c1c;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 22px 45px rgba(15, 23, 42, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--red);
  color: var(--white);
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.25);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

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

.brand-text small {
  color: var(--gray-500);
  font-size: 12px;
  margin-top: 4px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: var(--gray-700);
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--red);
}

.nav-dropdown {
  position: relative;
  padding: 22px 0;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% - 8px);
  left: 0;
  width: 320px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow-xl);
  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,
.mobile-category-links a {
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--gray-700);
  font-size: 14px;
}

.dropdown-panel a:hover,
.mobile-category-links a:hover {
  background: #fef2f2;
  color: var(--red);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.search-input,
.filter-select {
  min-height: 40px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  background: var(--white);
  padding: 0 14px;
  color: var(--gray-800);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.nav-search button,
.primary-button,
.secondary-button {
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  padding: 0 18px;
  background: var(--red);
  color: var(--white);
  font-weight: 800;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-search button:hover,
.primary-button:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  color: var(--gray-800);
}

.mobile-category-links {
  display: none;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: var(--gray-900);
}

.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-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.76;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0.68) 38%, rgba(0, 0, 0, 0.24) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 72px;
  color: var(--white);
}

.hero-copy {
  max-width: 720px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.88);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 18px;
}

.hero h1,
.hero h2 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 18px;
  max-width: 650px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
}

.hero-meta span,
.detail-meta span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #f3f4f6;
  font-size: 13px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-tabs {
  position: absolute;
  z-index: 4;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 40px;
  display: flex;
  gap: 10px;
}

.hero-tab {
  width: 44px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.45);
}

.hero-tab.is-active {
  background: var(--red);
}

.section {
  padding: 56px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--gray-500);
}

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

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

.movie-card {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  background: linear-gradient(135deg, #111827, #7f1d1d);
  box-shadow: var(--shadow);
}

.wide-card .poster {
  aspect-ratio: 16 / 9;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
}

.movie-card:hover .poster-shade {
  background: rgba(0, 0, 0, 0.42);
}

.play-mark {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.92);
  color: var(--white);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: all 0.25s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--red);
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

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

.card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 24px;
  color: var(--gray-800);
  font-weight: 800;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.card-meta {
  display: -webkit-box;
  overflow: hidden;
  color: var(--gray-500);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

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

.category-card {
  min-height: 150px;
  padding: 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--white), #fff7f7);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--gray-900);
  font-size: 22px;
}

.category-card span {
  color: var(--gray-500);
}

.banner {
  padding: 52px 0;
  background: linear-gradient(135deg, var(--red), #7f1d1d);
  color: var(--white);
}

.banner h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
}

.banner p {
  max-width: 780px;
  margin: 0;
  color: #fee2e2;
  font-size: 18px;
}

.chips,
.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--white);
  color: var(--gray-700);
  box-shadow: var(--shadow);
  font-weight: 700;
}

.chip:hover,
.chip.active {
  background: var(--red);
  color: var(--white);
}

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

.ranking-item {
  display: grid;
  grid-template-columns: auto 66px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.ranking-item img {
  width: 66px;
  height: 92px;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, #111827, #7f1d1d);
}

.ranking-item strong {
  display: block;
  color: var(--gray-900);
  font-size: 18px;
}

.ranking-item small {
  display: block;
  margin-top: 5px;
  color: var(--gray-500);
}

.ranking-item em {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fef2f2;
  color: var(--red);
  font-style: normal;
  font-weight: 900;
}

.list-rank {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--red);
  color: var(--white);
  font-weight: 900;
}

.search-panel {
  padding: 24px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.search-input {
  width: min(100%, 520px);
  min-height: 48px;
}

.filter-select {
  min-height: 48px;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
  color: var(--gray-500);
  font-size: 14px;
}

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

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

.player-card,
.detail-card,
.side-card {
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

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

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

.player-overlay {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.95);
  color: var(--white);
  font-size: 34px;
  transform: translate(-50%, -50%);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.9);
}

.player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent);
}

.player-controls button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-weight: 900;
}

.progress-track {
  flex: 1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.progress-fill {
  width: 0;
  height: 100%;
  background: var(--red);
}

.detail-card {
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.15;
}

.detail-meta span,
.card-tags span {
  background: var(--gray-100);
  color: var(--gray-700);
}

.article-block {
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
  margin-top: 24px;
}

.article-block h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.article-block p {
  margin: 0 0 12px;
  color: var(--gray-700);
}

.side-card {
  padding: 20px;
  position: sticky;
  top: 86px;
}

.side-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #111827, #7f1d1d);
  margin-bottom: 18px;
}

.info-row {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 14px;
}

.info-row span:first-child {
  width: 56px;
  color: var(--gray-500);
}

.site-footer {
  margin-top: 72px;
  background: var(--gray-900);
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
  gap: 32px;
  padding: 46px 0;
}

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

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

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0;
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1024px) {
  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .nav {
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .nav-menu {
    width: 100%;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 16px 0 8px;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-dropdown {
    padding: 0;
  }

  .dropdown-panel {
    display: none;
  }

  .mobile-category-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding-top: 8px;
  }

  .nav-search {
    width: 100%;
  }

  .nav-search input {
    flex: 1;
  }

  .hero {
    height: 560px;
  }

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

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

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

  .side-card {
    position: static;
  }
}

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

  .hero {
    height: 520px;
  }

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

  .hero-tabs {
    left: 12px;
    right: auto;
    bottom: 20px;
  }

  .section {
    padding: 42px 0;
  }

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

  .card-grid,
  .card-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

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

  .ranking-item {
    grid-template-columns: auto 54px 1fr;
  }

  .ranking-item em {
    display: none;
  }

  .ranking-item img {
    width: 54px;
    height: 76px;
  }

  .detail-card {
    padding: 20px;
  }

  .player-overlay {
    width: 68px;
    height: 68px;
    font-size: 26px;
  }
}
