* {
  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: #111827;
  background: linear-gradient(135deg, #fafafa 0%, #ffffff 44%, rgba(255, 251, 235, 0.72) 100%);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
  backdrop-filter: blur(16px);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

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

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

.brand-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #b45309, #f59e0b);
  box-shadow: 0 12px 24px rgba(180, 83, 9, 0.28);
  font-size: 14px;
}

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

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-text em {
  margin-top: 3px;
  color: #6b7280;
  font-style: normal;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  white-space: nowrap;
}

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

.nav-link:hover,
.nav-link.is-active {
  color: #b45309;
}

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

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  outline: none;
  padding: 11px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.header-search button,
.mobile-search button,
.filter-panel button {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  color: #ffffff;
  background: #d97706;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.filter-panel button:hover {
  background: #b45309;
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: #374151;
}

.mobile-panel {
  display: none;
  border-top: 1px solid #e5e7eb;
  padding: 14px 16px 20px;
  background: #ffffff;
}

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

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.mobile-link {
  padding: 11px 12px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
}

.mobile-link:hover,
.mobile-link.is-active {
  color: #b45309;
  background: #fffbeb;
}

.hero-slider {
  position: relative;
  height: 540px;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-slide.is-active .hero-bg {
  animation: heroZoom 9s ease forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.08);
  }
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.62) 48%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(100%, 680px);
  color: #ffffff;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 13px;
  color: #ffffff;
  background: rgba(217, 119, 6, 0.94);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-copy h1,
.simple-hero h1,
.detail-title-block h1 {
  margin: 18px 0 16px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy p,
.detail-title-block p {
  margin: 0;
  max-width: 660px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.hero-meta a,
.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #f3f4f6;
  background: rgba(17, 24, 39, 0.38);
  font-size: 14px;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  padding: 0 24px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: #d97706;
  box-shadow: 0 18px 34px rgba(217, 119, 6, 0.28);
}

.primary-btn:hover {
  background: #b45309;
  transform: translateY(-2px) scale(1.02);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.primary-btn.small {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 14px;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.34);
  font-size: 32px;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(217, 119, 6, 0.9);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

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

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #d97706;
  font-weight: 800;
}

.section-more:hover {
  color: #b45309;
}

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

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

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

.movie-card {
  position: relative;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 40px rgba(15, 23, 42, 0.14);
}

.movie-card-link {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.movie-thumb {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111827;
}

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

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

.movie-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.56) 0%, rgba(0, 0, 0, 0.05) 58%);
}

.thumb-badge,
.thumb-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
}

.thumb-badge {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  background: rgba(217, 119, 6, 0.92);
  font-size: 12px;
}

.thumb-play {
  right: 12px;
  bottom: 12px;
  padding: 6px 11px;
  background: rgba(17, 24, 39, 0.72);
  font-size: 13px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
}

.movie-kicker span {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 8px;
  background: #fffbeb;
}

.movie-body h2,
.movie-body h3 {
  margin: 0 0 9px;
  color: #111827;
  font-size: 20px;
  line-height: 1.35;
}

.movie-body p {
  margin: 0;
  color: #4b5563;
  line-height: 1.7;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

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

.tag-row span {
  border-radius: 999px;
  padding: 5px 9px;
  color: #6b7280;
  background: #f3f4f6;
  font-size: 12px;
  font-weight: 700;
}

.category-chip {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 3;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 96px;
  border-radius: 20px;
  padding: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.compact-title {
  margin-bottom: 16px;
}

.compact-title h2 {
  font-size: 24px;
}

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

.rank-item a {
  display: grid;
  grid-template-columns: 42px 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 10px;
  background: #f9fafb;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item a:hover {
  background: #fffbeb;
  transform: translateX(3px);
}

.rank-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #ffffff;
  background: #d97706;
  font-size: 13px;
  font-weight: 900;
}

.rank-item img {
  width: 72px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  background: #111827;
}

.rank-content {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.rank-content strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-content em,
.rank-content small {
  overflow: hidden;
  color: #6b7280;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-content small {
  color: #9ca3af;
}

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

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

.category-card {
  position: relative;
  min-height: 220px;
  border-radius: 20px;
  overflow: hidden;
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

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

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

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.12));
}

.category-card span {
  position: absolute;
  inset-inline: 22px;
  bottom: 22px;
  z-index: 2;
  display: grid;
  gap: 8px;
}

.category-card strong {
  font-size: 24px;
}

