:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-400: #38bdf8;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-800: #075985;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.12);
  --shadow-deep: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  color: var(--gray-900);
  background: var(--gray-50);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.08);
}

.nav-wrap {
  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-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--gray-900);
  transition: color 0.2s ease;
}

.brand:hover,
.footer-brand:hover {
  color: var(--primary-700);
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.78rem;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  box-shadow: 0 10px 22px rgba(2, 132, 199, 0.3);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  font-weight: 650;
  color: var(--gray-700);
  white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a,
.site-footer a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover {
  color: var(--primary-600);
}

.nav-toggle {
  display: none;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  padding: 0.35rem;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--gray-700);
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--gray-200);
  background: #fff;
}

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 1rem;
}

main {
  padding-top: 4rem;
}

.container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.hero {
  position: relative;
  min-height: 42rem;
  overflow: hidden;
  color: #fff;
  background: var(--gray-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.12)), var(--bg);
  background-size: cover;
  background-position: center;
}

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

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 6rem 1rem 5rem;
}

.hero-copy {
  max-width: 45rem;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.82rem;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.88);
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.32);
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
}

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

.hero p {
  max-width: 42rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  margin: 0 0 1.45rem;
}

.hero-meta,
.meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-meta span,
.meta-line span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.83rem;
}

.hero-meta span {
  padding: 0.38rem 0.82rem;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.btn-primary,
.btn-ghost,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.82rem 1.3rem;
  border-radius: 0.75rem;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: var(--primary-600);
  box-shadow: 0 14px 30px rgba(2, 132, 199, 0.3);
}

.btn-primary:hover,
.btn-light:hover {
  transform: translateY(-2px) scale(1.02);
  background: var(--primary-700);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.25);
}

.btn-light {
  color: #fff;
  background: var(--primary-600);
}

.hero-controls {
  position: absolute;
  right: max(1rem, calc((100vw - 80rem) / 2 + 1rem));
  bottom: 2rem;
  z-index: 3;
  display: flex;
  gap: 0.75rem;
}

.hero-controls button {
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background 0.2s ease;
}

.hero-controls button:hover {
  background: rgba(255, 255, 255, 0.32);
}

.hero-strip {
  position: relative;
  z-index: 4;
  margin-top: -5rem;
  padding-bottom: 2.5rem;
}

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

.hero-mini-card {
  display: flex;
  gap: 0.8rem;
  min-height: 7rem;
  padding: 0.8rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-mini-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-deep);
}

.hero-mini-card img,
.hero-mini-card .poster-fallback {
  width: 7.5rem;
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
  border-radius: 0.8rem;
  object-fit: cover;
}

.hero-mini-card h2 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  line-height: 1.35;
}

.hero-mini-card p {
  margin: 0;
  color: var(--gray-600);
  font-size: 0.86rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.section-block {
  padding: 4rem 0;
}

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

.section-title h1,
.section-title h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-title p {
  margin: 0;
  color: var(--gray-600);
}

.more-link {
  color: var(--primary-600);
  font-weight: 800;
  white-space: nowrap;
}

.more-link:hover {
  color: var(--primary-700);
}

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

.movie-card {
  overflow: hidden;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link,
.rank-cover,
.detail-cover,
.player-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-50), #dbeafe);
}

.poster-link {
  aspect-ratio: 16 / 9;
}

.poster-link img,
.rank-cover img,
.detail-cover img,
.player-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.2s ease;
}

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

.poster-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 20%, rgba(56, 189, 248, 0.5), transparent 34%),
    linear-gradient(135deg, #0f172a, #0284c7 46%, #082f49);
}

img.image-hidden {
  opacity: 0;
}

.play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2.2rem;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  transition: opacity 0.25s ease, background 0.25s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  background: rgba(0, 0, 0, 0.38);
}

.movie-card-body {
  padding: 1rem;
}

.movie-card-body h2 {
  margin: 0.5rem 0 0.35rem;
  font-size: 1.1rem;
  line-height: 1.35;
  font-weight: 850;
}

.movie-card-body h2 a:hover,
.rank-content h2 a:hover,
.related-card h2 a:hover {
  color: var(--primary-600);
}

