:root {
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #dc2626;
  --brand-dark: #991b1b;
  --accent: #f97316;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  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(--text);
  background: var(--bg);
}

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

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

button,
input,
select {
  font: inherit;
}

.container,
.nav-bar,
.hero-inner,
.footer-inner,
.detail-inner,
.page-banner-inner,
.feature-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0f172a, #1e293b 50%, #0f172a);
  color: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.35);
}

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

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 12px 26px rgba(220, 38, 38, 0.35);
}

.brand-name {
  font-size: 21px;
  background: linear-gradient(90deg, #f87171, #fb923c);
  -webkit-background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 16px;
  border-radius: 12px;
  color: #cbd5e1;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: var(--brand);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #0f172a 0%, #7f1d1d 55%, #0f172a 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.2) 0 2px, transparent 2px), radial-gradient(circle at 80% 40%, rgba(249, 115, 22, 0.2) 0 2px, transparent 2px);
  background-size: 56px 56px, 70px 70px;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 48px;
  align-items: center;
  min-height: 640px;
  padding: 72px 0;
}

.hero-copy {
  display: grid;
  gap: 24px;
}

.eyebrow,
.hero-slide-kicker,
.page-banner span {
  display: inline-flex;
  width: max-content;
  align-items: center;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fecaca;
  font-size: 14px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h1 span {
  color: #f87171;
}

.hero-copy p {
  margin: 0;
  color: #d1d5db;
  font-size: 19px;
  line-height: 1.8;
}

.hero-actions,
.hero-category-pills,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.ghost-button,
.hero-slide-content a,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  transition: 0.2s ease;
}

.primary-button,
.hero-slide-content a {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 16px 30px rgba(220, 38, 38, 0.28);
}

.primary-button:hover,
.hero-slide-content a:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

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

.hero-category-pills a,
.detail-tags span,
.card-tags span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fee2e2;
  font-size: 13px;
}

.hero-showcase {
  position: relative;
  min-height: 500px;
}

.hero-glow {
  position: absolute;
  inset: 30px;
  border-radius: 36px;
  background: rgba(239, 68, 68, 0.24);
  filter: blur(44px);
}

.hero-slider {
  position: relative;
  height: 500px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.08);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: end;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.55s ease, transform 0.55s ease;
  background-image: linear-gradient(0deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.18) 55%, rgba(15, 23, 42, 0.05)), var(--hero-image);
  background-position: center;
  background-size: cover;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-slide-content {
  display: grid;
  gap: 14px;
  padding: 34px;
  max-width: 560px;
}

.hero-slide h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
}

.hero-slide p {
  margin: 0;
  color: #e5e7eb;
  line-height: 1.7;
}

.hero-dots {
  position: absolute;
  left: 34px;
  bottom: 18px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 26px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #fff;
}

.feature-strip {
  background: #fff;
  padding: 36px 0;
}

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

.feature-grid article {
  padding: 24px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
  transition: 0.2s ease;
}

.feature-grid article:hover {
  transform: translateY(-4px);
  background: #fef2f2;
}

.feature-grid span {
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fee2e2;
  color: var(--brand);
  font-size: 22px;
}

.feature-grid h2,
.feature-grid p {
  margin: 14px 0 0;
}

.feature-grid h2 {
  font-size: 18px;
}

.feature-grid p {
  color: var(--muted);
  line-height: 1.6;
}

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

.light-section {
  background: #f8fafc;
}

.dark-section {
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.hot-section {
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #f97316);
}

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

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.1;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.dark-section .section-head p,
.hot-section .section-head p {
  color: rgba(255, 255, 255, 0.72);
}

.section-more {
  color: var(--brand);
  background: #fee2e2;
}

.hot-section .section-more,
.dark-section .section-more {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.movie-grid {
  display: grid;
  gap: 18px;
}

.home-grid,
.hot-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  transition: 0.2s ease;
}

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

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

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

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

.rating-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 42px;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  transition: 0.2s ease;
}

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

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

.movie-card-body h3 {
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  font-size: 15px;
  line-height: 1.4;
}

.movie-card-body p {
  margin: 7px 0 12px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  color: var(--muted);
  font-size: 12px;
}

.card-tags span {
  background: #f1f5f9;
  color: #475569;
  padding: 5px 8px;
}

.hot-section .movie-card,
.dark-section .movie-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.hot-section .movie-card-body p,
.dark-section .movie-card-body p {
  color: rgba(255, 255, 255, 0.72);
}

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

.category-tile {
  display: grid;
  gap: 10px;
  min-height: 180px;
  padding: 26px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.16);
}

.category-tile span {
  font-size: 38px;
}

.category-tile strong {
  font-size: 20px;
}

