:root {
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-900: #1e3a8a;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --white: #ffffff;
  --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--slate-50), #ffffff 42%, var(--blue-50));
  color: var(--slate-900);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, var(--blue-600), var(--blue-700), var(--blue-800));
  box-shadow: 0 12px 28px rgba(30, 64, 175, 0.28);
}

.site-header-inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.logo-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

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

.nav-link,
.mobile-link {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
  border-radius: 999px;
  transition: 0.22s ease;
}

.nav-link {
  padding: 10px 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
}

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

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 16px;
}

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

.mobile-link {
  padding: 12px 14px;
}

.hero-carousel {
  position: relative;
  max-width: 1280px;
  margin: 28px auto 0;
  padding: 0 24px;
}

.hero-track {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  background: var(--slate-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.9s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-slide img {
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 35%, rgba(59, 130, 246, 0.2), transparent 30%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.68) 46%, rgba(15, 23, 42, 0.2));
}

.hero-content {
  position: absolute;
  inset: 0;
  max-width: 760px;
  padding: 76px 72px;
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-kicker,
.section-kicker,
.page-hero span,
.highlight-panel span {
  color: var(--blue-100);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 14px 0 10px;
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-content h2 {
  margin: 0 0 18px;
  font-size: clamp(26px, 4vw, 46px);
  line-height: 1.1;
  font-weight: 800;
}

.hero-content p {
  max-width: 640px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
}

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

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.22s ease;
}

.primary-button {
  background: var(--blue-600);
  color: var(--white);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.34);
}

.primary-button:hover {
  background: var(--blue-700);
  transform: translateY(-2px);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

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

.hero-controls {
  position: absolute;
  left: 48px;
  right: 48px;
  bottom: 132px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.hero-arrow,
.hero-dot {
  pointer-events: auto;
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-size: 34px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.26);
}

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

.hero-dot {
  width: 28px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.hero-dot.is-active {
  width: 42px;
  background: var(--white);
}

.hero-search-panel {
  position: relative;
  z-index: 6;
  max-width: 900px;
  margin: -76px auto 0;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-soft);
}

.hero-search-panel label,
.page-search label {
  display: block;
  margin-bottom: 10px;
  color: var(--slate-700);
  font-weight: 800;
}

.search-box {
  display: flex;
  gap: 12px;
}

.search-box input {
  min-width: 0;
  flex: 1;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  outline: 0;
  background: var(--white);
}

.search-box input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.search-box button {
  min-width: 76px;
  border: 0;
  border-radius: 14px;
  background: var(--slate-900);
  color: var(--white);
  font-weight: 800;
  cursor: pointer;
}

.quick-category-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.quick-category-grid a,
.category-tabs a {
  padding: 16px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: 0.22s ease;
}

.quick-category-grid a:hover,
.category-tabs a:hover {
  transform: translateY(-3px);
  color: var(--blue-700);
}

.quick-category-grid strong,
.quick-category-grid span {
  display: block;
}

.quick-category-grid strong {
  font-size: 16px;
  margin-bottom: 4px;
}

.quick-category-grid span {
  color: var(--slate-500);
  font-size: 13px;
}

.content-section,
.page-hero,
.watch-layout,
.category-tabs {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.content-section {
  margin-top: 52px;
}

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

.section-heading h2,
.page-hero h1,
.highlight-panel h2,
.detail-article h1 {
  margin: 8px 0 0;
  color: var(--slate-900);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: clamp(28px, 3vw, 42px);
}

.section-kicker {
  color: var(--blue-700);
}

.section-more {
  min-height: 42px;
  color: var(--blue-700);
  background: var(--blue-50);
}

.featured-grid,
.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue-900), var(--slate-900));
}

.movie-card-large .movie-poster {
  aspect-ratio: 16 / 11;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.72));
  opacity: 0.75;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%) scale(0.88);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  color: var(--blue-700);
  opacity: 0;
  transition: 0.22s ease;
}

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

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

.movie-card-body h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card-body h3 a:hover {
  color: var(--blue-700);
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 10px;
  color: var(--slate-500);
  font-size: 13px;
  font-weight: 700;
}

.movie-card-body p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--slate-700);
  font-size: 14px;
  line-height: 1.65;
}

.tag-row span,
.detail-tags span {
  padding: 6px 9px;
  background: var(--blue-50);
  color: var(--blue-700);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.7fr);
  gap: 28px;
  align-items: stretch;
}

.compact-heading {
  margin-bottom: 16px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: 0.22s ease;
}

.mini-card:hover {
  transform: translateX(4px);
  color: var(--blue-700);
}

.mini-card img {
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--slate-900);
}

.mini-card-text {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
  align-items: center;
}

