:root {
  --brand-orange: #ea580c;
  --brand-red: #ef4444;
  --brand-pink: #ec4899;
  --ink: #1f2937;
  --muted: #6b7280;
  --soft: #f9fafb;
  --card: #ffffff;
  --line: #e5e7eb;
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  --radius: 1rem;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: #f9fafb;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

img {
  background: linear-gradient(135deg, #111827, #fb923c);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, #f97316, #ef4444, #ec4899);
  box-shadow: 0 10px 25px rgba(239, 68, 68, 0.25);
}

.nav-shell {
  max-width: 80rem;
  height: 4rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: rotate(12deg) scale(1.05);
}

.brand-name {
  font-size: 1.45rem;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-weight: 700;
}

.main-nav a {
  opacity: 0.95;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: #fed7aa;
  opacity: 1;
}

.nav-search,
.mobile-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-search input,
.mobile-search input,
.filter-input,
.search-hero input {
  border: 1px solid rgba(255, 255, 255, 0.32);
  outline: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.65rem 1rem;
}

.nav-search input::placeholder,
.mobile-search input::placeholder,
.search-hero input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.nav-search button,
.mobile-search button,
.search-hero button,
.cta-button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  color: #fff;
  background: #ea580c;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.search-hero button:hover,
.cta-button:hover {
  background: #c2410c;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 0.75rem;
  padding: 0.55rem 0.75rem;
  font-size: 1.25rem;
}

.mobile-panel {
  display: none;
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

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

.mobile-panel nav,
.mobile-category-links {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.48) 50%, rgba(0, 0, 0, 0.1));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(80rem, 100%);
  transform: translateX(-50%);
  padding: 3rem 1rem 4.5rem;
  color: #fff;
}

.hero-content-inner {
  max-width: 46rem;
}

.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: #fed7aa;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
}

.hero-content h1,
.hero-content h2 {
  font-size: clamp(2.1rem, 6vw, 4.6rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.06em;
  margin: 0 0 1rem;
}

.hero-content p {
  color: #e5e7eb;
  font-size: 1.15rem;
  line-height: 1.75;
  margin: 0 0 1.5rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.25);
}

.hero-dots {
  position: absolute;
  right: calc((100vw - min(80rem, 100vw)) / 2 + 2rem);
  bottom: 2.25rem;
  display: flex;
  gap: 0.5rem;
}

.hero-dots button {
  width: 0.75rem;
  height: 0.75rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 2rem;
  background: #f97316;
}

