:root {
  --brand-red: #dc2626;
  --brand-red-dark: #b91c1c;
  --brand-pink: #db2777;
  --text-main: #111827;
  --text-muted: #6b7280;
  --surface: #ffffff;
  --surface-soft: #f9fafb;
  --border: #e5e7eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  color: var(--text-main);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.header-inner {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-pink));
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.28);
  transition: transform 0.25s ease;
}

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

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 20px;
  color: var(--text-main);
}

.brand-text small {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-muted);
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  flex: 1;
}

.nav-link,
.mobile-nav-link {
  font-weight: 700;
  color: #374151;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--brand-red);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 24px;
  color: #374151;
}

.menu-toggle:hover {
  background: #f3f4f6;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
}

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-nav-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f9fafb;
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.52) 48%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 92px;
  width: min(1280px, calc(100% - 32px));
  transform: translateX(-50%);
  color: #ffffff;
}

.hero-content h1,
.hero-content h2 {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.04;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.hero-content p {
  max-width: 680px;
  font-size: 18px;
  color: #e5e7eb;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-badges,
.hero-actions,
.tag-row,
.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-badges span,
.hero-badges a {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(5px);
}

.hero-badges span:first-child {
  background: var(--brand-red);
}

.hero-actions {
  margin-top: 28px;
}

.primary-button,
.ghost-button,
.section-link,
.hero-search button,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  min-height: 46px;
  padding: 0 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-pink));
  box-shadow: 0 16px 35px rgba(220, 38, 38, 0.28);
}

.ghost-button {
  min-height: 46px;
  padding: 0 22px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover,
.hero-search button:hover,
.filter-button:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  transform: translateY(-50%);
  color: #ffffff;
  font-size: 42px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(5px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.hero-search {
  position: absolute;
  right: max(16px, calc((100vw - 1280px) / 2 + 16px));
  bottom: 36px;
  width: min(420px, calc(100% - 32px));
  padding: 8px;
  display: flex;
  gap: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 0 16px;
  outline: none;
  color: var(--text-main);
}

.hero-search button {
  padding: 0 18px;
  color: #ffffff;
  background: var(--brand-red);
}

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 16px 70px;
}

.content-section {
  margin-top: 50px;
}

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

.section-heading h2,
.page-title h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  line-height: 1.12;
}

.section-heading p,
.page-title p {
  margin-top: 10px;
  color: var(--text-muted);
}

.section-link {
  min-height: 40px;
  padding: 0 18px;
  color: var(--brand-red);
  background: #fee2e2;
}

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

.category-card {
  min-height: 158px;
  padding: 22px;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(229, 231, 235, 0.9);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.category-card p {
  margin-top: 10px;
  color: var(--text-muted);
}

.category-card span {
  display: inline-flex;
  margin-top: 18px;
  color: var(--brand-red);
  font-weight: 900;
}

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

.movie-card {
  min-width: 0;
}

.poster-link {
  display: block;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.poster-link:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

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

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

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

.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.type-badge {
  right: 10px;
  top: 10px;
  padding: 4px 9px;
  background: rgba(220, 38, 38, 0.92);
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 39, 0.88);
}

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

.movie-card-title {
  display: block;
  min-height: 48px;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.45;
  color: var(--text-main);
}

.movie-card-meta,
.movie-card-desc {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.movie-card-desc {
  min-height: 38px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  margin-top: 10px;
}

.tag-chip {
  display: inline-flex;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--brand-red-dark);
  background: #fee2e2;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 42px 68px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease;
}

.ranking-item:hover {
  transform: translateX(4px);
}

.ranking-number {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-pink));
}

.ranking-item img {
  width: 68px;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.ranking-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ranking-content strong {
  font-size: 17px;
  font-weight: 900;
}

.ranking-content small,
.ranking-content em {
  color: var(--text-muted);
  font-style: normal;
}

.page-title {
  padding: 38px;
  border-radius: 30px;
  color: #ffffff;
  background: radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.24), transparent 28%), linear-gradient(135deg, #991b1b, #be185d 58%, #111827);
  box-shadow: var(--shadow);
}

.page-title p {
  max-width: 780px;
  color: #fee2e2;
}

.tool-panel {
  margin: 26px 0;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.07);
}

.tool-panel .search-input {
  min-height: 44px;
  border-radius: 999px;
  background: #f3f4f6;
}

.filter-button {
  min-height: 38px;
  padding: 0 14px;
  color: #374151;
  background: #f3f4f6;
}

.filter-button.is-active {
  color: #ffffff;
  background: var(--brand-red);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-side,
.text-card {
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

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

.video-player {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.48);
  transition: opacity 0.25s ease;
}

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

.play-circle {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 32px;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-pink));
  box-shadow: 0 18px 40px rgba(220, 38, 38, 0.35);
}

.player-info {
  padding: 24px;
}

.breadcrumb {
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--brand-red);
  font-weight: 800;
}

.detail-title {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 900;
  line-height: 1.12;
}

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #374151;
  background: #f3f4f6;
  font-weight: 800;
}

.detail-side {
  padding: 20px;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 20px;
  background: #111827;
}

.detail-side .primary-button {
  width: 100%;
  margin-top: 18px;
}

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

.text-card h2 {
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 900;
}

.text-card p {
  margin-top: 12px;
  color: #374151;
  line-height: 1.85;
}

.no-results {
  display: none;
  padding: 30px;
  border-radius: 22px;
  text-align: center;
  color: var(--text-muted);
  background: var(--surface);
}

.no-results.is-visible {
  display: block;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 38px 16px 24px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
}

.footer-inner strong {
  font-size: 22px;
  color: #ffffff;
}

.footer-inner p {
  margin-top: 10px;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  justify-content: flex-end;
  align-content: flex-start;
  gap: 12px 18px;
  flex-wrap: wrap;
}

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

.copyright {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px 28px;
  color: #9ca3af;
}

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 14px;
  }

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

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-slider {
    min-height: 620px;
  }

  .hero-content {
    bottom: 150px;
  }

  .hero-search {
    left: 16px;
    right: 16px;
    bottom: 72px;
    width: auto;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

  .ranking-grid,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .brand-text strong {
    font-size: 18px;
  }

  .brand-text small {
    display: none;
  }

  .hero-slider {
    height: 76vh;
    min-height: 590px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 38px;
  }

  .hero-content p {
    font-size: 16px;
  }

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

  .ranking-item {
    grid-template-columns: 36px 56px 1fr;
  }

  .ranking-item img {
    width: 56px;
    height: 76px;
  }

  .movie-card-title {
    min-height: 42px;
    font-size: 15px;
  }

  main {
    padding-top: 30px;
  }

  .page-title {
    padding: 26px;
  }
}
