:root {
  --color-primary: #dc2626;
  --color-primary-dark: #991b1b;
  --color-accent: #f97316;
  --color-amber: #f59e0b;
  --color-bg: #f9fafb;
  --color-surface: #ffffff;
  --color-soft: #f3f4f6;
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-card: 0 12px 28px rgba(15, 23, 42, 0.10);
  --radius-lg: 24px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  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);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

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

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-copy strong {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-copy small {
  margin-top: 3px;
  color: var(--color-muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link,
.mobile-nav-link {
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.mobile-nav-link:hover {
  background: var(--color-soft);
  color: var(--color-primary);
}

.nav-link.is-active,
.mobile-nav-link.is-active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 10px 18px rgba(220, 38, 38, 0.22);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--color-soft);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #374151;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

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

.mobile-nav-link {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--color-border);
}

.hero-slider {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: linear-gradient(135deg, #7f1d1d, #c2410c 48%, #b45309);
}

.hero-slider::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.22), transparent 28%), radial-gradient(circle at 80% 10%, rgba(251, 191, 36, 0.22), transparent 30%), linear-gradient(90deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.20));
  pointer-events: none;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  filter: saturate(1.1) blur(1px);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 360px);
  gap: 42px;
  align-items: center;
  color: #fff;
  padding: 56px 0;
}

.hero-copy {
  max-width: 720px;
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 32px;
  background: rgba(17, 24, 39, 0.68);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(249, 115, 22, 0.34);
  font-size: 14px;
  font-weight: 800;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero-copy p {
  margin: 18px 0 0;
  max-width: 660px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

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

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  box-shadow: 0 16px 30px rgba(220, 38, 38, 0.28);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-light {
  color: var(--color-primary);
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

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

.hero-poster-title {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 28px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 42px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  transition: 0.2s ease;
}

.hero-dot.is-active {
  width: 64px;
  background: #fff;
}

.quick-search {
  position: relative;
  z-index: 5;
  margin-top: -34px;
}

.quick-search-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.quick-search input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  outline: none;
}

.quick-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

main {
  padding: 54px 0 72px;
}

.section {
  margin-top: 54px;
}

.section:first-child {
  margin-top: 0;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-kicker {
  margin: 0 0 6px;
  color: var(--color-primary);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-header h2,
.content-block h2,
.player-section h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.section-header p {
  margin: 8px 0 0;
  color: var(--color-muted);
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.16);
}

.movie-card.is-hidden {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.28s ease;
}

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

.card-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.25);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 12px;
  color: #fff;
  font-weight: 900;
  background: rgba(220, 38, 38, 0.94);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
}

.card-body h3 {
  margin: 8px 0 8px;
  font-size: 17px;
  line-height: 1.32;
}

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

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

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

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff, #fff7ed);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.14);
}

.category-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -38px;
  bottom: -38px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.12), rgba(249, 115, 22, 0.18));
}

.category-card h2,
.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 24px;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 10px 0 18px;
  color: var(--color-muted);
}

.category-preview {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-preview span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff;
  color: #7f1d1d;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

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

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.rank-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.rank-row {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

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

.rank-row img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.rank-row-copy strong {
  display: block;
  line-height: 1.35;
}

.rank-row-copy small {
  display: block;
  margin-top: 5px;
  color: var(--color-muted);
}

.page-hero {
  padding: 78px 0 86px;
  color: #fff;
  background: linear-gradient(135deg, #7f1d1d, #c2410c 50%, #f59e0b);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 34%), linear-gradient(90deg, rgba(0, 0, 0, 0.28), transparent);
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero p {
  max-width: 720px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

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

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, 190px));
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.filter-panel label {
  display: grid;
  gap: 8px;
}

.filter-panel span {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: #fff;
  outline: none;
}

.detail-hero {
  padding: 42px 0 56px;
  color: #fff;
  background: linear-gradient(135deg, #7f1d1d, #c2410c 48%, #b45309);
}

.detail-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 26px 58px rgba(0, 0, 0, 0.32);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info p {
  margin: 16px 0 0;
  max-width: 780px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-meta span,
.detail-meta a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.player-section,
.content-block {
  margin-top: 28px;
  padding: 26px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.player-shell {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 24px;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.54));
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 3;
}

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

.play-icon {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
  font-size: 34px;
  padding-left: 5px;
}

.content-block p {
  margin: 14px 0 0;
  color: #374151;
  font-size: 17px;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.info-list div {
  padding: 14px;
  border-radius: 16px;
  background: #f9fafb;
}

.info-list span {
  display: block;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 800;
}

.info-list strong {
  display: block;
  margin-top: 5px;
}

.empty-message {
  display: none;
  padding: 24px;
  border-radius: 18px;
  background: #fff;
  color: var(--color-muted);
  text-align: center;
  box-shadow: var(--shadow-card);
}

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

.site-footer {
  background: #111827;
  color: #d1d5db;
  padding: 46px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(160px, 0.5fr));
  gap: 28px;
}

.footer-brand p {
  max-width: 520px;
  margin: 16px 0 0;
  color: #9ca3af;
}

.footer-brand .brand-copy strong,
.footer-brand .brand-copy small {
  color: #fff;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a:hover {
  color: #fff;
}

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

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .hero-content,
  .detail-grid,
  .rank-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    max-width: 330px;
    margin: 0 auto;
  }

  .rank-panel {
    position: static;
  }

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

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

  .header-inner {
    height: 66px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

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

  .hero-slider,
  .hero-content {
    min-height: 720px;
  }

  .hero-copy {
    padding: 24px;
    border-radius: 24px;
  }

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

  .quick-search-inner {
    grid-template-columns: 1fr;
  }

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

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

  .card-body {
    padding: 13px;
  }

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

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

  .detail-hero {
    padding: 28px 0 42px;
  }

  .player-section,
  .content-block {
    padding: 18px;
    border-radius: 20px;
  }

  .play-icon {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
