* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.22), transparent 32rem),
    linear-gradient(180deg, #0f172a 0%, #111827 52%, #1e293b 100%);
  color: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

.glass-effect {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(16px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(18px);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #ef4444, #ec4899);
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.36);
  font-size: 14px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 14px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

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

.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;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.66) 40%, rgba(15, 23, 42, 0.2) 100%),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.16) 55%, rgba(15, 23, 42, 0.32) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  max-width: 1280px;
}

.hero-chip,
.heading-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
  font-size: 13px;
  font-weight: 700;
}

.heading-kicker {
  width: 42px;
  height: 6px;
  padding: 0;
  border-radius: 999px;
  background: #ef4444;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 14px;
  max-width: 760px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.06em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.hero-content p,
.page-hero p,
.detail-copy p {
  max-width: 720px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.09);
  font-size: 13px;
}

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

.primary-button,
.ghost-button,
.section-more,
.category-overview-head a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #ec4899);
  box-shadow: 0 16px 34px rgba(239, 68, 68, 0.34);
}

.ghost-button,
.section-more,
.category-overview-head a {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.category-overview-head a:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-size: 38px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

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

.page-main {
  padding-top: 32px;
}

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

.section-heading h2 {
  margin: 12px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 0;
  color: #cbd5e1;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 28px;
  padding: 16px;
  border-radius: 22px;
}

.search-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  outline: 0;
  color: #fff;
  background: rgba(15, 23, 42, 0.62);
  padding: 0 16px;
}

.search-input::placeholder {
  color: #94a3b8;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.filter-pill {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.1);
}

.filter-pill.active,
.filter-pill:hover {
  color: #fff;
  background: rgba(239, 68, 68, 0.82);
}

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

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

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

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

.poster-link {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 38px rgba(2, 6, 23, 0.34);
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  opacity: 0;
  backdrop-filter: blur(12px);
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.poster-link:hover .poster-shade,
.poster-link:hover .play-badge {
  opacity: 1;
}

.poster-link:hover .play-badge {
  transform: translate(-50%, -50%) scale(1);
}

.movie-info {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.movie-info strong {
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-meta,
.movie-line,
.ranking-info em,
.compact-card em {
  overflow: hidden;
  color: #94a3b8;
  font-size: 13px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-line {
  display: -webkit-box;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.55;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

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

.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 24px;
}

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

.category-card span {
  position: absolute;
  inset: auto 16px 16px;
  display: grid;
  gap: 8px;
}

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

.category-card em,
.category-overview-card p,
.footer-grid p {
  color: #cbd5e1;
  font-style: normal;
  line-height: 1.7;
}

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

.ranking-board,
.ranking-list {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
}

.rank-row,
.ranking-card a {
  display: grid;
  align-items: center;
  gap: 14px;
  border-radius: 18px;
  color: #e2e8f0;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.rank-row {
  grid-template-columns: 48px 92px minmax(0, 1fr) 56px;
  padding: 10px;
}

.rank-row:hover,
.ranking-card a:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}

.rank-num,
.ranking-number {
  color: #fb7185;
  font-weight: 900;
}

.rank-row img,
.ranking-card img {
  width: 92px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
}

.rank-copy,
.ranking-info {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.rank-copy strong,
.ranking-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score,
.ranking-card b {
  color: #facc15;
  font-weight: 900;
  text-align: right;
}

.page-hero {
  margin: 32px 0;
  padding: 34px;
  border-radius: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
  color: #94a3b8;
  font-size: 14px;
}

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

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

.category-overview-card {
  padding: 22px;
  border-radius: 24px;
}

.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.category-overview-head span {
  font-size: 24px;
  font-weight: 900;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.45);
}

.compact-card img {
  width: 92px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  object-fit: cover;
}

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

.compact-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-list {
  padding: 0;
}

.ranking-card a {
  grid-template-columns: 64px 150px minmax(0, 1fr) 58px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.ranking-card img {
  width: 150px;
}

.ranking-info span {
  display: -webkit-box;
  overflow: hidden;
  color: #cbd5e1;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.detail-hero {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  margin: 30px 0;
  padding: 24px;
  border-radius: 30px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.detail-tags {
  margin-top: 14px;
}

.player-section {
  margin: 28px 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.75), rgba(2, 6, 23, 0.2));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-shell.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-play {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444, #ec4899);
  box-shadow: 0 18px 42px rgba(239, 68, 68, 0.4);
  font-size: 30px;
}

.player-cover strong {
  font-size: 24px;
}

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

.detail-article,
.detail-side {
  padding: 26px;
  border-radius: 24px;
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-article p {
  margin: 0 0 24px;
  color: #dbeafe;
  line-height: 1.9;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px 14px;
  margin: 0;
}

.detail-side dt {
  color: #94a3b8;
}

.detail-side dd {
  margin: 0;
  color: #fff;
}

.site-footer {
  margin-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(2, 6, 23, 0.28);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 36px;
  padding: 34px 0 22px;
}

.footer-grid p {
  max-width: 620px;
  margin: 12px 0 0;
}

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

.footer-links a {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.footer-bottom {
  padding: 18px 0 30px;
  color: #94a3b8;
  font-size: 14px;
}

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

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

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

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

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

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.96);
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero {
    height: 68vh;
    min-height: 520px;
  }

  .hero-content {
    bottom: 76px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 42px;
  }

  .hero-arrow {
    display: none;
  }

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

  .filter-pills {
    justify-content: flex-start;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .category-movie-grid,
  .category-grid,
  .category-overview-grid,
  .compact-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading,
  .footer-grid,
  .category-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .ranking-card a {
    grid-template-columns: 42px 96px minmax(0, 1fr);
  }

  .ranking-card b {
    display: none;
  }

  .rank-row {
    grid-template-columns: 36px 72px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }

  .rank-row img,
  .compact-card img {
    width: 72px;
  }

  .compact-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .page-hero,
  .detail-hero,
  .detail-article,
  .detail-side {
    padding: 20px;
  }

  .player-play {
    width: 68px;
    height: 68px;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .featured-grid,
  .compact-grid,
  .category-movie-grid,
  .category-grid,
  .category-overview-grid,
  .compact-list {
    grid-template-columns: 1fr;
  }

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