.movie-card-body p {
  margin: 0;
  color: var(--gray-600);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.meta-line span {
  padding: 0.18rem 0.55rem;
  color: var(--gray-600);
  background: var(--gray-100);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.tag-list span {
  padding: 0.25rem 0.58rem;
  color: var(--primary-700);
  background: var(--primary-50);
}

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

.category-card {
  min-height: 12rem;
  padding: 1.35rem;
  border-radius: 1.2rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  box-shadow: 0 16px 34px rgba(2, 132, 199, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h2 {
  margin: 0 0 0.6rem;
  font-size: 1.45rem;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}

.category-card span {
  display: inline-flex;
  margin-top: 1rem;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 4rem 10rem 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.rank-number {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: var(--primary-600);
  font-weight: 900;
}

.rank-cover {
  aspect-ratio: 16 / 9;
  border-radius: 0.8rem;
}

.rank-content h2 {
  margin: 0 0 0.3rem;
  font-size: 1.25rem;
}

.rank-content p {
  margin: 0 0 0.6rem;
  color: var(--gray-600);
}

.page-hero {
  padding: 5rem 0 3rem;
  color: #fff;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.35), transparent 30%),
    linear-gradient(135deg, #0f172a, #075985);
}

.page-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 48rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.08rem;
}

.tool-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  margin: 2rem 0;
  padding: 1rem;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.search-input {
  flex: 1 1 18rem;
  min-height: 3rem;
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  padding: 0 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.14);
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  color: var(--gray-700);
  background: var(--gray-100);
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: #fff;
  background: var(--primary-600);
}

.detail-hero {
  color: #fff;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.18)),
    var(--detail-bg),
    linear-gradient(135deg, #0f172a, #075985);
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 4rem 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: 2rem;
  align-items: center;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
}

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

.detail-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.detail-hero p {
  max-width: 48rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
}

.detail-cover {
  aspect-ratio: 16 / 9;
  border-radius: 1.2rem;
  box-shadow: var(--shadow-deep);
}

.player-section {
  padding: 3rem 0;
  background: #050b16;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.2rem;
  background: #000;
  box-shadow: var(--shadow-deep);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.58)),
    var(--player-bg);
  background-size: cover;
  background-position: center;
  border: 0;
  cursor: pointer;
}

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

.play-cover span {
  width: 5rem;
  height: 5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: var(--primary-600);
  font-size: 2rem;
  box-shadow: 0 18px 44px rgba(2, 132, 199, 0.42);
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-cover:hover span {
  transform: scale(1.08);
  background: var(--primary-700);
}

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

.content-card,
.side-card {
  border-radius: 1.2rem;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.content-card {
  padding: 2rem;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 1rem;
  font-size: 1.55rem;
  line-height: 1.25;
}

.content-card p {
  margin: 0 0 1.2rem;
  color: var(--gray-700);
  font-size: 1.02rem;
}

.side-card {
  padding: 1.2rem;
  align-self: start;
  position: sticky;
  top: 5rem;
}

.info-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.8rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-100);
}

.info-list dt {
  color: var(--gray-500);
}

.info-list dd {
  margin: 0;
  color: var(--gray-900);
  font-weight: 700;
}

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

.related-card {
  display: block;
  overflow: hidden;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.related-card .poster-link {
  border-radius: 0;
}

.related-card-body {
  padding: 0.85rem;
}

.related-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.related-card p {
  margin: 0;
  color: var(--gray-600);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.hidden-by-filter {
  display: none !important;
}

.site-footer {
  color: var(--gray-300, #d1d5db);
  background: var(--gray-900);
}

.footer-grid {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3rem 1rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.site-footer p {
  max-width: 36rem;
  color: var(--gray-400);
}

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

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
  color: var(--gray-400);
}

.footer-brand {
  color: #fff;
}

.footer-bottom {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--gray-500);
  text-align: center;
}

@media (max-width: 1100px) {
  .desktop-nav {
    gap: 1rem;
    font-size: 0.95rem;
  }

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

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

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

  .nav-toggle {
    display: block;
  }

  .hero {
    min-height: 36rem;
  }

  .hero-controls {
    right: 1rem;
    bottom: 1rem;
  }

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

  .rank-item {
    grid-template-columns: 3.2rem 7.5rem 1fr;
  }

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

  .side-card {
    position: static;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 33rem;
  }

  .hero-content {
    padding-top: 4.5rem;
  }

  .hero-strip {
    margin-top: -3rem;
  }

  .hero-strip-grid,
  .movie-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .rank-item {
    grid-template-columns: 3rem 1fr;
  }

  .rank-cover {
    display: none;
  }

  .content-card {
    padding: 1.3rem;
  }

  .detail-cover {
    display: none;
  }
}

.category-samples {
  display: grid;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.92rem;
}

.category-samples a {
  color: rgba(255, 255, 255, 0.88);
}

.category-samples a:hover {
  color: #fff;
}
