:root {
  --blue: #2563eb;
  --blue-deep: #1d4ed8;
  --cyan: #06b6d4;
  --cyan-deep: #0891b2;
  --orange: #f97316;
  --red: #ef4444;
  --yellow: #f59e0b;
  --dark: #0f172a;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-strong: 0 28px 70px rgba(15, 23, 42, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f5f7fb;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.25);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 650;
}

.main-nav a {
  opacity: 0.95;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.main-nav a:hover {
  color: #cffafe;
  opacity: 1;
}

.header-search {
  display: flex;
  align-items: center;
  min-width: 260px;
  max-width: 360px;
  flex: 1;
}

.header-search input {
  width: 100%;
  border: 0;
  color: var(--white);
  border-radius: 999px;
  padding: 10px 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  color: var(--white);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 999px;
  background: var(--white);
}

.mobile-panel {
  display: none;
  padding: 0 24px 18px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel a {
  display: block;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 650;
}

.mobile-panel form {
  margin-top: 12px;
}

.mobile-panel input {
  width: 100%;
  border: 0;
  color: var(--white);
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.18);
}

.hero {
  position: relative;
  min-height: 500px;
  height: 70vh;
  overflow: hidden;
  background: var(--dark);
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 6s ease;
}

.hero-slide.is-active img {
  transform: scale(1.08);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.08));
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 6;
  height: 160px;
  background: linear-gradient(180deg, rgba(245, 247, 251, 0), #f5f7fb);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  color: var(--white);
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--orange), var(--red));
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.25);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2.2vw, 22px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-meta span,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 0;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 35px rgba(8, 145, 178, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 20px 42px rgba(8, 145, 178, 0.34);
}

.btn-light {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.hero-dots {
  position: absolute;
  right: 36px;
  bottom: 36px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
  padding: 56px 24px;
}

.section-muted {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.section-warm {
  background: linear-gradient(135deg, #fff7ed, #fefce8);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

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

.section-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--cyan-deep);
  font-weight: 900;
}

.section h2,
.page-title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-intro,
.page-intro {
  max-width: 780px;
  color: var(--muted);
  margin: 10px 0 0;
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

.movie-card,
.category-card,
.info-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link,
.category-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #dbeafe;
}

.poster-link img,
.category-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-link::after,
.category-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.62));
  opacity: 0.9;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: rgba(8, 145, 178, 0.82);
  box-shadow: 0 15px 40px rgba(8, 145, 178, 0.36);
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.78);
}

.card-body {
  padding: 18px;
}

.card-title {
  display: block;
  min-height: 52px;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.35;
  font-weight: 850;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title {
  color: var(--cyan-deep);
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-meta span,
.card-meta a,
.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 750;
  background: #dbeafe;
}

.card-meta a:first-child,
.tag-pill.active {
  color: var(--white);
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.category-card {
  position: relative;
}

.category-card .card-body {
  min-height: 170px;
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.page-hero {
  padding: 58px 24px 42px;
  color: var(--white);
  background:
    radial-gradient(circle at top left, rgba(6, 182, 212, 0.45), transparent 35%),
    linear-gradient(135deg, #1d4ed8, #0891b2 58%, #0f172a);
}

.page-hero .container {
  display: grid;
  gap: 18px;
}

.page-hero .page-title,
.page-hero .page-intro {
  color: var(--white);
}

.filter-panel,
.search-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select,
.search-panel input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
  background: #f8fafc;
}

.filter-panel input:focus,
.filter-panel select:focus,
.search-panel input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12);
}

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

.breadcrumb a {
  color: var(--cyan-deep);
  font-weight: 750;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 28px;
  align-items: start;
}

.player-card {
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  box-shadow: var(--shadow-strong);
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle, rgba(6, 182, 212, 0.2), rgba(0, 0, 0, 0.36));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button-core {
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding-left: 6px;
  font-size: 36px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 20px 50px rgba(8, 145, 178, 0.45);
}

.detail-card {
  margin-top: 22px;
  padding: 24px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-card h2,
.side-card h2 {
  margin: 22px 0 10px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 900;
}

.detail-card p {
  margin: 0 0 12px;
  color: #334155;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0;
}

.side-card {
  border-radius: 22px;
  padding: 20px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.side-list {
  display: grid;
  gap: 14px;
}

.side-item,
.rank-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: center;
}

.side-item img,
.rank-row img {
  width: 96px;
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
}

.side-item strong,
.rank-row strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.side-item span,
.rank-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.ranking-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-list .rank-row {
  grid-template-columns: 70px 128px 1fr auto;
  padding: 14px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.07);
}

.rank-number {
  color: var(--cyan-deep);
  font-size: 24px;
  font-weight: 900;
}

.rank-action {
  color: var(--white);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 14px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.empty-state {
  display: none;
  padding: 28px;
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
  background: var(--white);
}

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

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
  padding: 42px 24px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.footer-title {
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
}

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

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 45;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--cyan-deep);
  box-shadow: 0 14px 34px rgba(8, 145, 178, 0.32);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

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

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

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

@media (max-width: 860px) {
  .header-search,
  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    height: auto;
    min-height: 580px;
  }

  .hero-content {
    padding-top: 90px;
    padding-bottom: 100px;
  }

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

  .filter-panel,
  .search-panel {
    grid-template-columns: 1fr;
  }

  .ranking-list .rank-row {
    grid-template-columns: 52px 96px 1fr;
  }

  .rank-action {
    grid-column: 2 / 4;
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .header-inner {
    padding: 0 16px;
  }

  .logo {
    font-size: 20px;
  }

  .section,
  .page-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hero h1 {
    font-size: 40px;
  }

  .hero-dots {
    right: 18px;
    bottom: 24px;
  }

  .side-item,
  .rank-row {
    grid-template-columns: 88px 1fr;
  }
}
