:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --slate: #0f172a;
  --text: #111827;
  --muted: #64748b;
  --soft: #f8fafc;
  --line: rgba(148, 163, 184, 0.25);
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 48%, #ecfeff 100%);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.nav-wrap {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark,
.footer-brand span {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
  font-size: 14px;
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  position: relative;
  font-size: 15px;
  font-weight: 700;
  color: #334155;
  padding: 22px 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 15px;
  height: 3px;
  border-radius: 999px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.24s ease;
}

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

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-search input,
.filter-input {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  min-width: 220px;
  background: rgba(255, 255, 255, 0.92);
  outline: none;
  color: #1e293b;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.mobile-search input:focus,
.filter-input:focus {
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.nav-search button,
.mobile-search button,
.primary-btn,
.section-more {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 800;
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.22);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.nav-search button:hover,
.mobile-search button:hover,
.primary-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.3);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 14px;
  padding: 9px 12px;
  background: #f1f5f9;
  color: #1e293b;
}

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

.mobile-panel.open {
  display: grid;
  gap: 14px;
}

.site-main {
  min-height: 70vh;
}

.hero-section {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 50%, #14b8a6 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.45) 0 2px, transparent 2px), radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.35) 0 2px, transparent 2px);
  background-size: 64px 64px, 96px 96px;
}

.hero-carousel {
  position: relative;
  max-width: 1280px;
  min-height: 620px;
  margin: 0 auto;
  padding: 48px 24px;
}

.hero-slide {
  position: absolute;
  inset: 48px 24px 78px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 44px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-media {
  position: relative;
  height: 480px;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.2), rgba(255, 255, 255, 0.18));
  box-shadow: 0 34px 70px rgba(15, 23, 42, 0.32);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.38) 100%);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-content {
  color: #ffffff;
  text-shadow: 0 2px 14px rgba(15, 23, 42, 0.18);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(219, 234, 254, 0.92);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-content .eyebrow {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

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

.hero-content p {
  max-width: 680px;
  margin: 0 0 24px;
  font-size: clamp(18px, 2.1vw, 25px);
  color: rgba(255, 255, 255, 0.92);
}

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

.hero-meta span,
.detail-tags span,
.genre-row span,
.tag-row span {
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.detail-tags span,
.genre-row span,
.tag-row span {
  background: #e0f2fe;
  color: #0369a1;
}

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

.hero-actions .primary-btn {
  background: #ffffff;
  color: var(--blue);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.52);
  border-radius: 999px;
  padding: 11px 18px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-weight: 800;
  transition: background 0.22s ease, transform 0.22s ease;
}

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

.hero-dots {
  position: absolute;
  left: 24px;
  bottom: 38px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 44px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.active {
  background: #ffffff;
}

.section-block {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px;
}

.section-block.white {
  background: #ffffff;
}

.section-block.soft {
  background: transparent;
}

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

.section-head h2,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.section-head p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 17px;
}

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

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

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

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: block;
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-shell {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.large-card .poster-shell {
  aspect-ratio: 4 / 3;
}

.poster-img,
.compact-img,
.ranking-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, opacity 0.2s ease;
}

.image-missing {
  opacity: 0;
}

.movie-card-link:hover .poster-img,
.compact-card:hover .compact-img,
.ranking-link:hover .ranking-img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.72) 100%);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.poster-play {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  transform: translateY(-10px);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card-link:hover .poster-shade,
.movie-card-link:hover .poster-play {
  opacity: 1;
  transform: translateY(0);
}

.movie-card-body {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.movie-card-body strong,
.compact-info strong,
.ranking-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  color: #0f172a;
}

.movie-card-body em,
.compact-info em,
.ranking-info em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.movie-line {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #475569;
  font-size: 14px;
  min-height: 44px;
}

.tag-row span {
  padding: 4px 9px;
  font-size: 12px;
}

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

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

.category-tile {
  border-radius: 24px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.category-tile > a {
  display: grid;
  gap: 10px;
  min-height: 190px;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.category-tile:nth-child(3n + 2) > a {
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
}

.category-tile:nth-child(3n) > a {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.category-tile span {
  width: max-content;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 800;
}

.category-tile strong {
  font-size: 24px;
  line-height: 1.1;
}

.category-tile em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.86);
}

.category-preview {
  display: grid;
  gap: 8px;
  padding: 16px 20px 20px;
}

.category-preview a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #334155;
  font-weight: 700;
}

.latest-list,
.side-list {
  display: grid;
  gap: 16px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.compact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.12);
}

