:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --red: #dc2626;
  --red-dark: #991b1b;
  --red-soft: #fee2e2;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

img,
video {
  max-width: 100%;
  height: auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

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

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--red);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 650;
}

.nav-links a {
  position: relative;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #f87171;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-actions {
  position: relative;
  flex: 0 0 260px;
}

.site-search,
.local-search {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 11px 16px;
  outline: none;
}

.site-search::placeholder {
  color: #cbd5e1;
}

.search-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, calc(100vw - 32px));
  max-height: 520px;
  overflow: auto;
  background: #ffffff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 10px;
}

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

.search-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  padding: 9px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.search-item:hover {
  background: #f1f5f9;
}

.search-item img {
  width: 52px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: #cbd5e1;
}

.search-item strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.search-item span {
  color: var(--muted);
  font-size: 12px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 22px;
}

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 20%, rgba(239, 68, 68, 0.36), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(248, 113, 113, 0.22), transparent 28%),
    linear-gradient(135deg, #0f172a 0%, #7f1d1d 52%, #1e293b 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.56), rgba(15, 23, 42, 0.92));
}

.hero-inner {
  position: relative;
  min-height: 560px;
  display: grid;
  grid-template-columns: 1.03fr 0.97fr;
  align-items: center;
  gap: 44px;
  padding: 58px 0;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.18);
  color: #fecaca;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 26px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  padding: 11px 18px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

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

.button-primary {
  background: var(--red);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(220, 38, 38, 0.32);
}

.button-primary:hover {
  background: #b91c1c;
}

.button-ghost {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
}

.hero-stage {
  position: relative;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-slide {
  display: none;
  min-height: 430px;
  position: relative;
}

.hero-slide.is-active {
  display: block;
}

.hero-slide img {
  width: 100%;
  height: 430px;
  object-fit: cover;
  display: block;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.08) 58%, rgba(2, 6, 23, 0.28));
}

.hero-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
}

.hero-caption h2 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 900;
}

.hero-caption p {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 28px;
  background: #ffffff;
}

.page-hero {
  background: linear-gradient(135deg, var(--slate-800), #7f1d1d);
  color: #ffffff;
  padding: 54px 0;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #e2e8f0;
  line-height: 1.8;
  font-size: 17px;
}

.section {
  padding: 58px 0;
}

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

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

.section-desc {
  margin: 8px 0 0;
  max-width: 740px;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  background: #cbd5e1;
  overflow: hidden;
}

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

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

.poster-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.92);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.poster-overlay {
  position: absolute;
  inset: auto 0 0;
  min-height: 44%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent);
}

.movie-body {
  padding: 14px;
}

.movie-title {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 850;
}

.movie-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 9px;
}

.movie-line {
  color: #475569;
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

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

.category-card {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--slate-800), #991b1b);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
  transition: transform 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: #fee2e2;
  line-height: 1.7;
  font-size: 14px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 18px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.local-search {
  color: var(--ink);
  background: #f8fafc;
  border-color: var(--line);
}

.local-search::placeholder {
  color: #94a3b8;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 72px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.rank-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--red-soft);
  color: var(--red-dark);
  font-weight: 900;
}

.rank-item img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  background: #cbd5e1;
}

.rank-item h2,
.rank-item h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 850;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

.breadcrumbs {
  color: #cbd5e1;
  font-size: 14px;
  margin-bottom: 14px;
}

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

.player-card,
.content-card,
.side-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.2), rgba(0, 0, 0, 0.72));
}

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

.play-button {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #ffffff;
  font-size: 34px;
  box-shadow: 0 16px 40px rgba(220, 38, 38, 0.35);
  cursor: pointer;
}

.player-caption {
  padding: 20px;
}

.player-caption h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
}

.player-caption p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.content-card {
  padding: 24px;
  margin-top: 22px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 900;
}

.content-card p {
  margin: 0 0 16px;
  color: #334155;
  line-height: 1.9;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.side-card {
  padding: 18px;
}

.side-poster {
  border-radius: 18px;
  overflow: hidden;
  background: #cbd5e1;
  margin-bottom: 16px;
}

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

.related-list {
  display: grid;
  gap: 12px;
}

.related-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.related-item:hover {
  background: #f1f5f9;
}

.related-item img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 10px;
  background: #cbd5e1;
}

.related-item strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.related-item span {
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  background: var(--slate-900);
  color: #94a3b8;
  padding: 42px 0 28px;
  margin-top: 58px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 28px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 850;
}

.site-footer p,
.site-footer li {
  line-height: 1.8;
  font-size: 14px;
}

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

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

.copyright {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding-top: 20px;
  font-size: 13px;
}

@media (max-width: 1024px) {
  .hero-inner,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 820px) {
  .navbar {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-bottom: 14px;
  }

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

  .nav-actions {
    order: 4;
    flex-basis: 100%;
    padding-bottom: 14px;
  }

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

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

  .section-head,
  .filter-bar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .rank-item {
    grid-template-columns: 44px 64px 1fr;
  }

  .rank-item .button {
    grid-column: 2 / -1;
    width: 100%;
  }

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

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

  .logo {
    font-size: 20px;
  }

  .hero-inner {
    padding: 40px 0;
  }

  .hero-slide,
  .hero-slide img {
    min-height: 360px;
    height: 360px;
  }

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

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

  .movie-body {
    padding: 11px;
  }

  .movie-title {
    font-size: 14px;
  }

  .rank-item {
    gap: 10px;
  }
}
