:root {
  --color-red: #ef4444;
  --color-red-dark: #dc2626;
  --color-orange: #f97316;
  --color-yellow: #f59e0b;
  --color-green: #10b981;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-500: #6b7280;
  --color-gray-700: #374151;
  --color-gray-900: #111827;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-strong: 0 24px 60px rgba(15, 23, 42, 0.18);
  --radius-xl: 18px;
  --radius-2xl: 26px;
}

* {
  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(--color-gray-900);
  background: var(--color-gray-50);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--color-gray-900);
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-red), var(--color-orange));
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.26);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--color-gray-700);
  font-weight: 600;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-red);
}

.nav-search {
  position: relative;
  width: min(280px, 28vw);
}

.nav-search input,
.search-box input,
.filter-search input,
.filter-select {
  width: 100%;
  border: 1px solid var(--color-gray-200);
  border-radius: 999px;
  background: #ffffff;
  padding: 11px 16px;
  font: inherit;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-search input {
  padding-left: 40px;
}

.nav-search span {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

.nav-search input:focus,
.search-box input:focus,
.filter-search input:focus,
.filter-select:focus {
  border-color: var(--color-red);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.menu-toggle {
  display: none;
  border: 0;
  background: #ffffff;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 20px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--color-gray-200);
  padding: 16px 0 22px;
}

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

.mobile-panel a {
  display: block;
  padding: 12px 0;
  color: var(--color-gray-700);
  font-weight: 600;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 78px 0 86px;
  background: linear-gradient(135deg, #fff1f2 0%, #fff7ed 55%, #fefce8 100%);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  opacity: 0.18;
  filter: blur(26px);
  animation: pulseGlow 4.2s ease-in-out infinite;
}

.hero::before {
  top: -160px;
  left: -120px;
  background: #fca5a5;
}

.hero::after {
  right: -130px;
  bottom: -160px;
  background: #fdba74;
  animation-delay: 1.2s;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  align-items: center;
  gap: 48px;
}

.hero-badge,
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 14px;
  font-weight: 700;
  color: #dc2626;
  background: #fee2e2;
}

.hero h1 {
  margin: 18px 0 20px;
  max-width: 760px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero h1 span {
  color: var(--color-red);
}

.hero-subtitle {
  max-width: 650px;
  margin: 0 0 30px;
  color: var(--color-gray-500);
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.75;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: var(--color-red);
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.24);
}

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

.btn-light {
  color: var(--color-gray-700);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.hero-feature {
  position: relative;
  min-height: 430px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.hero-card {
  position: relative;
  height: 430px;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  background: #111827;
  box-shadow: var(--shadow-strong);
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 28px;
  color: #ffffff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.04));
}

.hero-overlay h2 {
  margin: 12px 0 8px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.hero-overlay p {
  margin: 0;
  color: #e5e7eb;
  line-height: 1.65;
}

.hero-dots {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: -42px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: #fecaca;
  cursor: pointer;
}

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

.stat-band {
  background: #ffffff;
  padding: 44px 0;
}

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

.stat-card {
  border-radius: var(--radius-xl);
  padding: 24px;
  text-align: center;
  background: linear-gradient(135deg, #fff1f2, #fff7ed);
}

.stat-card:nth-child(2) {
  background: linear-gradient(135deg, #fff7ed, #fefce8);
}

.stat-card:nth-child(3) {
  background: linear-gradient(135deg, #fefce8, #ecfdf5);
}

.stat-card:nth-child(4) {
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
}

.stat-value {
  color: var(--color-red);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
}

.stat-label {
  margin-top: 4px;
  color: var(--color-gray-500);
  font-weight: 700;
}

.section {
  padding: 72px 0;
}

.section.white {
  background: #ffffff;
}

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

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.2;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--color-gray-500);
  line-height: 1.7;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-red);
  font-weight: 800;
  white-space: nowrap;
}

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

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

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

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.14);
}

.poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

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

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

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 60%);
  opacity: 0.8;
}

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

.poster-score {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 1;
  color: #ffffff;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.card-body {
  padding: 18px;
}

.card-title {
  margin: 0 0 8px;
  color: var(--color-gray-900);
  font-size: 18px;
  line-height: 1.35;
}

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

.card-text {
  min-height: 46px;
  margin: 0 0 14px;
  color: var(--color-gray-500);
  font-size: 14px;
  line-height: 1.65;
}

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

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: var(--color-gray-500);
  font-size: 13px;
}

.card-meta span,
.detail-meta span,
.tag {
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--color-gray-100);
}

