:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --cyan: #06b6d4;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.18);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 68px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  color: #fff;
  font-size: 14px;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

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

.nav-link,
.mobile-nav-link {
  color: rgba(255, 255, 255, 0.78);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 15px;
  transition: color 0.2s ease, background 0.2s ease;
}

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

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

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 20px 18px;
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-slide img {
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.05));
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: min(1120px, calc(100% - 40px));
  transform: translate(-50%, -50%);
  color: #fff;
}

.hero-content h1 {
  max-width: 760px;
  margin: 16px 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 19px;
  line-height: 1.7;
}

.hero-kicker,
.detail-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #d1d5db;
}

.hero-meta span,
.detail-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
}

.hero-meta span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after,
.movie-meta span:not(:last-child)::after {
  content: "";
  width: 4px;
  height: 4px;
  margin-left: 10px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
}

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

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

.primary-button,
.search-form button {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.32);
}

.primary-button:hover,
.search-form button:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

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

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

.hero-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 18px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.search-panel,
.filter-bar,
.content-section,
.detail-hero,
.detail-content,
.player-section,
.breadcrumb {
  width: min(1200px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
}

.home-search {
  margin-top: -42px;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr minmax(300px, 420px);
  gap: 24px;
  align-items: center;
  padding: 26px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.search-panel h2,
.search-panel p {
  margin: 0;
}

.search-panel h2 {
  font-size: 26px;
}

.search-panel p {
  margin-top: 8px;
  color: var(--muted);
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-form input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 15px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  outline: none;
}

.search-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

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

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.03em;
}

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

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

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

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

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

.movie-card {
  overflow: hidden;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.16);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

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

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

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

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

.poster-type {
  position: absolute;
  z-index: 2;
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.poster-play {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%) scale(0.78);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

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

.movie-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h2 a:hover,
.ranking-body h2 a:hover,
.category-large-card a:hover h2 {
  color: var(--brand);
}

.movie-card p {
  min-height: 44px;
  margin: 10px 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  color: #6b7280;
  font-size: 12px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-list span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  line-height: 1;
}

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

.category-card,
.category-large-card a {
  display: block;
  min-height: 180px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff, #eff6ff);
  border: 1px solid #dbeafe;
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card span,
.category-large-card h2 {
  display: block;
  margin: 0 0 10px;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
}

.category-card p,
.category-large-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.category-card-links {
  display: grid;
  gap: 4px;
  margin-top: 16px;
  color: var(--brand);
  font-size: 13px;
}

.ranking-section {
  padding-top: 48px;
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.ranking-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 112px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
}

.rank-number {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  color: #fff;
  font-weight: 900;
}

.ranking-poster {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

.ranking-poster img {
  height: 100%;
  object-fit: cover;
}

.ranking-body h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.ranking-body p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

.page-main {
  padding-bottom: 40px;
}

.page-hero {
  min-height: 300px;
  display: flex;
  align-items: center;
  background: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.38), transparent 34%), linear-gradient(135deg, #0f172a, #1e3a8a 55%, #0891b2);
  color: #fff;
}

.page-hero > div {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: 70px 0;
}

.page-hero h1 {
  max-width: 760px;
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.75;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 220px 220px;
  gap: 12px;
  margin-top: 30px;
  padding: 18px;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--soft-shadow);
}

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

.category-large-card ul {
  margin: 18px 0;
  padding-left: 18px;
  color: var(--brand);
  line-height: 1.9;
}

.category-large-card span {
  color: var(--brand);
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-top: 26px;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  align-items: center;
  padding: 30px;
  background: #fff;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  background: #0f172a;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.24);
}

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

.detail-info h1 {
  margin: 18px 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-line {
  max-width: 760px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.detail-meta {
  color: #475569;
  margin-bottom: 6px;
}

.detail-tags {
  margin-bottom: 24px;
}

.player-section {
  margin-top: 34px;
  padding: 28px;
  background: #fff;
  border-radius: 28px;
  box-shadow: var(--soft-shadow);
}

.player-section h2,
.detail-content h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.big-play {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand);
  font-size: 28px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 34px;
}

.detail-content article {
  padding: 28px;
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.detail-content article:first-child {
  grid-column: 1 / -1;
}

.detail-content p {
  margin: 0;
  color: #334155;
  font-size: 16px;
  line-height: 1.9;
}

.info-list {
  margin: 0;
  display: grid;
  gap: 12px;
}

.info-list div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

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

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

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

.movie-card-compact .movie-card-body {
  padding: 13px;
}

.movie-card-compact h2 {
  font-size: 15px;
}

.movie-card-compact p {
  font-size: 12px;
}

.site-footer {
  margin-top: 50px;
  background: #0f172a;
  color: #94a3b8;
}

.footer-inner {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 34px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}

.footer-brand {
  color: #fff;
  margin-bottom: 16px;
}

.footer-about p {
  margin: 0;
  max-width: 520px;
  line-height: 1.75;
}

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

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

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

.footer-bottom {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 14px;
}

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

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

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

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

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

  .menu-button {
    display: block;
  }

  .hero {
    height: 560px;
  }

  .hero-arrow {
    display: none;
  }

  .home-search,
  .filter-bar,
  .detail-hero,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .ranking-card {
    grid-template-columns: auto 92px 1fr;
  }

  .detail-hero {
    padding: 22px;
  }

  .detail-cover {
    max-width: 300px;
  }
}

@media (max-width: 560px) {
  .header-inner {
    min-height: 62px;
    padding: 0 14px;
  }

  .brand {
    font-size: 19px;
  }

  .hero {
    height: 540px;
  }

  .hero-content {
    width: calc(100% - 28px);
  }

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

  .search-panel,
  .filter-bar,
  .content-section,
  .detail-hero,
  .detail-content,
  .player-section,
  .breadcrumb {
    width: calc(100% - 28px);
  }

  .home-search {
    margin-top: 18px;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

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

  .movie-grid,
  .all-grid,
  .related-grid,
  .category-grid,
  .category-large-grid {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    grid-template-columns: 1fr;
  }

  .rank-number {
    position: absolute;
    left: 12px;
    top: 12px;
    z-index: 2;
  }

  .ranking-poster {
    width: 100%;
    max-width: 220px;
  }

  .detail-content article {
    padding: 22px;
  }
}
