
:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #06b6d4;
  --orange: #f97316;
  --red: #ef4444;
  --green: #10b981;
  --purple: #7c3aed;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.nav-shell {
  display: flex;
  align-items: center;
  min-height: 68px;
  gap: 20px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--blue);
  white-space: nowrap;
}

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 50%;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
  font-size: 14px;
}

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

.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
  color: #374151;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-link.compact {
  color: #6b7280;
  font-weight: 600;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 310px;
}

.header-search input,
.mobile-panel input,
.big-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search button,
.mobile-panel button,
.big-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--white);
  background: var(--blue);
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

.header-search button:hover,
.mobile-panel button:hover,
.big-search button:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #eff6ff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--blue);
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--line);
  background: var(--white);
}

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

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin: 14px auto;
  width: min(1180px, 100%);
}

.mobile-panel form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.hero-section {
  position: relative;
  color: var(--white);
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.24), transparent 28%),
    radial-gradient(circle at 12% 85%, rgba(14, 165, 233, 0.38), transparent 30%),
    linear-gradient(125deg, #2563eb 0%, #0891b2 50%, #06b6d4 100%);
  overflow: hidden;
}

.hero-section::after {
  content: "";
  position: absolute;
  inset: auto -12% -38% -12%;
  height: 56%;
  background: rgba(255, 255, 255, 0.12);
  transform: rotate(-3deg);
  filter: blur(8px);
}

.hero-shell {
  position: relative;
  min-height: 560px;
  z-index: 1;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 420px);
  align-items: center;
  gap: 52px;
  min-height: 560px;
  padding: 62px 0;
}

.hero-slide.active {
  display: grid;
  animation: heroFade 0.55s ease both;
}

@keyframes heroFade {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 14px 0 10px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.2;
}

.hero-copy p {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

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

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

.hero-tags span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 20px;
  border-radius: 999px;
  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(--blue);
  background: var(--white);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.16);
}

.btn.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.detail-info .btn.primary {
  color: var(--white);
  background: var(--blue);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 10px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08));
  box-shadow: 0 32px 70px rgba(15, 23, 42, 0.35);
}

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

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

.hero-controls {
  position: absolute;
  left: 0;
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--white);
}

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

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

.section-heading.centered {
  justify-content: center;
  text-align: center;
}

.section-heading.compact-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
}

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

.section-heading a {
  color: var(--blue);
  font-weight: 800;
}

.section-heading.light h2,
.section-heading.light a,
.section-heading.light .section-kicker {
  color: var(--white);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  display: block;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

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

.poster-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  background: var(--blue);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.2);
}

.rank-badge {
  left: 12px;
  right: auto;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

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

.movie-title {
  display: -webkit-box;
  min-height: 54px;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-title:hover {
  color: var(--blue);
}

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

.movie-meta,
.movie-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #6b7280;
  font-size: 13px;
}

.movie-meta span:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 10px;
  vertical-align: middle;
  border-radius: 50%;
  background: #cbd5e1;
}

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

.tag-row span {
  color: #1d4ed8;
  background: #eff6ff;
}

.movie-stats {
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid #edf2f7;
}

.category-overview {
  background: #eef4ff;
}

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

.category-card,
.category-large-card {
  display: block;
  min-height: 180px;
  padding: 24px;
  color: var(--white);
  border-radius: 22px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.15);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover,
.category-large-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.2);
}

.color-0 {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.color-1 {
  background: linear-gradient(135deg, #10b981, #22c55e);
}

.color-2 {
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.color-3 {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
}

.category-card strong,
.category-large-card h2 {
  display: block;
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card span,
.category-large-card span {
  display: inline-flex;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 800;
}

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

.ranking-strip {
  background: linear-gradient(125deg, #f97316, #ef4444);
}

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

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 36px;
  align-items: start;
}

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

.horizontal-item {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 16px;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.horizontal-item:hover {
  transform: translateX(4px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.1);
}

.horizontal-item img {
  width: 116px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
  background: #dbeafe;
}

.horizontal-item strong,
.horizontal-item span,
.horizontal-item small {
  display: block;
}

.horizontal-item strong {
  margin-bottom: 4px;
  font-size: 17px;
}

.horizontal-item span,
.horizontal-item small {
  color: var(--muted);
}

.search-panel {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.search-panel h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

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

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

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.mini-links a {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--blue);
  background: #eff6ff;
  font-weight: 700;
}

.page-hero,
.detail-top {
  color: var(--white);
  background: linear-gradient(125deg, #2563eb, #06b6d4);
}

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

.ranking-hero {
  padding: 58px 0;
  background: linear-gradient(125deg, #f97316, #ef4444);
}

.page-hero h1,
.detail-top h1 {
  margin: 12px 0 10px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

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

.detail-top .breadcrumb {
  padding-top: 24px;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

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

.category-large-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 22px;
  min-height: 220px;
  align-items: center;
}

.category-large-cover {
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.22);
}

.category-large-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 220px auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 26px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.search-filter {
  grid-template-columns: minmax(260px, 1fr) 220px 180px auto;
}

.filter-bar label {
  display: block;
  margin: 0 0 6px;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
}

.filter-bar output {
  color: var(--blue);
  font-weight: 900;
  white-space: nowrap;
}

.detail-top {
  padding-bottom: 54px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding-top: 28px;
}

.detail-cover {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 8px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-one-line {
  max-width: 860px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

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

.detail-meta-grid span {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
}

.detail-meta-grid strong {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.detail-tags span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
}

.detail-info .btn {
  margin-top: 22px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  width: 100%;
  color: var(--white);
  border: 0;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.3), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  text-align: center;
}

.play-overlay[hidden] {
  display: none;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: 0 auto;
  color: var(--blue);
  background: var(--white);
  border-radius: 50%;
  font-size: 34px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.play-overlay strong {
  font-size: 24px;
}

.play-overlay small {
  color: rgba(255, 255, 255, 0.78);
}

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  pointer-events: none;
}

.detail-article {
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.detail-article h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.detail-article h2:not(:first-child) {
  margin-top: 28px;
}

.detail-article p {
  margin: 0;
  color: #374151;
  font-size: 17px;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 32px;
  padding: 48px 0;
}

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

.site-footer p {
  margin: 10px 0 0;
  color: #cbd5e1;
}

.site-footer a {
  display: block;
  margin: 7px 0;
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: #60a5fa;
}

.footer-brand {
  color: var(--white);
}

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

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  display: none;
  width: 46px;
  height: 46px;
  color: var(--white);
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.35);
  cursor: pointer;
}

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

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

  .nav-shell {
    justify-content: space-between;
  }

  .menu-toggle {
    display: block;
  }

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

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

@media (max-width: 860px) {
  .hero-slide,
  .detail-hero,
  .two-column,
  .category-large-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-shell,
  .hero-slide {
    min-height: auto;
  }

  .hero-slide {
    gap: 30px;
    padding: 42px 0 86px;
  }

  .hero-poster {
    max-width: 340px;
    margin: 0 auto;
  }

  .hero-controls {
    left: 50%;
    transform: translateX(-50%);
  }

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

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

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

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

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

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

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

  .horizontal-item {
    grid-template-columns: 94px minmax(0, 1fr);
  }

  .horizontal-item img {
    width: 94px;
    height: 70px;
  }

  .big-search,
  .mobile-panel form {
    grid-template-columns: 1fr;
  }
}