.tag:hover {
  color: #ffffff;
  background: var(--color-red);
}

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

.movie-list-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.movie-list-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
}

.movie-list-card .poster {
  height: 100%;
  min-height: 132px;
  aspect-ratio: auto;
}

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

.category-tile {
  display: block;
  min-height: 166px;
  border-radius: var(--radius-xl);
  padding: 24px;
  background: linear-gradient(135deg, #ffffff, #f9fafb);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-3px);
  background: linear-gradient(135deg, #fff1f2, #fff7ed);
  box-shadow: 0 18px 40px rgba(239, 68, 68, 0.12);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 10px;
}

.category-tile p {
  margin: 0;
  color: var(--color-gray-500);
  line-height: 1.65;
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 132px 1fr;
  gap: 16px;
  align-items: center;
  border-radius: var(--radius-xl);
  padding: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-red), var(--color-orange));
  font-weight: 900;
}

.rank-thumb {
  height: 84px;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

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

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.tag-cloud a {
  border-radius: 999px;
  padding: 9px 15px;
  background: #ffffff;
  color: var(--color-gray-700);
  box-shadow: var(--shadow-soft);
  font-weight: 700;
}

.tag-cloud a:hover {
  color: #ffffff;
  background: var(--color-red);
}

.page-hero {
  padding: 54px 0;
  color: #ffffff;
  background: linear-gradient(90deg, var(--color-red), var(--color-orange));
}

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

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.7;
}

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

.breadcrumb a:hover {
  text-decoration: underline;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.filter-search {
  flex: 1 1 280px;
}

.filter-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-select {
  border-radius: 14px;
  min-width: 150px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 30px;
  align-items: start;
}

.detail-card,
.side-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

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

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

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.player-start span {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 30px;
  background: rgba(239, 68, 68, 0.94);
  box-shadow: 0 18px 42px rgba(239, 68, 68, 0.4);
}

.player-box.is-playing .player-start {
  display: none;
}

.detail-body {
  padding: 26px;
}

.detail-body h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.18;
}

.detail-body h2 {
  margin: 28px 0 12px;
  font-size: 22px;
}

.detail-body p {
  color: var(--color-gray-700);
  line-height: 1.9;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.side-card {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.side-card h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

.related-item {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.related-thumb {
  height: 74px;
  overflow: hidden;
  border-radius: 12px;
  background: #111827;
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
}

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

.search-panel {
  max-width: 760px;
  margin-top: 24px;
}

.search-box {
  position: relative;
}

.search-box input {
  padding: 17px 20px 17px 52px;
  font-size: 18px;
  color: var(--color-gray-900);
}

.search-box span {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

.empty-state {
  display: none;
  border-radius: var(--radius-xl);
  padding: 54px 20px;
  text-align: center;
  color: var(--color-gray-500);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 30px;
  padding: 48px 0;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: #ffffff;
}

.site-footer p,
.site-footer li {
  color: #d1d5db;
  line-height: 1.75;
}

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

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #1f2937;
  padding: 22px 0;
  color: #9ca3af;
  font-size: 14px;
}

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

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

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

  .list-grid,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .side-card {
    position: static;
  }

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

@media (max-width: 820px) {
  .nav-links,
  .nav-search {
    display: none;
  }

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

  .hero {
    padding: 54px 0 74px;
  }

  .hero-feature {
    min-height: 360px;
  }

  .hero-card {
    height: 360px;
  }

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

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

  .movie-list-card,
  .rank-item {
    grid-template-columns: 1fr;
  }

  .rank-thumb,
  .movie-list-card .poster {
    height: auto;
    aspect-ratio: 16 / 10;
  }
}

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

  .hero h1 {
    font-size: 40px;
  }

  .hero-feature {
    min-height: 320px;
  }

  .hero-card {
    height: 320px;
  }

  .hero-overlay {
    padding: 20px;
  }

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

  .filter-tools {
    width: 100%;
  }

  .filter-select {
    flex: 1 1 100%;
  }

  .footer-grid,
  .footer-bottom {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }
}