.mini-card-text strong {
  color: #f97316;
  font-size: 18px;
}

.mini-card-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.mini-card-text em {
  grid-column: 2;
  color: var(--slate-500);
  font-size: 13px;
  font-style: normal;
}

.highlight-panel,
.page-hero,
.rank-top-card,
.side-panel,
.detail-article {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.highlight-panel {
  padding: 36px;
  background:
    radial-gradient(circle at 90% 8%, rgba(59, 130, 246, 0.26), transparent 34%),
    linear-gradient(135deg, var(--blue-900), var(--slate-900));
  color: var(--white);
}

.highlight-panel h2 {
  color: var(--white);
  font-size: clamp(28px, 4vw, 44px);
}

.highlight-panel p {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.8;
}

.page-hero {
  margin-top: 28px;
  padding-top: 54px;
  padding-bottom: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 32px;
  align-items: center;
  background:
    radial-gradient(circle at 84% 18%, rgba(59, 130, 246, 0.18), transparent 34%),
    linear-gradient(135deg, var(--white), var(--blue-50));
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
  margin: 16px 0 0;
  max-width: 680px;
  color: var(--slate-700);
  font-size: 18px;
  line-height: 1.8;
}

.category-tabs {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-tabs a {
  font-weight: 800;
}

.search-inline {
  max-width: 680px;
  margin-bottom: 24px;
}

.empty-state {
  display: none;
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--slate-500);
  font-weight: 800;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.empty-state.is-visible {
  display: block;
}

.watch-layout {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: start;
}

.watch-main {
  min-width: 0;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0;
  background: radial-gradient(circle at 50% 46%, rgba(37, 99, 235, 0.32), rgba(2, 6, 23, 0.68));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.22s ease;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue-700);
  font-size: 34px;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.28);
}

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

.detail-article {
  margin-top: 24px;
  padding: 34px;
}

.detail-article h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.lead-text {
  margin: 18px 0;
  color: var(--slate-700);
  font-size: 19px;
  line-height: 1.8;
}

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

.detail-meta-grid div {
  padding: 16px;
  border-radius: 16px;
  background: var(--slate-50);
}

.detail-meta-grid strong,
.detail-meta-grid span {
  display: block;
}

.detail-meta-grid strong {
  margin-bottom: 4px;
  color: var(--slate-500);
  font-size: 13px;
}

.detail-meta-grid span {
  color: var(--slate-900);
  font-weight: 900;
}

.detail-article h2 {
  margin: 28px 0 12px;
  color: var(--slate-900);
  font-size: 24px;
  font-weight: 900;
}

.detail-article p {
  color: var(--slate-700);
  line-height: 1.9;
}

.watch-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 20px;
}

.detail-cover {
  border-radius: var(--radius-xl);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--slate-900);
  box-shadow: var(--shadow-soft);
}

.side-panel {
  padding: 20px;
}

.side-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 900;
}

.rank-hero {
  background:
    radial-gradient(circle at 85% 10%, rgba(251, 146, 60, 0.22), transparent 32%),
    linear-gradient(135deg, var(--slate-900), var(--blue-900));
}

.rank-hero h1,
.rank-hero p,
.rank-hero span {
  color: var(--white);
}

.rank-top-card {
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
}

.site-footer {
  margin-top: 70px;
  background: var(--slate-900);
  color: var(--slate-400);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
  font-weight: 900;
}

.site-footer p,
.site-footer li {
  line-height: 1.8;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 24px;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
}

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

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

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

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

  .hero-track {
    min-height: 620px;
  }

  .hero-content {
    padding: 48px 28px 150px;
  }

  .hero-controls {
    bottom: 130px;
  }

  .split-layout,
  .page-hero,
  .watch-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .watch-sidebar {
    position: static;
  }

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

@media (max-width: 720px) {
  .site-header-inner,
  .mobile-nav,
  .hero-carousel,
  .content-section,
  .page-hero,
  .watch-layout,
  .category-tabs {
    padding-left: 16px;
    padding-right: 16px;
  }

  .site-logo {
    font-size: 19px;
  }

  .hero-track {
    border-radius: 22px;
  }

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

  .search-box {
    flex-direction: column;
  }

  .search-box button {
    height: 46px;
  }

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

  .movie-card-body h3 {
    font-size: 16px;
  }

  .movie-card-body p {
    min-height: 0;
  }

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

  .detail-article {
    padding: 24px;
  }
}

@media (max-width: 460px) {
  .quick-category-grid,
  .featured-grid,
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 31px;
  }

  .hero-content h2 {
    font-size: 27px;
  }

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

  .hero-arrow {
    width: 38px;
    height: 38px;
  }

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