.category-card em {
  color: #e5e7eb;
  font-style: normal;
  line-height: 1.6;
}

.page-main {
  min-height: 68vh;
}

.page-hero {
  margin-top: 28px;
  border-radius: 26px;
  padding: 48px;
  background: linear-gradient(135deg, #111827, #78350f 54%, #d97706);
  color: #ffffff;
  overflow: hidden;
}

.simple-hero p {
  max-width: 760px;
  margin: 0;
  color: #f3f4f6;
  font-size: 18px;
  line-height: 1.8;
}

.category-overview-list {
  grid-template-columns: 1fr;
  margin-top: 32px;
  margin-bottom: 54px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 28px;
  border-radius: 22px;
  padding: 26px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.category-overview-head h2 {
  margin: 0 0 10px;
  font-size: 30px;
}

.category-overview-head p {
  margin: 0 0 20px;
  color: #4b5563;
  line-height: 1.7;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 10px;
  background: #f9fafb;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mini-card:hover {
  background: #fffbeb;
  transform: translateY(-2px);
}

.mini-card img {
  width: 96px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

.mini-card span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.mini-card strong,
.mini-card em {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mini-card em {
  color: #6b7280;
  font-style: normal;
  font-size: 13px;
}

.filter-panel {
  margin-bottom: 28px;
  border-radius: 20px;
  padding: 20px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px 140px;
  gap: 14px;
  align-items: end;
}

.filter-grid label {
  display: grid;
  gap: 7px;
  color: #374151;
  font-weight: 800;
}

.filter-grid span {
  font-size: 13px;
}

.empty-state {
  display: none;
  margin: 26px 0 0;
  border-radius: 18px;
  padding: 26px;
  color: #6b7280;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

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

.detail-hero {
  position: relative;
  min-height: 440px;
  color: #ffffff;
  overflow: hidden;
  background: #111827;
}

.detail-hero-inner {
  position: relative;
  padding: 34px 0 54px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: #f3f4f6;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fbbf24;
}

.breadcrumb strong {
  font-weight: 700;
}

.detail-title-block {
  max-width: 760px;
  margin-top: 78px;
}

.detail-title-block h1 {
  margin-bottom: 16px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: start;
  padding: 42px 0 58px;
}

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

.player-shell {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #030712;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.22);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.72), rgba(3, 7, 18, 0.3));
  text-align: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-disc {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: #d97706;
  box-shadow: 0 18px 34px rgba(217, 119, 6, 0.34);
  font-size: 28px;
}

.player-overlay strong {
  max-width: min(90%, 720px);
  font-size: clamp(20px, 4vw, 34px);
  line-height: 1.25;
}

.detail-content-card,
.related-panel {
  border-radius: 20px;
  padding: 24px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.detail-content-card h2,
.related-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.detail-content-card p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
  font-size: 16px;
}

.detail-tags span {
  color: #92400e;
  background: #fffbeb;
}

.related-panel {
  position: sticky;
  top: 96px;
}

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

.site-footer {
  border-top: 1px solid #e5e7eb;
  background: #111827;
  color: #d1d5db;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0;
}

.footer-brand {
  display: inline-block;
  margin-bottom: 8px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.site-footer p {
  margin: 0;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: #e5e7eb;
  font-weight: 700;
}

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

[data-card].is-hidden {
  display: none;
}

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

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

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

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

  .ranking-panel,
  .related-panel {
    position: static;
  }

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

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

  .header-inner {
    min-height: 66px;
  }

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

  .hero-slider {
    height: 600px;
  }

  .hero-control {
    display: none;
  }

  .hero-copy h1,
  .simple-hero h1,
  .detail-title-block h1 {
    font-size: 36px;
  }

  .hero-copy p,
  .detail-title-block p,
  .simple-hero p {
    font-size: 16px;
  }

  .content-section {
    padding: 34px 0;
  }

  .movie-grid,
  .compact-grid,
  .latest-grid,
  .library-grid,
  .category-grid,
  .large-rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

  .mini-card-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .hero-slider {
    height: 620px;
  }

  .hero-actions {
    display: grid;
  }

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

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

  .rank-item a {
    grid-template-columns: 38px 64px minmax(0, 1fr);
  }

  .rank-item img {
    width: 64px;
    height: 44px;
  }

  .detail-title-block {
    margin-top: 54px;
  }

  .detail-layout {
    padding-top: 26px;
  }

  .detail-content-card,
  .related-panel {
    padding: 20px;
  }
}
