
:root {
  --primary-900: #4c1d95;
  --primary-800: #5b21b6;
  --primary-700: #6d28d9;
  --primary-600: #7c3aed;
  --primary-500: #8b5cf6;
  --accent-500: #f97316;
  --accent-400: #fb923c;
  --bg: #f8fafc;
  --text: #111827;
  --muted: #6b7280;
  --soft: #eef2ff;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(88, 28, 135, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 38%, #f8fafc 100%);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--primary-900), var(--primary-700), var(--primary-600));
  box-shadow: 0 12px 32px rgba(76, 29, 149, 0.26);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

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

.brand-text strong {
  font-size: 1.28rem;
  letter-spacing: 0.04em;
}

.brand-text small {
  color: #ddd6fe;
  font-size: 0.76rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: #fff;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-nav-link {
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.hero-carousel {
  position: relative;
  min-height: 76vh;
  overflow: hidden;
  background: #111827;
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.75s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: radial-gradient(circle at top left, #7c3aed, #111827 70%);
}

.hero-shade,
.detail-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0.6) 38%, rgba(17, 24, 39, 0.18) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.92) 0%, rgba(17, 24, 39, 0.04) 48%, rgba(17, 24, 39, 0.18) 100%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 88px;
}

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

.hero-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: #ede9fe;
}

.hero-kicker span,
.hero-kicker b,
.hero-kicker em {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(14px);
  font-style: normal;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(2.5rem, 8vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.hero-copy p {
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: clamp(1rem, 2vw, 1.22rem);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--primary-800);
  background: #ede9fe;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-button,
.ghost-button,
.quick-search-form button,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  min-height: 48px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.quick-search-form button,
.play-button {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
  box-shadow: 0 14px 30px rgba(124, 58, 237, 0.32);
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.primary-button:hover,
.ghost-button:hover,
.quick-search-form button:hover,
.play-button:hover {
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 48px;
  height: 58px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  font-size: 2rem;
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

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

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

.quick-search,
.filter-panel {
  margin-top: 34px;
  padding: 24px;
  border-radius: 28px;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 0.8fr);
  gap: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.quick-search h2,
.section-title h2,
.rank-copy h2,
.page-hero h1,
.detail-article h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.quick-search p,
.page-hero p,
.rank-copy p,
.detail-article p,
.category-overview-card p {
  color: var(--muted);
}

.quick-search-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.quick-search-form input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
  background: #fff;
}

.quick-search-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.section-block {
  padding: 54px 0 12px;
}

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

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

.section-title a {
  color: var(--primary-700);
  font-weight: 800;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  border-radius: 24px;
  overflow: hidden;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background: var(--primary-900);
  box-shadow: var(--shadow);
}

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

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.08));
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 1;
}

.category-card span {
  font-size: 1.24rem;
  font-weight: 900;
}

.category-card p {
  margin: 8px 0 0;
  color: #e5e7eb;
  font-size: 0.9rem;
}

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

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

.movie-card {
  border-radius: 22px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.09);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, #c4b5fd, #111827 75%);
}

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

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

.score,
.rank-badge {
  position: absolute;
  top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 30px;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: rgba(17, 24, 39, 0.75);
  backdrop-filter: blur(10px);
}

.score {
  right: 10px;
}

.rank-badge {
  left: 10px;
  background: linear-gradient(135deg, var(--accent-500), var(--primary-600));
}

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

.movie-card-body h2 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  line-height: 1.35;
}

.meta-line {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

.card-summary {
  margin: 0 0 12px;
  color: #4b5563;
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-feature {
  margin-top: 54px;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 28px;
  padding: 34px;
  border-radius: 30px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-900), var(--primary-700) 52%, #fb923c);
  box-shadow: var(--shadow);
}

.rank-copy span {
  color: #fde68a;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.rank-copy h2 {
  margin-top: 8px;
  font-size: clamp(2rem, 5vw, 3.8rem);
}

.rank-copy p {
  color: #ede9fe;
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 38px 58px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.rank-row img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.rank-number {
  color: #fde68a;
  font-size: 1.25rem;
  font-weight: 900;
  text-align: center;
}

.rank-info {
  display: flex;
  flex-direction: column;
}

.rank-info small {
  color: #ddd6fe;
}

.rank-row em {
  font-style: normal;
  font-weight: 900;
  color: #fff;
}

.page-hero {
  padding: 58px 0 16px;
}

.page-hero span {
  color: var(--primary-700);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.page-hero h1 {
  margin-top: 8px;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
}

.page-hero p {
  width: min(760px, 100%);
  font-size: 1.06rem;
}

.filter-panel {
  grid-template-columns: 1fr 210px;
  margin-top: 10px;
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--shadow);
}

.category-cover {
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  background: var(--primary-900);
}

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

.category-overview-card h2 {
  margin: 0;
  font-size: 1.4rem;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-samples a {
  color: var(--primary-700);
  font-weight: 700;
}

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

.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(5px) saturate(1.08);
  transform: scale(1.04);
  opacity: 0.55;
}

.detail-intro {
  position: relative;
  z-index: 1;
  color: #fff;
  padding: 36px 0 58px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  color: #ddd6fe;
}

.breadcrumb em {
  color: #fff;
  font-style: normal;
}

.detail-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
  background: #111827;
}

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

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 20px;
  color: #e5e7eb;
  font-size: 1.12rem;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.player-section {
  margin-top: -76px;
  position: relative;
  z-index: 4;
}

.player-box {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: #050816;
  box-shadow: 0 28px 70px rgba(17, 24, 39, 0.28);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #050816;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.16), rgba(0, 0, 0, 0.54));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  min-width: 150px;
  min-height: 56px;
  border-radius: 999px;
  font-size: 1.05rem;
}

.detail-article {
  padding: 42px 0 10px;
}

.detail-article h2 {
  margin-top: 22px;
  font-size: 1.7rem;
}

.detail-article p {
  max-width: 900px;
  font-size: 1.05rem;
}

.site-footer {
  margin-top: 68px;
  padding: 52px 0 26px;
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 28px;
}

.footer-brand {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 900;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 1rem;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #d1d5db;
}

.copyright {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #9ca3af;
  font-size: 0.92rem;
}

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

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

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

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

  .hero-control {
    display: none;
  }

  .quick-search,
  .filter-panel,
  .rank-feature,
  .detail-grid,
  .footer-grid,
  .category-overview-grid,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    width: min(280px, 70vw);
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .site-nav {
    min-height: 64px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-text strong {
    font-size: 1.05rem;
  }

  .brand-text small {
    display: none;
  }

  .hero-carousel {
    min-height: 72vh;
  }

  .hero-content {
    padding-bottom: 74px;
  }

  .hero-actions,
  .quick-search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .category-grid,
  .movie-grid,
  .movie-grid.compact {
    gap: 14px;
  }

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

  .card-summary,
  .tag-list {
    display: none;
  }

  .rank-row {
    grid-template-columns: 30px 46px 1fr auto;
    gap: 10px;
  }

  .rank-row img {
    width: 46px;
    height: 62px;
  }

  .detail-hero {
    min-height: 560px;
  }

  .detail-intro {
    padding-top: 24px;
  }

  .player-section {
    margin-top: -48px;
  }
}
