:root {
  --red-900: #7f1d1d;
  --red-800: #991b1b;
  --red-700: #b91c1c;
  --red-600: #dc2626;
  --red-500: #ef4444;
  --amber-500: #f59e0b;
  --gray-950: #050505;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-300: #d1d5db;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow-card: 0 18px 38px rgba(17, 24, 39, 0.12);
  --shadow-soft: 0 8px 24px rgba(17, 24, 39, 0.08);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: var(--gray-900);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.site-header-inner {
  max-width: 1280px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  flex-shrink: 0;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  color: var(--red-800);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.brand-text {
  display: grid;
  gap: 0;
}

.brand-text strong {
  font-size: 21px;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: #fee2e2;
  font-size: 12px;
}

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

.nav-link,
.dropdown-trigger {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fee2e2;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.dropdown-trigger:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 210px;
  padding: 10px;
  display: grid;
  gap: 4px;
  border-radius: 16px;
  background: var(--white);
  color: var(--gray-700);
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.18s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
}

.dropdown-panel a:hover {
  color: var(--red-800);
  background: #fef2f2;
}

.header-search,
.mobile-search,
.search-band form,
.hero-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.search-band input,
.hero-search-form input,
.filter-panel input,
.filter-panel select {
  min-width: 0;
  height: 42px;
  border-radius: 999px;
  padding: 0 16px;
  color: var(--gray-900);
  background: var(--white);
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(153, 27, 27, 0.1);
}

.header-search input {
  width: 220px;
}

.header-search button,
.mobile-search button,
.search-band button,
.hero-search-form button,
.primary-button {
  height: 42px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: var(--red-600);
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.24);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.header-search button:hover,
.mobile-search button:hover,
.search-band button:hover,
.hero-search-form button:hover,
.primary-button:hover {
  background: var(--red-700);
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(220, 38, 38, 0.32);
}

.menu-toggle {
  display: none;
  color: var(--white);
  font-size: 28px;
}

.mobile-menu {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
  border-top: 1px solid rgba(254, 202, 202, 0.25);
}

.mobile-menu.is-open {
  display: grid;
  gap: 8px;
}

.mobile-nav-link,
.mobile-sub-link {
  padding: 8px 0;
  color: #fee2e2;
  font-weight: 600;
}

.mobile-sub-link {
  padding-left: 18px;
  font-size: 14px;
  color: #fecaca;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
  transition: opacity 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-bg,
.detail-backdrop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.96) 0%, rgba(17, 24, 39, 0.68) 42%, rgba(17, 24, 39, 0.24) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 1) 0%, transparent 44%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 600px;
  margin: 0 auto;
  padding: 56px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 52px;
}

.hero-copy {
  max-width: 720px;
  color: var(--white);
}

.hero-kicker,
.detail-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--white);
  background: var(--red-600);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-info h1 {
  margin-top: 18px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-info p {
  margin-top: 18px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-meta span,
.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  color: #fee2e2;
  background: rgba(220, 38, 38, 0.78);
  font-size: 14px;
  font-weight: 600;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.ghost-button {
  height: 42px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  font-weight: 700;
  backdrop-filter: blur(8px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.hero-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  font-size: 30px;
  line-height: 1;
  backdrop-filter: blur(6px);
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.3);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

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

.hero-dot.is-active {
  width: 30px;
  background: var(--white);
}

.search-band {
  margin-top: -42px;
  position: relative;
  z-index: 5;
  padding: 0 24px;
}

.search-band-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  align-items: center;
  gap: 24px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.search-band h2 {
  font-size: 24px;
  font-weight: 900;
  color: var(--gray-900);
}

.search-band p {
  margin-top: 6px;
  color: var(--gray-600);
}

.search-band input,
.hero-search-form input {
  flex: 1;
  background: #f9fafb;
}

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px 0;
}

.nested-section {
  padding: 36px 0 0;
}

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

.section-heading h2 {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 900;
  color: var(--gray-900);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin-top: 8px;
  max-width: 760px;
  color: var(--gray-600);
  line-height: 1.75;
}

.section-heading a,
.text-link {
  flex-shrink: 0;
  color: var(--red-700);
  font-weight: 800;
}

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

.ranking-grid {
  align-items: stretch;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #991b1b, #111827);
}

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

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

.poster-overlay {
  position: absolute;
  inset: auto 12px 12px 12px;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(220, 38, 38, 0.92);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s ease;
}

.movie-card:hover .poster-overlay {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--red-600));
  font-size: 14px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.movie-card-body {
  padding: 16px;
}

.movie-meta-line,
.movie-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--red-700);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h2 {
  margin-top: 8px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 900;
  color: var(--gray-900);
}

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

