:root {
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --cyan: #06b6d4;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f8fafc;
  --line: #e5e7eb;
  --radius: 1rem;
}

body {
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.45), #ffffff 18rem, #f9fafb 100%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.header-inner,
.shell,
.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  border-radius: 999px;
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.28);
}

.brand-name,
.footer-brand {
  font-size: 1.35rem;
  background: linear-gradient(90deg, var(--brand), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  color: #374151;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: #f3f4f6;
}

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

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-nav.open {
  display: grid;
}

.hero-carousel {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: opacity 0.7s ease, visibility 0.7s ease, transform 4s ease;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.18)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.12) 52%, rgba(2, 6, 23, 0.34));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 32px));
  margin-left: max(16px, calc((100vw - 1280px) / 2 + 16px));
  padding: 120px 0 170px;
  color: #ffffff;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #60a5fa;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-kicker span {
  color: #22d3ee;
}

.hero-content h1,
.hero-content h2 {
  margin-top: 18px;
  font-size: clamp(2.4rem, 7vw, 5.6rem);
  line-height: 1.03;
  letter-spacing: -0.06em;
  text-shadow: 0 22px 50px rgba(0, 0, 0, 0.38);
}

.hero-content p {
  max-width: 680px;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.85;
}

.hero-tags,
.movie-tags,
.detail-tags,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.tag-pill,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--brand);
  background: #dbeafe;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-tags .tag-pill {
  color: #eff6ff;
  background: rgba(37, 99, 235, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.hero-actions,
.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

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

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  box-shadow: 0 20px 38px rgba(37, 99, 235, 0.25);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover {
  transform: translateY(-2px);
}

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

.primary-btn.light {
  color: var(--brand);
  background: #ffffff;
}

.hero-controls {
  position: absolute;
  right: max(16px, calc((100vw - 1280px) / 2 + 16px));
  bottom: 126px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 1.8rem;
  line-height: 1;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.55);
}

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

.hero-thumbs {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 3;
  width: min(1280px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border-radius: 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.hero-thumb img {
  width: 56px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
}

.hero-thumb span {
  min-width: 0;
  font-weight: 800;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.section {
  padding: 76px 0;
}

.intro-section {
  padding-top: 44px;
}

.intro-copy {
  margin-top: 28px;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  border: 1px solid #dbeafe;
}

.intro-copy h2,
.section-head h2,
.page-hero h1,
.detail-content h1,
.prose-block h2,
.cta-box h2 {
  color: var(--ink);
  letter-spacing: -0.035em;
}

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

.intro-copy p,
.section-head p,
.page-hero p,
.cta-box p {
  margin-top: 10px;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-link {
  color: var(--brand);
  background: #eff6ff;
}

.search-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(191, 219, 254, 0.78);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 46px rgba(37, 99, 235, 0.09);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  min-height: 52px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.search-box input {
  width: 100%;
  outline: none;
  color: var(--ink);
}

.filter-chip {
  padding: 8px 14px;
  border-radius: 999px;
  color: #4b5563;
  background: #f3f4f6;
  font-weight: 700;
}

.filter-chip.active,
.filter-chip:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
}

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

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

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

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card-link:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.16);
}

.movie-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

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

.movie-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 48%);
  opacity: 0;
  transition: opacity 0.24s ease;
}

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

.movie-year,
.movie-play {
  position: absolute;
  z-index: 2;
}

.movie-year {
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 0.74rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.movie-play {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.76);
  opacity: 0;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.movie-card-link:hover .movie-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-info {
  padding: 16px;
}

.movie-tags {
  margin-bottom: 10px;
}

.movie-info h3 {
  min-height: 3.1em;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-info p {
  margin-top: 8px;
  min-height: 3.45em;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  margin-top: 12px;
  color: #9ca3af;
  font-size: 0.86rem;
}

.category-section {
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.95), rgba(236, 254, 255, 0.95));
}

.category-section.slim {
  padding-top: 32px;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 20px;
  border-radius: 24px;
  color: #ffffff;
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
  isolation: isolate;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.85), rgba(2, 6, 23, 0.18));
  transition: background 0.24s ease;
}

.category-card:hover::before {
  background: linear-gradient(0deg, rgba(37, 99, 235, 0.85), rgba(2, 6, 23, 0.18));
}

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

.category-card strong {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
}

.category-card p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.86rem;
  line-height: 1.55;
}