.section-shell {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-title h2,
.page-title h1,
.detail-info h1 {
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #1f2937;
}

.section-title h2 {
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.section-title a {
  color: #ea580c;
  font-weight: 800;
}

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

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

.movie-card,
.category-card,
.info-panel,
.detail-info,
.related-panel,
.player-shell,
.search-box-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

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

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

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 72%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-overlay {
  opacity: 1;
}

.card-overlay p {
  font-size: 0.88rem;
  line-height: 1.55;
}

.badge-row {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  right: 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 0.35rem;
  padding: 0.25rem 0.45rem;
  font-size: 0.72rem;
  color: #fff;
  background: rgba(17, 24, 39, 0.72);
  font-weight: 800;
}

.badge.hot {
  background: #dc2626;
}

.play-badge {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f97316;
  color: #fff;
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.card-body {
  padding: 1rem;
}

.card-body h3 {
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 900;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.55rem;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: #6b7280;
  font-size: 0.8rem;
}

.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.6rem;
}

.tag-line span,
.detail-tags a,
.detail-tags span {
  display: inline-flex;
  border-radius: 0.5rem;
  background: #fff7ed;
  color: #ea580c;
  padding: 0.25rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.feature-band {
  background: linear-gradient(135deg, #fff7ed, #fdf2f8);
  border-radius: 1.6rem;
  padding: 2rem;
}

.blue-band {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  border-radius: 1.6rem;
  padding: 2rem;
}

.category-card {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  min-height: 13rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card strong {
  font-size: 1.35rem;
  color: #1f2937;
  margin-bottom: 0.65rem;
}

.category-card p {
  color: #6b7280;
  line-height: 1.7;
  flex: 1;
}

.category-card span {
  margin-top: 1.2rem;
  color: #ea580c;
  font-weight: 900;
}

.page-hero {
  color: #fff;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
  padding: 4.5rem 1rem;
}

.page-hero.orange {
  background: linear-gradient(90deg, #f97316, #ef4444, #ec4899);
}

.page-title {
  max-width: 80rem;
  margin: 0 auto;
}

.page-title h1 {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.6rem);
  margin-bottom: 1rem;
}

.page-title p {
  max-width: 46rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  line-height: 1.75;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.filter-input {
  color: #1f2937;
  background: #fff;
  border-color: #e5e7eb;
  min-width: min(100%, 22rem);
}

.ranking-layout,
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(19rem, 1fr);
  gap: 2rem;
}

.ranking-list {
  display: grid;
  gap: 1rem;
}

.ranking-list li a {
  display: grid;
  grid-template-columns: 3rem 4.8rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  background: #fff;
  border-radius: 1rem;
  padding: 0.8rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-list li a:hover {
  transform: translateY(-0.15rem);
  box-shadow: var(--shadow);
}

.rank-number {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.ranking-list img {
  width: 4.8rem;
  height: 6.2rem;
  border-radius: 0.75rem;
  object-fit: cover;
}

.rank-copy strong,
.rank-copy em {
  display: block;
}

.rank-copy strong {
  font-size: 1rem;
  color: #1f2937;
  margin-bottom: 0.4rem;
}

.rank-copy em {
  color: #6b7280;
  font-style: normal;
  font-size: 0.86rem;
}

.breadcrumb {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #ea580c;
  font-weight: 700;
}

.detail-layout {
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000;
  margin-bottom: 1.5rem;
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-mask {
  position: absolute;
  inset: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.22));
  cursor: pointer;
  z-index: 2;
}

.play-mask.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-circle {
  width: 4.8rem;
  height: 4.8rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 0.25rem;
  background: #f97316;
  font-size: 2rem;
  box-shadow: 0 20px 45px rgba(249, 115, 22, 0.45);
}

.play-mask strong {
  font-size: 1.25rem;
  max-width: 80%;
  text-align: center;
}

.detail-info,
.related-panel,
.info-panel,
.search-box-card {
  padding: 1.5rem;
}

.detail-info h1 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  margin: 0 0 1rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0.42rem 0.75rem;
  font-weight: 800;
  font-size: 0.9rem;
}

.detail-info h2,
.related-panel h2,
.info-panel h2 {
  font-size: 1.35rem;
  font-weight: 900;
  margin: 1.35rem 0 0.75rem;
  color: #1f2937;
}

.detail-info p {
  color: #374151;
  line-height: 1.85;
  margin-bottom: 1rem;
}

.review-box {
  border-radius: 1rem;
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
  padding: 1.25rem;
  margin-top: 1.25rem;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.related-panel {
  position: sticky;
  top: 5.5rem;
}

.mini-card {
  display: grid;
  grid-template-columns: 6.6rem minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  padding: 0.75rem;
  border-radius: 0.9rem;
  transition: background 0.2s ease;
}

.mini-card:hover {
  background: #fff7ed;
}

.mini-card img {
  width: 6.6rem;
  height: 5rem;
  object-fit: cover;
  border-radius: 0.75rem;
}

.mini-card h3 {
  font-size: 0.95rem;
  line-height: 1.4;
  font-weight: 900;
  margin: 0 0 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mini-card p {
  color: #6b7280;
  font-size: 0.82rem;
}

.search-hero {
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #ef4444, #f97316);
  padding: 4.5rem 1rem;
}

.search-hero form {
  max-width: 42rem;
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.search-hero input {
  flex: 1;
}

.search-results {
  margin-top: 1.5rem;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(180deg, #111827, #030712);
  margin-top: 2rem;
}

.footer-shell {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3rem 1rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}

.footer-brand {
  color: #fff;
  margin-bottom: 1rem;
}

.site-footer h2 {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 900;
  margin-bottom: 1rem;
}

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

.site-footer a:hover {
  color: #fb923c;
}

.footer-bottom {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.25rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #9ca3af;
  font-size: 0.9rem;
}

.back-top {
  position: fixed;
  right: 2rem;
  bottom: 2rem;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 40;
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.back-top:hover {
  transform: scale(1.07);
}

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

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

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

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

  .hero-slider {
    height: 520px;
  }

  .hero-dots {
    left: 1rem;
    right: auto;
  }

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

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

  .related-panel {
    position: static;
  }
}

@media (max-width: 560px) {
  .brand-name {
    font-size: 1.1rem;
  }

  .hero-slider {
    height: 500px;
  }

  .hero-content {
    padding-bottom: 4rem;
  }

  .hero-actions,
  .filter-bar,
  .search-hero form,
  .footer-bottom {
    align-items: stretch;
    flex-direction: column;
  }

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

  .section-shell {
    padding: 2rem 0.85rem;
  }

  .feature-band,
  .blue-band {
    padding: 1rem;
  }

  .card-body {
    padding: 0.78rem;
  }

  .mini-card {
    grid-template-columns: 5.5rem minmax(0, 1fr);
  }

  .mini-card img {
    width: 5.5rem;
    height: 4.3rem;
  }
}
