:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --teal: #14b8a6;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --panel: #ffffff;
  --soft: #f8fafc;
  --dark: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.28);
}

.brand-name {
  font-size: 20px;
  letter-spacing: -0.02em;
}

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

.nav-link,
.mobile-nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  color: #334155;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.header-search input,
.mobile-search input,
.filter-bar input {
  width: 260px;
  height: 42px;
  padding: 0 14px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  outline: none;
  transition: all 0.2s ease;
}

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

.header-search button,
.mobile-search button,
.primary-btn,
.ghost-btn {
  height: 42px;
  padding: 0 18px;
  cursor: pointer;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  transition: all 0.2s ease;
}

.header-search button,
.mobile-search button,
.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.25);
}

.header-search button:hover,
.mobile-search button:hover,
.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.34);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: #334155;
  background: #f1f5f9;
  border: 0;
  border-radius: 12px;
  font-size: 22px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-search input {
  width: 100%;
}

.hero-slider {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: linear-gradient(135deg, #1d4ed8, #0f766e);
}

.hero-track,
.hero-slide {
  height: 100%;
}

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg {
  opacity: 0.32;
  transform: scale(1.03);
}

.hero-overlay,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(20, 184, 166, 0.35), transparent 35%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.46), rgba(15, 23, 42, 0.86));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  color: #ffffff;
}

.hero-kicker {
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 14px;
  color: #fef08a;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  font-weight: 900;
}

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

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

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

.hero-tags span,
.detail-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

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

.hero-dots button {
  width: 11px;
  height: 11px;
  padding: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.45);
  border: 0;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.hero-dots button.active {
  width: 34px;
  background: #ffffff;
}

.section-block {
  padding: 54px 0;
}

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

.section-heading h2,
.ranking-panel h2,
.content-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  color: var(--blue);
  font-weight: 900;
}

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

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

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

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

.movie-card {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(37, 99, 235, 0.25);
  box-shadow: var(--shadow);
}

.card-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1d4ed8 55%, #14b8a6);
}

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

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

.duration,
.rank-badge,
.play-dot {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.duration {
  right: 12px;
  bottom: 12px;
  padding: 5px 8px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 9px;
  font-size: 12px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  border-radius: 999px;
  font-size: 13px;
}

.play-dot {
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  backdrop-filter: blur(12px);
  transition: all 0.24s ease;
}

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

.card-body {
  padding: 16px;
}

.card-category,
.detail-category {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 9px;
  padding: 5px 10px;
  color: var(--blue);
  background: #eff6ff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  line-height: 1.42;
  font-weight: 900;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

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

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

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  color: #475569;
  background: #f1f5f9;
}

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

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  color: #ffffff;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  transition: transform 0.35s ease;
}

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

.category-card div {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.72));
}

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

.category-card p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

.gradient-blue { background: linear-gradient(135deg, #2563eb, #14b8a6); }
.gradient-pink { background: linear-gradient(135deg, #db2777, #f97316); }
.gradient-cyan { background: linear-gradient(135deg, #0891b2, #2563eb); }
.gradient-indigo { background: linear-gradient(135deg, #4f46e5, #0f172a); }
.gradient-orange { background: linear-gradient(135deg, #f97316, #ef4444); }
.gradient-green { background: linear-gradient(135deg, #16a34a, #0f766e); }
.gradient-slate { background: linear-gradient(135deg, #334155, #0f172a); }
.gradient-violet { background: linear-gradient(135deg, #7c3aed, #2563eb); }
.gradient-teal { background: linear-gradient(135deg, #0d9488, #22c55e); }
.gradient-rose { background: linear-gradient(135deg, #e11d48, #7c3aed); }

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 30px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.ranking-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 0;
}

.movie-card-horizontal .card-poster {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card-horizontal .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 14px;
}

.movie-card-horizontal .card-body h3 {
  min-height: 0;
  font-size: 15px;
}

.movie-card-horizontal .card-body p {
  min-height: 0;
  margin-top: 6px;
  font-size: 13px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: #64748b;
  font-size: 12px;
}

.page-hero {
  color: #ffffff;
  padding: 70px 0;
}

.page-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: 900;
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.breadcrumbs:not(.light) {
  color: rgba(255, 255, 255, 0.78);
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-bar input {
  width: min(100%, 520px);
  height: 48px;
}

.search-filter input {
  width: 100%;
}

.empty-state {
  padding: 36px;
  color: #64748b;
  text-align: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
}

.detail-hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.detail-shade {
  background:
    radial-gradient(circle at 18% 20%, rgba(37, 99, 235, 0.36), transparent 32%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.64), rgba(15, 23, 42, 0.9));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 48px 0;
}

.detail-title-wrap {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
  margin-top: 44px;
}

.detail-cover {
  width: 260px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 6px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.38);
}

.detail-title-wrap h1 {
  margin: 8px 0 14px;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 900;
}

.detail-title-wrap p {
  max-width: 760px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.75;
}

.detail-category {
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.3);
}

.detail-meta span,
.detail-tags span {
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

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

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #020617;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.34), rgba(2, 6, 23, 0.38));
  border: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  border-radius: 50%;
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.35);
  font-size: 36px;
}

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

.content-card {
  padding: 24px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

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

.side-card {
  padding: 20px;
}

.side-card h2 {
  font-size: 22px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px 16px;
  margin: 18px 0 0;
}

.side-card dt {
  color: #94a3b8;
  font-weight: 800;
}

.side-card dd {
  margin: 0;
  color: #334155;
}

.side-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.site-footer {
  margin-top: 64px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.brand-footer .brand-name {
  color: #ffffff;
}

.footer-brand p {
  max-width: 520px;
  margin: 16px 0 0;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  align-content: start;
}

.footer-links a {
  padding: 8px 12px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.footer-links a:hover {
  color: #ffffff;
  background: rgba(37, 99, 235, 0.45);
}

.copyright {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  color: #64748b;
}

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  width: 44px;
  height: 44px;
  display: none;
  cursor: pointer;
  color: #ffffff;
  background: var(--blue);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.32);
}

.back-top.visible {
  display: block;
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

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

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

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

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

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 64px;
  }

  .brand-name {
    font-size: 18px;
  }

  .hero-slider {
    height: 560px;
  }

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

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .ranking-grid,
  .category-grid,
  .large-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .section-heading {
    display: block;
  }

  .section-more {
    display: inline-flex;
    margin-top: 12px;
  }

  .card-body {
    padding: 13px;
  }

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

  .card-body p,
  .tag-row {
    display: none;
  }

  .detail-title-wrap {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .detail-cover {
    width: 190px;
  }

  .movie-card-horizontal {
    grid-template-columns: 122px 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .container,
  .header-inner,
  .mobile-nav,
  .footer-inner {
    width: min(100% - 22px, 1180px);
  }

  .hero-slider {
    height: 520px;
  }

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .ranking-grid,
  .category-grid,
  .large-category-grid {
    grid-template-columns: 1fr;
  }

  .mobile-search {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .page-hero {
    padding: 48px 0;
  }

  .section-block {
    padding: 38px 0;
  }
}