.compact-cover {
  display: block;
  width: 92px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.compact-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.inner-page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px 0;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin: 22px 0 28px;
  padding: 54px;
  border-radius: 34px;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.category-hero,
.ranking-hero {
  background: linear-gradient(135deg, #dbeafe 0%, #cffafe 100%);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: #64748b;
  font-size: 14px;
}

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

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #f8fafc;
}

.filter-input {
  flex: 1;
  min-width: 260px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-pills button {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: #334155;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  cursor: pointer;
}

.filter-pills button.active,
.filter-pills button:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

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

.ranking-row {
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.ranking-link {
  display: grid;
  grid-template-columns: 58px 92px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
}

.ranking-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: #94a3b8;
  font-weight: 900;
}

.gold .ranking-num {
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.silver .ranking-num {
  background: linear-gradient(135deg, #94a3b8, #64748b);
}

.bronze .ranking-num {
  background: linear-gradient(135deg, #b45309, #f59e0b);
}

.ranking-thumb {
  width: 92px;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.ranking-info {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.ranking-info span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  color: #475569;
  font-size: 14px;
}

.heat-badge {
  border-radius: 999px;
  padding: 8px 12px;
  color: #be123c;
  background: #ffe4e6;
  font-weight: 900;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  margin-top: 24px;
}

.detail-main,
.detail-side {
  min-width: 0;
}

.player-card,
.detail-content,
.side-card {
  border-radius: 28px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.58));
  cursor: pointer;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 20px 44px rgba(37, 99, 235, 0.35);
  font-size: 28px;
  padding-left: 4px;
}

.play-overlay.is-hidden {
  display: none;
}

.detail-content {
  margin-top: 24px;
  padding: 32px;
}

.detail-content h1 {
  margin-bottom: 12px;
}

.lead-text {
  margin: 0 0 18px;
  color: #334155;
  font-size: 19px;
  font-weight: 600;
}

.detail-content h2,
.side-card h2 {
  margin: 28px 0 10px;
  color: #0f172a;
  font-size: 24px;
  line-height: 1.15;
}

.detail-content p {
  margin: 0 0 16px;
  color: #334155;
  font-size: 17px;
}

.side-card {
  padding: 22px;
  margin-bottom: 22px;
}

.side-poster {
  border-radius: 20px;
  margin-bottom: 16px;
}

.poster-info dl {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.poster-info dl div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.poster-info dt {
  color: #64748b;
}

.poster-info dd {
  margin: 0;
  color: #0f172a;
  font-weight: 800;
  text-align: right;
}

.poster-info dd a {
  color: var(--blue);
}

.related-block {
  margin-top: 42px;
}

.site-footer {
  margin-top: 72px;
  padding: 54px 24px 24px;
  color: #cbd5e1;
  background: #0f172a;
}

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

.footer-grid h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

.footer-grid p {
  max-width: 420px;
  color: #94a3b8;
}

.footer-grid a {
  display: block;
  width: max-content;
  margin-bottom: 9px;
  color: #cbd5e1;
}

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

.footer-brand {
  color: #ffffff;
  font-size: 22px;
}

.footer-bottom {
  max-width: 1280px;
  margin: 36px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  font-size: 14px;
}

.hidden-by-filter {
  display: none !important;
}

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

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

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

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 24px;
    inset: 28px 18px 88px;
  }

  .hero-media {
    height: 300px;
    order: 2;
  }

  .hero-section,
  .hero-carousel {
    min-height: 740px;
  }

  .featured-grid,
  .latest-list,
  .footer-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .filter-bar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .ranking-link {
    grid-template-columns: 48px 78px minmax(0, 1fr);
  }

  .heat-badge {
    grid-column: 3;
    width: max-content;
  }
}

@media (max-width: 640px) {
  .nav-wrap {
    height: 62px;
    padding: 0 16px;
  }

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

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

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

  .hero-section,
  .hero-carousel {
    min-height: 720px;
  }

  .hero-media {
    height: 260px;
    border-radius: 24px;
  }

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

  .section-block {
    padding-top: 52px;
    padding-bottom: 52px;
  }

  .page-hero {
    padding: 34px 24px;
    border-radius: 26px;
  }

  .movie-grid,
  .full-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

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

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

  .movie-line {
    font-size: 13px;
  }

  .ranking-link {
    grid-template-columns: 42px 1fr;
  }

  .ranking-thumb {
    display: none;
  }

  .ranking-info,
  .heat-badge {
    grid-column: 2;
  }

  .detail-content,
  .side-card {
    padding: 22px;
  }

  .play-overlay span {
    width: 70px;
    height: 70px;
    font-size: 23px;
  }

  .mobile-search {
    align-items: stretch;
    flex-direction: column;
  }

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