:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #1f2937;
  --muted: #64748b;
  --line: #e5e7eb;
  --red: #b91c1c;
  --red-soft: #fee2e2;
  --amber: #f59e0b;
  --dark: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.96));
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(148, 163, 184, 0.25);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.site-logo strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  color: #111827;
  letter-spacing: -0.04em;
}

.site-logo small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.logo-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #dc2626, #f59e0b);
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.24);
  flex: 0 0 auto;
}

.logo-icon-svg {
  width: 27px;
  height: 27px;
  fill: #ffffff;
}

.logo-icon-cut {
  fill: #dc2626;
}

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

.nav-link,
.mobile-link {
  border-radius: 999px;
  padding: 10px 15px;
  color: #475569;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--red);
  background: rgba(185, 28, 28, 0.08);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: #334155;
  border-radius: 2px;
}

.mobile-nav {
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.mobile-nav-inner {
  padding: 12px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hero-carousel {
  position: relative;
  background: #0f172a;
  overflow: hidden;
}

.hero-stage {
  position: relative;
  min-height: 660px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.15) contrast(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 28%, rgba(245, 158, 11, 0.28), transparent 28%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.97) 0%, rgba(15, 23, 42, 0.78) 45%, rgba(15, 23, 42, 0.35) 100%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.2), #0f172a 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 660px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 380px;
  align-items: center;
  gap: 56px;
  padding: 72px 0 110px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-text h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.07em;
}

.hero-summary {
  margin: 22px 0 0;
  max-width: 720px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.9;
}

.hero-tags,
.detail-meta-pills,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-meta-pills span,
.tag-row span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.13);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 650;
  backdrop-filter: blur(10px);
}

.tag-row span {
  background: #f1f5f9;
  color: #64748b;
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, #dc2626, #f59e0b);
  box-shadow: 0 16px 30px rgba(220, 38, 38, 0.28);
}

.secondary-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
}

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

.hero-cover {
  position: relative;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  background: #111827;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  transform: rotate(2deg);
}

.hero-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(15, 23, 42, 0.65));
}

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

.hero-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.55);
  font-size: 30px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 42px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

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

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

.hero-strip {
  position: relative;
  z-index: 8;
  margin-top: -54px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  padding-bottom: 36px;
}

.hero-thumb {
  min-width: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.hero-thumb img {
  width: 56px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-thumb span {
  overflow: hidden;
  color: #111827;
  font-weight: 800;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.section {
  padding: 70px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-title-block h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.14;
  letter-spacing: -0.05em;
}

.section-heading a {
  color: var(--red);
  font-weight: 800;
}

.section-heading.compact {
  align-items: center;
  margin-bottom: 18px;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  min-width: 0;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(185, 28, 28, 0.24);
  box-shadow: var(--shadow);
}

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

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

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

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

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.36);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.movie-info {
  padding: 16px;
}

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

.movie-info h2,
.wide-rank-card h2 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.movie-info p,
.wide-rank-card p,
.category-card p,
.category-overview-card p,
.detail-card p,
.page-hero p {
  color: var(--muted);
  line-height: 1.8;
}

.movie-info p {
  margin: 10px 0 14px;
  font-size: 14px;
}

.soft-panel {
  border-radius: 32px;
  padding-left: 28px;
  padding-right: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(241, 245, 249, 0.92));
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.8);
}

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

.category-card,
.category-overview-card {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 24px;
  padding: 22px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.category-main,
.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.category-main span,
.category-overview-head span {
  color: #111827;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.category-main strong,
.category-overview-head strong {
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--red);
  background: var(--red-soft);
  font-size: 13px;
}

.category-mini-links,
.category-sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.category-mini-links a,
.category-sample-links a {
  border-radius: 999px;
  padding: 7px 11px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.ranking-panel,
.detail-card,
.player-card,
.filter-panel {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.ranking-panel {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 34px 48px minmax(0, 1fr);
  grid-template-areas:
    "no img title"
    "no img meta";
  align-items: center;
  gap: 0 10px;
  padding: 8px;
  border-radius: 16px;
  background: #f8fafc;
}

.rank-no {
  grid-area: no;
  color: var(--red);
  font-weight: 900;
}

.rank-item img {
  grid-area: img;
  width: 48px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-title {
  grid-area: title;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 850;
}

.rank-meta {
  grid-area: meta;
  color: var(--muted);
  font-size: 12px;
}

.page-hero {
  padding: 78px 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(220, 38, 38, 0.12), transparent 32%),
    radial-gradient(circle at 82% 14%, rgba(245, 158, 11, 0.16), transparent 30%),
    linear-gradient(135deg, #ffffff, #f1f5f9);
}

.compact-hero p {
  max-width: 760px;
  margin-top: 14px;
  font-size: 17px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1.1fr;
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
}

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

.filter-panel span {
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 0 12px;
  color: #111827;
  background: #ffffff;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}

.empty-state {
  margin: 24px 0;
  border-radius: 20px;
  padding: 24px;
  color: #64748b;
  background: #ffffff;
  text-align: center;
}

.movie-card.hidden,
.wide-rank-card.hidden {
  display: none;
}

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

.wide-rank-card {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
}

.wide-rank-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
}

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

.wide-rank-no {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #dc2626, #f59e0b);
  font-weight: 900;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.2);
  transform: scale(1.08);
  opacity: 0.55;
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 18%, rgba(245, 158, 11, 0.28), transparent 34%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.74));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 36px 0 68px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a {
  color: #ffffff;
  font-weight: 750;
}

.detail-top-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  width: 260px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.detail-title-block h1 {
  color: #ffffff;
  font-size: clamp(38px, 5vw, 66px);
}

.detail-one-line {
  max-width: 860px;
  margin: 18px 0 0;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta-pills {
  margin-top: 20px;
}

.detail-tags {
  margin-bottom: 28px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 44px 0 20px;
}

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card {
  padding: 12px;
  background: #111827;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.34);
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-circle {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #dc2626, #f59e0b);
  box-shadow: 0 20px 45px rgba(220, 38, 38, 0.32);
  font-size: 26px;
}

.detail-card {
  padding: 24px;
}

.detail-card h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.detail-side {
  align-self: start;
  position: sticky;
  top: 96px;
}

.movie-facts {
  margin: 0;
  display: grid;
  gap: 12px;
}

.movie-facts div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.movie-facts div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.movie-facts dt {
  color: #64748b;
  font-weight: 800;
}

.movie-facts dd {
  margin: 0;
  color: #111827;
  font-weight: 700;
}

.movie-facts a {
  color: var(--red);
}

.site-footer {
  margin-top: 40px;
  background: #0f172a;
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 40px;
  padding: 54px 0;
}

.footer-logo strong {
  color: #ffffff;
}

.footer-logo small,
.site-footer p {
  color: #94a3b8;
}

.site-footer p {
  max-width: 440px;
  margin: 18px 0 0;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 18px;
}

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

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 18px 0;
  color: #94a3b8;
  text-align: center;
}

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

  .movie-grid.six-cols,
  .hero-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 48px;
  }

  .hero-cover {
    max-width: 250px;
    transform: none;
  }

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

  .hero-arrow {
    display: none;
  }

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

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

  .detail-poster {
    width: 190px;
  }
}

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

  .site-logo strong {
    font-size: 19px;
  }

  .hero-text h1 {
    font-size: 38px;
  }

  .hero-summary,
  .detail-one-line {
    font-size: 16px;
  }

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

  .section {
    padding: 48px 0;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .movie-info {
    padding: 13px;
  }

  .movie-info h2 {
    font-size: 16px;
  }

  .wide-rank-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }
}