.category-preview + .category-preview {
  margin-top: 58px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 58px 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.rank-item:hover,
.rank-line:hover {
  background: #eff6ff;
}

.rank-num {
  color: var(--brand);
  font-weight: 900;
  font-size: 1.2rem;
}

.rank-item img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-title {
  min-width: 0;
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-type {
  color: var(--muted);
  font-size: 0.84rem;
}

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

.rank-line {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #eef2f7;
}

.rank-line span {
  color: var(--brand);
  font-weight: 900;
}

.rank-line strong {
  min-width: 0;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-line em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.86rem;
}

.final-cta {
  background: linear-gradient(135deg, var(--brand), var(--cyan));
}

.cta-box {
  text-align: center;
  color: #ffffff;
}

.cta-box h2,
.cta-box p {
  color: #ffffff;
  margin-left: auto;
  margin-right: auto;
}

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

.page-hero {
  padding: 74px 0 34px;
}

.page-hero h1 {
  margin-top: 12px;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
}

.page-hero .search-panel {
  margin-top: 28px;
}

.detail-main {
  padding-top: 22px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 0;
  color: #6b7280;
  font-size: 0.92rem;
}

.breadcrumb a:hover {
  color: var(--brand);
}

.player-section {
  padding-bottom: 34px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.34);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.player-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.38));
}

.player-box.is-playing .player-layer {
  display: none;
}

.player-icon {
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  border-radius: 999px;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
  font-size: 2.2rem;
}

.player-layer strong {
  font-size: 1.1rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  align-items: start;
}

.detail-poster {
  position: sticky;
  top: 96px;
  overflow: hidden;
  border-radius: 26px;
  background: #dbeafe;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.12);
}

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

.detail-content {
  padding: 30px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
}

.detail-content h1 {
  margin-top: 12px;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.12;
}

.one-line {
  margin-top: 18px;
  color: #374151;
  font-size: 1.12rem;
  line-height: 1.8;
}

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

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.detail-meta div {
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.detail-meta dt {
  color: #9ca3af;
  font-size: 0.82rem;
}

.detail-meta dd {
  margin-top: 6px;
  color: var(--ink);
  font-weight: 800;
}

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

.prose-block {
  margin-top: 28px;
}

.prose-block h2 {
  font-size: 1.45rem;
}

.prose-block p {
  margin-top: 12px;
  color: #4b5563;
  line-height: 2;
}

.site-footer {
  margin-top: 40px;
  padding: 54px 0 30px;
  background: #ffffff;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: start;
}

.footer-inner p {
  max-width: 620px;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.8;
}

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

.footer-links a {
  padding: 9px 14px;
  border-radius: 999px;
  color: #4b5563;
  background: #f3f4f6;
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--brand);
  background: #eff6ff;
}

.copyright {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
  color: #9ca3af;
  font-size: 0.9rem;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 46px;
  height: 46px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.25);
}

.back-top.show {
  display: flex;
}

.is-hidden {
  display: none !important;
}

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

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

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

  .detail-layout {
    grid-template-columns: 260px 1fr;
  }
}

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

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

  .header-inner {
    height: 64px;
  }

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

  .hero-content {
    margin: 0 auto;
    padding: 96px 0 230px;
  }

  .hero-controls {
    left: 16px;
    right: auto;
    bottom: 164px;
  }

  .hero-thumbs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 128px;
    overflow: hidden;
  }

  .hero-thumb:nth-child(n+5) {
    display: none;
  }

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

  .rank-item {
    grid-template-columns: 38px 52px 1fr;
  }

  .rank-type {
    display: none;
  }

  .rank-line {
    grid-template-columns: 74px 1fr;
  }

  .rank-line em {
    display: none;
  }

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

  .section-head,
  .footer-inner {
    display: grid;
  }

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

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

@media (max-width: 560px) {
  .shell,
  .header-inner,
  .footer-inner,
  .copyright {
    width: min(100% - 24px, 1280px);
  }

  .brand-name {
    font-size: 1.1rem;
  }

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

  .hero-actions {
    display: grid;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .movie-grid,
  .compact-grid,
  .mini-grid,
  .category-grid,
  .rank-grid {
    grid-template-columns: 1fr;
  }

  .hero-thumbs {
    display: none;
  }

  .hero-controls {
    bottom: 44px;
  }

  .section {
    padding: 54px 0;
  }

  .detail-content {
    padding: 22px;
  }

  .detail-meta {
    grid-template-columns: 1fr;
  }
}
