:root {
  --bg: #f9fafb;
  --text: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --dark: #111827;
  --dark-2: #1f2937;
  --red: #dc2626;
  --red-dark: #b91c1c;
  --red-soft: #fee2e2;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(15, 23, 42, .12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  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;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid rgba(229, 231, 235, .92);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
  backdrop-filter: blur(14px);
}

.nav-wrap {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--red), #f97316);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(220, 38, 38, .28);
  font-size: 15px;
}

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

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

.nav-link,
.mobile-nav-link {
  color: #374151;
  font-weight: 600;
  transition: color .2s ease;
}

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

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

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

.mobile-nav.open {
  display: grid;
  gap: 12px;
}

.mobile-nav-link {
  padding: 10px 8px;
  border-radius: 10px;
}

.hero {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  color: white;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity .7s ease, transform .7s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 40%, rgba(220, 38, 38, .3), transparent 28%), linear-gradient(180deg, transparent 50%, rgba(17, 24, 39, .96));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 540px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .75fr);
  align-items: center;
  gap: 48px;
  padding: 72px 0 86px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 12px;
  color: #fee2e2;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -.05em;
}

.hero h2 {
  margin: 14px 0 0;
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -.04em;
}

.hero p {
  margin: 22px 0 0;
  color: #e5e7eb;
  font-size: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}

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

.btn-primary {
  color: white;
  background: var(--red);
  box-shadow: 0 16px 35px rgba(220, 38, 38, .34);
}

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

.btn-light {
  color: white;
  border-color: rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .12);
  backdrop-filter: blur(10px);
}

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

.btn-ghost {
  color: var(--red-dark);
  background: var(--red-soft);
}

.hero-panel {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 28px;
  background: rgba(17, 24, 39, .42);
  box-shadow: 0 25px 70px rgba(0, 0, 0, .35);
  backdrop-filter: blur(16px);
}

.hero-panel img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 22px;
}

.hero-tags,
.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hero-tags span,
.card-tags span,
.detail-tags span {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #fee2e2;
  background: rgba(220, 38, 38, .25);
  border: 1px solid rgba(254, 202, 202, .2);
}

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

.hero-dot,
.hero-arrow {
  border: 0;
  color: white;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px);
}

.hero-dot {
  width: 34px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  opacity: .55;
}

.hero-dot.active {
  background: var(--red);
  opacity: 1;
}

.hero-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 22px;
}

.search-panel {
  position: relative;
  z-index: 5;
  margin-top: -32px;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px;
  background: white;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.search-box input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  color: var(--text);
  background: white;
  outline: none;
}

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

.search-box button,
.filter-bar button {
  min-height: 46px;
  border: 0;
  border-radius: 14px;
  padding: 0 24px;
  color: white;
  background: var(--red);
  font-weight: 800;
}

.section {
  padding: 70px 0;
}

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

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

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

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

.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 14px 30px rgba(15, 23, 42, .14);
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0) 35%, rgba(17, 24, 39, .88));
  opacity: .78;
  transition: opacity .25s ease;
}

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

.movie-card:hover .poster-link::after {
  opacity: .95;
}

.card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: rgba(220, 38, 38, .92);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.8);
  transition: opacity .25s ease, transform .25s ease;
}

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

.card-year,
.card-rating {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  padding: 4px 8px;
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.card-year {
  top: 10px;
  right: 10px;
  background: var(--red);
}

.card-rating {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, .62);
}

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

.movie-card h3 {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.movie-meta-line,
.movie-line {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  color: white;
  background: linear-gradient(135deg, #111827, #7f1d1d);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: auto -40px -70px auto;
  width: 170px;
  height: 170px;
  background: rgba(255, 255, 255, .12);
  border-radius: 50%;
}

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

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #f3f4f6;
}

.category-card span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-top: 18px;
  font-weight: 800;
}

.page-hero {
  padding: 78px 0;
  color: white;
  background: radial-gradient(circle at 75% 20%, rgba(220, 38, 38, .34), transparent 30%), linear-gradient(135deg, #111827, #7f1d1d 70%, #111827);
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: #e5e7eb;
  font-size: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 170px 120px;
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 90px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
}

.rank-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  color: white;
  background: linear-gradient(135deg, var(--red), #f97316);
  border-radius: 16px;
  font-size: 18px;
  font-weight: 900;
}

.rank-item img {
  width: 90px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.rank-item h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
}

.rank-score {
  color: var(--red-dark);
  font-weight: 900;
}

.detail-shell {
  background: white;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 0;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 32px;
  align-items: start;
  padding-bottom: 58px;
}

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #030712;
  border-radius: 24px;
  box-shadow: 0 25px 70px rgba(15, 23, 42, .22);
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #030712;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(3, 7, 18, .2), rgba(3, 7, 18, .8));
}

.play-overlay strong {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 20px 46px rgba(220, 38, 38, .4);
  font-size: 30px;
}

.play-overlay span {
  font-weight: 800;
}

.play-overlay.is-hidden {
  display: none;
}

.detail-title {
  font-size: clamp(30px, 4vw, 48px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
  color: var(--muted);
}

.detail-meta span {
  padding: 6px 10px;
  background: var(--soft);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.detail-tags span,
.card-tags span {
  color: var(--red-dark);
  background: var(--red-soft);
}

.detail-summary {
  margin-top: 22px;
  color: #374151;
  font-size: 17px;
}

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

.content-block h2 {
  margin: 0 0 14px;
  font-size: 28px;
  letter-spacing: -.03em;
}

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

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

.compact-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform .2s ease, box-shadow .2s ease;
}

.compact-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(15, 23, 42, .1);
}

.compact-card img {
  width: 72px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
}

.compact-card strong,
.compact-card em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.compact-card strong {
  font-size: 15px;
}

.compact-card em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.search-results {
  min-height: 220px;
}

.empty-state {
  padding: 48px;
  text-align: center;
  color: var(--muted);
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
}

.site-footer {
  margin-top: 50px;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937);
}

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

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

.site-footer p {
  margin: 0;
  color: #d1d5db;
}

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

.footer-links a:hover {
  color: white;
}

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

.hidden-card {
  display: none;
}

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

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

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

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .hero-panel {
    display: none;
  }

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

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

  .rank-item {
    grid-template-columns: 44px 70px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
  }
}

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

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

  .hero-content {
    padding-top: 58px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 36px;
  }

  .hero h2 {
    font-size: 26px;
  }

  .search-box,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 48px 0;
  }

  .section-header {
    display: block;
  }

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

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

  .rank-item {
    grid-template-columns: 40px 62px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-no {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 14px;
  }

  .rank-item img {
    width: 62px;
  }

  .rank-item h3 {
    font-size: 16px;
  }

  .footer-grid {
    padding: 34px 0;
  }
}