.category-tile em {
  color: rgba(255, 255, 255, 0.72);
  font-style: normal;
  line-height: 1.6;
}

.page-banner {
  color: #fff;
  background: linear-gradient(120deg, #0f172a, #7f1d1d 70%, #0f172a);
}

.page-banner-inner {
  padding: 72px 0;
}

.page-banner h1 {
  margin: 18px 0 12px;
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1.1;
}

.page-banner p {
  max-width: 780px;
  margin: 0;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.search-box input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.filter-panel select {
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.empty-state {
  display: none;
  margin: 28px 0 0;
  padding: 24px;
  border-radius: 18px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.empty-state.show {
  display: block;
}

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

.category-card-large {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
  transition: 0.2s ease;
}

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

.category-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 150px;
  background: #e2e8f0;
}

.category-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card-content {
  padding: 22px;
}

.category-card-content span {
  font-size: 34px;
}

.category-card-content h2 {
  margin: 12px 0 8px;
}

.category-card-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.ranking-panel {
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.ranking-panel h2 {
  margin: 0;
  padding: 22px 24px;
  color: #fff;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.ranking-list {
  display: grid;
}

.ranking-row {
  display: grid;
  grid-template-columns: 44px 58px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  transition: 0.2s ease;
}

.ranking-row:hover {
  background: #fef2f2;
}

.rank-num {
  font-weight: 900;
  color: #94a3b8;
  font-size: 20px;
}

.rank-num.top-rank {
  color: var(--brand);
}

.ranking-row img {
  width: 58px;
  height: 78px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-info {
  min-width: 0;
}

.rank-info strong,
.rank-info em {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-info em {
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.rank-play {
  color: var(--brand);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #0f172a;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  filter: blur(16px);
  transform: scale(1.08);
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.7)), var(--detail-image);
  background-size: cover;
  background-position: center;
}

.detail-inner {
  position: relative;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 72px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: #fecaca;
}

.detail-copy h1 {
  margin: 20px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

.detail-copy p {
  max-width: 820px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 14px;
}

.detail-tags {
  margin: 18px 0 26px;
}

.player-section {
  padding: 58px 0;
  background: #020617;
  color: #fff;
}

.player-section h2 {
  margin: 0 0 22px;
  font-size: clamp(26px, 4vw, 36px);
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  cursor: pointer;
  transition: 0.2s ease;
}

.player-overlay span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: var(--brand);
  font-size: 36px;
  padding-left: 5px;
  box-shadow: 0 20px 44px rgba(220, 38, 38, 0.4);
}

.player-overlay:hover {
  background: rgba(0, 0, 0, 0.12);
}

.video-shell.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.detail-article,
.detail-side {
  border-radius: 24px;
  background: #fff;
  padding: 28px;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 14px;
}

.detail-article p {
  margin: 0 0 24px;
  color: #334155;
  line-height: 1.9;
  font-size: 17px;
}

.detail-side dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.detail-side dt {
  color: var(--muted);
  font-size: 13px;
}

.detail-side dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.detail-side a {
  color: var(--brand);
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
  gap: 32px;
  padding: 52px 0;
}

.footer-logo {
  color: #fff;
  font-size: 20px;
}

.footer-brand p,
.footer-column p,
.footer-column a {
  color: #94a3b8;
  line-height: 1.7;
}

.footer-column h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 17px;
}

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

.footer-column a:hover {
  color: #f87171;
}

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

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

@media (max-width: 860px) {
  .mobile-menu-button {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 18px;
    background: #0f172a;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

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

  .hero-inner {
    min-height: auto;
  }

  .hero-showcase {
    min-height: 420px;
  }

  .hero-slider {
    height: 420px;
  }

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

  .detail-poster {
    max-width: 260px;
  }
}

@media (max-width: 640px) {
  .container,
  .nav-bar,
  .hero-inner,
  .footer-inner,
  .detail-inner,
  .page-banner-inner,
  .feature-grid {
    width: min(100% - 24px, 1180px);
  }

  .home-grid,
  .hot-grid,
  .listing-grid,
  .category-large-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .hero-inner,
  .page-banner-inner,
  .detail-inner {
    padding: 48px 0;
  }

  .hero-showcase,
  .hero-slider {
    height: 360px;
    min-height: 360px;
  }

  .hero-slide-content {
    padding: 22px;
  }

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

  .section-head {
    display: grid;
  }

  .movie-card-body {
    padding: 11px;
  }

  .ranking-row {
    grid-template-columns: 34px 50px minmax(0, 1fr) 24px;
    padding: 12px;
  }

  .ranking-row img {
    width: 50px;
    height: 68px;
  }
}
