:root {
  --red: #dc2626;
  --red-dark: #b91c1c;
  --orange: #f97316;
  --orange-soft: #ffedd5;
  --yellow: #facc15;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --black: #050505;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
  --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;
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: var(--white);
  background: linear-gradient(90deg, var(--red), var(--orange), var(--yellow));
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.25);
}

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

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

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--white);
  color: var(--red);
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  transition: transform 0.25s ease;
}

.logo-link:hover .logo-mark {
  transform: scale(1.08);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.logo-title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.logo-subtitle {
  margin-top: 4px;
  font-size: 13px;
  opacity: 0.92;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 700;
}

.nav-list a {
  position: relative;
  transition: color 0.25s ease;
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.nav-list a:hover::after {
  transform: scaleX(1);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.hero-slider {
  position: relative;
  min-height: 620px;
  color: var(--white);
  overflow: hidden;
  background: linear-gradient(135deg, #991b1b, #f97316);
}

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

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

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

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transform: scale(1.02);
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.46) 48%, rgba(0, 0, 0, 0.1));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: flex;
  align-items: center;
  padding: 72px 0 96px;
}

.hero-copy {
  max-width: 780px;
  animation: fadeInUp 0.7s ease both;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 800;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(42px, 8vw, 74px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.hero-desc {
  margin: 0 0 28px;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.75;
}

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

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

.button-primary {
  color: var(--white);
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 18px 32px rgba(220, 38, 38, 0.36);
}

.button-secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.button-light {
  color: var(--red);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

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

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  width: min(560px, 100%);
  margin-top: 30px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.hero-search input,
.search-panel input,
.search-panel select {
  width: 100%;
  border: 1px solid rgba(229, 231, 235, 0.9);
  outline: none;
  border-radius: 999px;
  color: var(--gray-900);
  background: var(--white);
}

.hero-search input {
  min-height: 48px;
  padding: 0 20px;
}

.hero-control {
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.36);
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.58);
  transform: translateY(-50%) scale(1.06);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.section {
  padding: 72px 0;
}

.section-white {
  background: var(--white);
}

.section-warm {
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

.section-dark {
  color: var(--white);
  background: linear-gradient(180deg, #111827, #030712);
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--red);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-title,
.page-title {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.section-desc,
.page-desc {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--gray-600);
  font-size: 17px;
}

.section-dark .section-desc,
.section-dark .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

.movie-card,
.category-card,
.info-card,
.rank-card,
.related-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.movie-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

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

.movie-card:hover .poster-wrap img,
.related-card:hover img,
.rank-card:hover img {
  transform: scale(1.09);
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.56), transparent 58%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-wrap::after {
  opacity: 1;
}

.play-badge {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: var(--red);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.play-badge span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 25px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.movie-card:hover .play-badge {
  opacity: 1;
}

.card-tag {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 24px);
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(90deg, var(--red), var(--orange));
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.card-title {
  margin: 0 0 8px;
  color: var(--gray-900);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-desc {
  margin: 0 0 14px;
  color: var(--gray-600);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--gray-500);
  font-size: 13px;
}

.category-card {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red), var(--orange));
  isolation: isolate;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #ea580c, #facc15);
}

.category-card:nth-child(4n) {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.category-card::before {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  right: -42px;
  bottom: -42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  z-index: -1;
}

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

.category-card h3 {
  margin: 0 0 10px;
  font-size: 25px;
  font-weight: 950;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}

.category-card span {
  margin-top: 24px;
  font-weight: 900;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 88px 156px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-card:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red), var(--orange));
  font-size: 22px;
  font-weight: 950;
}

.rank-card img {
  width: 156px;
  height: 88px;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.45s ease;
}

.rank-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 900;
}

.rank-desc {
  margin: 0;
  color: var(--gray-600);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-meta {
  color: var(--gray-500);
  font-size: 14px;
  white-space: nowrap;
}

.page-hero {
  padding: 74px 0;
  color: var(--white);
  background: radial-gradient(circle at 20% 20%, rgba(250, 204, 21, 0.38), transparent 30%), linear-gradient(135deg, #991b1b, #ea580c 58%, #facc15);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

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

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
  padding: 16px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.search-panel input,
.search-panel select {
  min-height: 46px;
  padding: 0 16px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
  gap: 30px;
  align-items: start;
  padding: 42px 0 72px;
}

.player-card,
.detail-card,
.related-panel {
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

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

.player-box video {
  width: 100%;
  height: 100%;
  background: var(--black);
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.2));
  cursor: pointer;
  transition: opacity 0.25s ease;
}

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

.player-start {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 18px 42px rgba(220, 38, 38, 0.45);
  font-size: 34px;
}

.detail-card {
  margin-top: 24px;
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  font-weight: 950;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--gray-200);
}

.detail-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-size: 14px;
  font-weight: 700;
}

.detail-highlight {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(90deg, var(--red), var(--orange));
  font-weight: 800;
}

.detail-card p {
  color: var(--gray-700);
  font-size: 16px;
}

.review-box {
  margin-top: 24px;
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

.review-box h2 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 950;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.related-panel {
  position: sticky;
  top: 104px;
  padding: 22px;
}

.related-panel h2 {
  margin: 0 0 18px;
  font-size: 23px;
  font-weight: 950;
}

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

.related-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center;
  padding: 9px;
  box-shadow: none;
  background: var(--gray-50);
  transition: background 0.25s ease;
}

.related-card:hover {
  background: var(--orange-soft);
}

.related-card img {
  width: 120px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.4s ease;
}

.related-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card p {
  margin: 0;
  color: var(--gray-500);
  font-size: 13px;
}

.empty-state {
  display: none;
  padding: 32px;
  border-radius: 18px;
  color: var(--gray-600);
  text-align: center;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.site-footer {
  color: rgba(255, 255, 255, 0.76);
  background: linear-gradient(180deg, #111827, #020617);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 32px;
  padding: 54px 0 32px;
}

.footer-title {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 20px;
  font-weight: 950;
}

.footer-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-list a:hover {
  color: var(--orange);
}

.footer-bottom {
  padding: 18px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  .related-panel {
    position: static;
  }

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

@media (max-width: 820px) {
  .header-inner {
    min-height: 68px;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-list {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 18px;
    background: rgba(127, 29, 29, 0.98);
    box-shadow: var(--shadow);
  }

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

  .nav-list a {
    padding: 12px 14px;
    border-radius: 12px;
  }

  .nav-list a:hover {
    background: rgba(255, 255, 255, 0.12);
  }

  .nav-list a::after {
    display: none;
  }

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

  .hero-search,
  .search-panel {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .hero-control {
    display: none;
  }

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

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

  .rank-card {
    grid-template-columns: 58px 118px 1fr;
  }

  .rank-card img {
    width: 118px;
    height: 74px;
  }

  .rank-meta {
    display: none;
  }
}

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

  .logo-title {
    font-size: 20px;
  }

  .logo-subtitle {
    display: none;
  }

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

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

  .rank-card {
    grid-template-columns: 52px 1fr;
  }

  .rank-card img {
    display: none;
  }

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

  .related-card {
    grid-template-columns: 96px 1fr;
  }

  .related-card img {
    width: 96px;
    height: 66px;
  }
}