.movie-card p {
  margin-top: 8px;
  min-height: 44px;
  color: var(--gray-600);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-tags,
.detail-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.movie-tags span,
.detail-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #fee2e2;
  color: var(--red-800);
  font-size: 12px;
  font-weight: 700;
}

.movie-foot {
  margin-top: 14px;
  color: var(--gray-600);
}

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

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

.category-card,
.category-overview-card,
.side-card,
.text-panel,
.player-panel {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.category-card {
  position: relative;
  min-height: 230px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--white);
  isolation: isolate;
}

.category-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.18));
}

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

.category-card span {
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin-top: 8px;
  color: #e5e7eb;
  font-size: 14px;
  line-height: 1.6;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--gray-900), var(--red-900));
}

.page-hero {
  padding: 92px 24px;
}

.page-hero > div {
  max-width: 1280px;
  margin: 0 auto;
}

.small-hero,
.search-hero,
.latest-hero,
.ranking-hero,
.category-hero {
  background:
    radial-gradient(circle at 20% 10%, rgba(239, 68, 68, 0.45), transparent 32%),
    linear-gradient(135deg, #111827 0%, #7f1d1d 100%);
}

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

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

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

.category-overview-card {
  padding: 18px;
}

.category-cover-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.category-cover-row img {
  aspect-ratio: 3 / 4;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  background: var(--gray-800);
}

.category-overview-card h2 {
  margin-top: 18px;
  font-size: 22px;
  font-weight: 900;
}

.category-overview-card p {
  margin-top: 8px;
  color: var(--gray-600);
  line-height: 1.7;
}

.category-overview-card .text-link {
  display: inline-flex;
  margin-top: 14px;
}

.filter-panel {
  margin-bottom: 24px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.filter-panel input,
.filter-panel select {
  border-radius: 12px;
  background: #f9fafb;
}

.detail-hero {
  min-height: 580px;
  display: flex;
  align-items: center;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.97), rgba(17, 24, 39, 0.76), rgba(17, 24, 39, 0.35)),
    linear-gradient(0deg, rgba(17, 24, 39, 1), transparent 45%);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px;
}

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

.detail-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.4);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info {
  max-width: 780px;
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.15);
  color: #fee2e2;
}

.detail-info .primary-button {
  margin-top: 28px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.player-panel {
  padding: 0;
  background: #000;
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  border-radius: var(--radius);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-cover img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  filter: blur(2px);
  transform: scale(1.04);
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.24), rgba(0, 0, 0, 0.72));
}

.play-circle,
.player-cover strong {
  position: relative;
  z-index: 2;
}

.play-circle {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--red-600);
  font-size: 28px;
  box-shadow: 0 18px 38px rgba(220, 38, 38, 0.45);
}

.player-cover strong {
  font-size: 22px;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.text-panel {
  margin-top: 28px;
  padding: 28px;
}

.text-panel h2,
.side-card h2 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 24px;
  font-weight: 900;
}

.text-panel h2:not(:first-child) {
  margin-top: 28px;
}

.text-panel p {
  color: var(--gray-700);
  line-height: 1.9;
  white-space: pre-wrap;
}

.side-card {
  padding: 22px;
}

.side-card + .side-card {
  margin-top: 22px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  font-size: 14px;
}

.side-card dt {
  color: var(--gray-600);
  font-weight: 800;
}

.side-card dd {
  color: var(--gray-900);
  word-break: break-word;
}

.side-link {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
  color: var(--red-700);
  font-weight: 800;
}

.site-footer {
  margin-top: 80px;
  color: #d1d5db;
  background: linear-gradient(180deg, var(--gray-800), var(--gray-900));
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  margin-bottom: 12px;
  color: var(--white);
  font-size: 24px;
  font-weight: 900;
}

.site-footer h2 {
  margin-bottom: 14px;
  color: var(--white);
  font-size: 18px;
  font-weight: 800;
}

.site-footer p {
  color: #9ca3af;
  line-height: 1.8;
}

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

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

@media (max-width: 1100px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

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

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

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

  .detail-poster {
    max-width: 280px;
  }
}

@media (max-width: 760px) {
  .site-header-inner {
    padding: 0 16px;
  }

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

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

  .hero-content {
    padding: 44px 18px;
  }

  .hero-control {
    display: none;
  }

  .search-band {
    margin-top: 0;
    padding: 18px;
  }

  .search-band-inner,
  .filter-panel,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .content-section {
    padding: 48px 18px 0;
  }

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

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

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

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

  .movie-card p,
  .movie-tags {
    display: none;
  }

  .page-hero {
    padding: 64px 18px;
  }

  .detail-hero-inner {
    padding: 36px 18px;
  }

  .detail-info p {
    font-size: 16px;
  }

  .side-column {
    order: -1;
  }
}
