:root {
  --blue: #2563eb;
  --cyan: #06b6d4;
  --teal: #0d9488;
  --orange: #f97316;
  --red: #ef4444;
  --slate: #0f172a;
  --text: #1f2937;
  --muted: #64748b;
  --soft: #eff6ff;
  --card: #ffffff;
  --border: #e5eef7;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.is-locked {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--teal));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.22);
}

.header-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.25s ease, transform 0.25s ease;
}

.logo-icon.small {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.logo-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.logo:hover .logo-icon {
  background: rgba(255, 255, 255, 0.32);
  transform: translateY(-2px);
}

.logo-text {
  display: grid;
  line-height: 1.15;
}

.logo-text strong {
  font-size: 24px;
  letter-spacing: 0.02em;
}

.logo-text small {
  color: #dbeafe;
  font-size: 12px;
}

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

.nav-link {
  font-size: 15px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  transform: translateY(-1px);
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
}

.header-search input {
  width: 230px;
  border: 0;
  outline: 0;
  border-radius: 999px;
  color: #ffffff;
  padding: 10px 42px 10px 16px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.header-search input::placeholder {
  color: #dbeafe;
}

.header-search button {
  position: absolute;
  right: 8px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.18);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.18);
}

.mobile-menu-button span {
  width: 22px;
  height: 2px;
  display: block;
  margin: 5px auto;
  border-radius: 99px;
  background: #ffffff;
}

.mobile-panel {
  position: relative;
  z-index: 3;
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: -10px auto 0;
  padding: 0 0 24px;
}

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

.mobile-search {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.mobile-search input {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  color: #ffffff;
  outline: 0;
  background: rgba(255, 255, 255, 0.18);
}

.mobile-search input::placeholder {
  color: #dbeafe;
}

.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: var(--blue);
  font-weight: 700;
  background: #ffffff;
}

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

.mobile-link {
  border-radius: 14px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-link.is-active,
.mobile-link:hover {
  background: rgba(255, 255, 255, 0.22);
}

.wave {
  position: absolute;
  left: 0;
  width: 100%;
  pointer-events: none;
}

.wave-bottom {
  bottom: -1px;
  height: 40px;
}

.wave-top {
  top: -1px;
  height: 60px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 48px 0 78px;
  background:
    radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.32), transparent 34%),
    linear-gradient(135deg, #1d4ed8 0%, #06b6d4 48%, #0f766e 100%);
  color: #ffffff;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(6px);
  background: rgba(255, 255, 255, 0.14);
}

.hero::before {
  width: 260px;
  height: 260px;
  left: -80px;
  top: 42px;
}

.hero::after {
  width: 420px;
  height: 420px;
  right: -160px;
  bottom: -150px;
}

.hero-stage {
  position: relative;
  z-index: 2;
  min-height: 520px;
}

.hero-slide {
  display: none;
  grid-template-columns: 1.03fr 0.97fr;
  align-items: center;
  gap: 44px;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeIn 0.45s ease both;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 14px;
  color: #ecfeff;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.hero-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.14);
}

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

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button-primary {
  color: var(--blue);
  background: #ffffff;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.22);
}

.button-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.button-primary:hover,
.button-secondary:hover {
  transform: translateY(-2px);
}

.hero-visual {
  position: relative;
  min-height: 450px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  min-height: 450px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.35);
  transform: rotate(1deg);
  isolation: isolate;
  background: rgba(255, 255, 255, 0.14);
}

.hero-card img {
  width: 100%;
  height: 450px;
  object-fit: cover;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 35%, rgba(15, 23, 42, 0.78));
}

.hero-card-copy {
  position: absolute;
  z-index: 2;
  left: 24px;
  right: 24px;
  bottom: 24px;
}

.hero-card-copy strong {
  display: block;
  font-size: 24px;
  margin-bottom: 8px;
}

.hero-card-copy span {
  color: #dbeafe;
}

.hero-thumbs {
  position: absolute;
  z-index: 3;
  left: -26px;
  bottom: 24px;
  display: grid;
  gap: 12px;
}

.hero-thumb {
  width: 82px;
  height: 58px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.75);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  background: #ffffff;
  opacity: 0.78;
}

.hero-thumb.is-active {
  opacity: 1;
  transform: translateX(8px);
}

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

.section {
  padding: 70px 0;
}

.section.soft {
  background: rgba(255, 255, 255, 0.58);
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: var(--shadow-soft);
}

.section h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: #1f2937;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
}

.section-lead,
.page-hero p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.view-more {
  color: var(--blue);
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  border-radius: var(--radius);
  padding: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:nth-child(2n) {
  background: linear-gradient(135deg, var(--cyan), var(--teal));
}

.category-tile:nth-child(3n) {
  background: linear-gradient(135deg, #6366f1, var(--blue));
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-tile strong {
  display: block;
  position: relative;
  z-index: 2;
  font-size: 24px;
  margin-bottom: 12px;
}

.category-tile span {
  position: relative;
  z-index: 2;
  color: #dff8ff;
  line-height: 1.6;
}

.category-tile::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  right: -52px;
  bottom: -48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.28s ease;
}

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

.poster-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  font-weight: 800;
  font-size: 12px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.26);
}

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

.card-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta span,
.rank-meta span {
  border-radius: 999px;
  padding: 4px 9px;
  background: #eef6ff;
}

.movie-card h3 {
  margin: 12px 0 10px;
  color: #111827;
  font-size: 19px;
  line-height: 1.35;
}

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

.movie-card p {
  min-height: 72px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.tag-row span {
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  background: #e0f2fe;
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.rank-list.full {
  display: grid;
  gap: 18px;
}

.rank-item {
  display: grid;
  grid-template-columns: 64px 1fr 132px;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.rank-number {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.rank-copy a {
  color: #111827;
  font-size: 18px;
  font-weight: 850;
}

.rank-copy a:hover {
  color: var(--blue);
}

.rank-copy p {
  margin: 8px 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.rank-poster {
  overflow: hidden;
  border-radius: 16px;
  background: #dbeafe;
}

.rank-poster img {
  width: 132px;
  height: 82px;
  object-fit: cover;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 70px 0 92px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.page-hero h1,
.page-hero p {
  position: relative;
  z-index: 2;
  color: #ffffff;
}

.page-hero p {
  max-width: 780px;
  color: #e0f2fe;
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  margin-bottom: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.filter-panel input {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 18px;
  padding: 14px 16px;
  background: #f1f5f9;
}

.filter-panel select {
  border: 0;
  border-radius: 18px;
  padding: 0 16px;
  color: var(--text);
  background: #f1f5f9;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--blue);
  font-weight: 700;
}

.detail-main {
  padding: 52px 0 76px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 28px;
  align-items: start;
}

.detail-title {
  margin-bottom: 22px;
}

.detail-title h1 {
  margin-bottom: 14px;
}

.detail-title p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

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

.video-element {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #020617;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.22), rgba(2, 6, 23, 0.74));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  color: var(--blue);
  cursor: pointer;
  font-size: 34px;
  padding-left: 6px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease;
}

.play-button:hover {
  transform: scale(1.06);
}

.detail-panel {
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.detail-panel h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

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

.info-line {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  color: var(--muted);
}

.info-line strong {
  color: #111827;
}

.detail-content {
  margin-top: 28px;
  display: grid;
  gap: 22px;
}

.detail-block {
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.detail-block h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 24px;
}

.detail-block p {
  margin: 0;
  color: #475569;
  line-height: 1.9;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

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

.movie-card.compact p {
  min-height: 56px;
}

.empty-result {
  display: none;
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

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

.site-footer {
  position: relative;
  overflow: hidden;
  padding-top: 76px;
  color: #cbd5e1;
  background: var(--slate);
}

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

.footer-brand p {
  max-width: 420px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-logo strong {
  display: block;
  color: #ffffff;
  font-size: 22px;
}

.footer-logo small {
  color: #94a3b8;
}

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

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

.footer-column a {
  color: #94a3b8;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding: 20px 0 26px;
  color: #94a3b8;
}

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

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

  .header-search {
    margin-left: auto;
  }

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

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

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 360px;
  }

  .hero-card,
  .hero-card img {
    min-height: 360px;
    height: 360px;
  }
}

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

  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }

  .header-inner {
    padding-bottom: 28px;
  }

  .logo-text strong {
    font-size: 20px;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-stage {
    min-height: auto;
  }

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

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

  .hero-card,
  .hero-card img {
    height: 320px;
    min-height: 320px;
  }

  .hero-thumbs {
    left: 18px;
    bottom: -32px;
    grid-auto-flow: column;
  }

  .category-grid,
  .movie-grid,
  .rank-grid,
  .related-grid,
  .footer-inner,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .rank-item {
    grid-template-columns: 54px 1fr;
  }

  .rank-poster {
    grid-column: 1 / -1;
  }

  .rank-poster img {
    width: 100%;
    height: 190px;
  }

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

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .container,
  .header-inner,
  .mobile-panel,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .hero-actions {
    flex-direction: column;
  }

  .button-primary,
  .button-secondary {
    width: 100%;
  }

  .hero-card,
  .hero-card img {
    height: 280px;
    min-height: 280px;
  }

  .section {
    padding: 52px 0;
  }

  .movie-grid {
    gap: 18px;
  }

  .detail-main {
    padding-top: 34px;
  }
}
