:root {
  --blue-950: #172554;
  --blue-900: #1e3a8a;
  --blue-700: #1d4ed8;
  --cyan-500: #06b6d4;
  --cyan-100: #cffafe;
  --yellow-400: #facc15;
  --orange-500: #f97316;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
  --soft-shadow: 0 14px 38px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f8fafc 100%);
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  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, #2563eb 0%, #06b6d4 100%);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

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

.brand {
  font-size: 24px;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--blue-900);
  background: var(--yellow-400);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  font-weight: 600;
}

.desktop-nav a,
.mobile-nav a {
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: #fef08a;
  opacity: 1;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 10px;
}

.mobile-nav {
  display: none;
  padding: 8px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.mobile-nav.open {
  display: grid;
  gap: 6px;
}

.mobile-nav a {
  padding: 10px 14px;
  border-radius: 12px;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  background: rgba(255, 255, 255, 0.16);
}

.hero-section {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(100deg, #172554 0%, #1d4ed8 58%, #06b6d4 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(250, 204, 21, 0.28), transparent 26%),
    radial-gradient(circle at 88% 14%, rgba(125, 211, 252, 0.32), transparent 32%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.42));
}

.hero-container {
  position: relative;
  padding: 72px 0 82px;
}

.hero-slider {
  position: relative;
  min-height: 520px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 54px;
  align-items: center;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-copy {
  display: grid;
  gap: 20px;
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  color: #172554;
  background: #facc15;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(250, 204, 21, 0.25);
}

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

.hero-copy p {
  max-width: 680px;
  margin: 0;
  color: #dbeafe;
  font-size: 19px;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 14px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  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: #172554;
  background: #facc15;
  box-shadow: 0 14px 28px rgba(250, 204, 21, 0.25);
}

.btn.ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

.btn.light {
  color: #1d4ed8;
  background: #dbeafe;
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}

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

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

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

.hero-play,
.play-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.hero-play {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 1;
  width: 80px;
  height: 80px;
  color: #1d4ed8;
  background: #ffffff;
  transform: translate(-50%, -50%);
  font-size: 28px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.35);
}

.hero-control {
  position: absolute;
  left: 0;
  bottom: -28px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-control button {
  border: 0;
  cursor: pointer;
}

.hero-control > button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #172554;
  background: #ffffff;
  font-size: 28px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
}

.hero-dots button.active {
  width: 30px;
  background: #facc15;
}

.page-section {
  padding: 58px 0;
}

.section-title {
  margin-bottom: 28px;
}

.section-title span,
.sub-hero span {
  display: inline-flex;
  margin-bottom: 8px;
  color: #2563eb;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-title h2,
.sub-hero h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-title p,
.sub-hero p {
  max-width: 760px;
  margin: 10px 0 0;
  color: #64748b;
}

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

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

.movie-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #dbeafe;
}

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

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

.poster-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.68));
  transition: opacity 0.22s ease;
}

.movie-card:hover .poster-mask {
  opacity: 1;
}

.play-dot {
  width: 58px;
  height: 58px;
  color: #1d4ed8;
  background: #ffffff;
  font-size: 22px;
}

.corner {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.corner.region {
  top: 12px;
  left: 12px;
  background: #2563eb;
}

.corner.type {
  right: 12px;
  bottom: 12px;
  background: rgba(15, 23, 42, 0.82);
}

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

.movie-meta strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 54px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.movie-meta em {
  overflow: hidden;
  color: #475569;
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.soft-section {
  background: linear-gradient(90deg, #ecfdf5, #eff6ff);
}

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

.movie-card.compact {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  min-height: 96px;
  padding: 10px;
}

.movie-card.compact .thumb-wrap {
  position: relative;
  overflow: hidden;
  width: 112px;
  height: 76px;
  border-radius: 14px;
}

.movie-card.compact img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-info {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.card-info strong {
  display: -webkit-box;
  overflow: hidden;
  color: #0f172a;
  font-size: 15px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-info em {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.category-panel,
.filter-box,
.story-card,
.category-card {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.category-panel {
  padding: 24px;
}

.category-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.category-panel h3,
.story-card h2 {
  margin: 0;
  color: #1d4ed8;
  font-size: 22px;
}

.category-panel p {
  margin: 4px 0 0;
  color: #64748b;
}

.category-panel-head a {
  flex: 0 0 auto;
  color: #2563eb;
  font-weight: 800;
}

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

.ranking-strip {
  background: linear-gradient(90deg, #fffbeb, #fff7ed);
}

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

.movie-row {
  display: grid;
  grid-template-columns: 90px 76px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-row:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.13);
}

.row-cover {
  overflow: hidden;
  width: 90px;
  height: 62px;
  border-radius: 14px;
}

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

.row-rank {
  color: #f97316;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.row-content {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.row-content strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 18px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.row-content small {
  color: #64748b;
}

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

.center-actions {
  justify-content: center;
  margin-top: 30px;
}

.sub-hero {
  padding: 72px 0;
  background: linear-gradient(120deg, #eff6ff, #ecfeff);
}

.category-hero {
  background: linear-gradient(120deg, #e0f2fe, #f0fdfa);
}

.rank-hero {
  background: linear-gradient(120deg, #fff7ed, #fffbeb);
}

.search-hero {
  background: linear-gradient(120deg, #eef2ff, #ecfeff);
}

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

.category-card {
  display: grid;
  gap: 14px;
  overflow: hidden;
  padding: 16px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.category-images img {
  width: 100%;
  height: 92px;
  border-radius: 14px;
  object-fit: cover;
}

.category-card strong {
  color: #0f172a;
  font-size: 21px;
}

.category-card em {
  color: #64748b;
  font-size: 14px;
  font-style: normal;
}

.filter-box {
  display: grid;
  gap: 20px;
  margin-bottom: 30px;
  padding: 22px;
}

.filter-box h2 {
  margin: 0;
  color: #0f172a;
}

.filter-box p {
  margin: 4px 0 0;
  color: #64748b;
}

.movie-filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) auto;
  gap: 14px;
  align-items: end;
}

.movie-filter-form label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.movie-filter-form input,
.movie-filter-form select {
  width: 100%;
  height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0 12px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
}

.movie-filter-form input:focus,
.movie-filter-form select:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.movie-filter-form button {
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: #2563eb;
  cursor: pointer;
  font-weight: 800;
}

.filter-status {
  min-height: 24px;
  color: #2563eb;
  font-weight: 800;
}

.movie-filter-item.hidden {
  display: none;
}

.detail-hero {
  color: #ffffff;
  background: linear-gradient(110deg, #172554, #1d4ed8 58%, #06b6d4);
}

.detail-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 54px 0;
}

.detail-cover {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

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

.detail-info {
  display: grid;
  gap: 18px;
}

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

.breadcrumb a:hover {
  color: #fef08a;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.detail-info p {
  max-width: 820px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

.player-section {
  padding: 48px 0 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: #020617;
  object-fit: contain;
  cursor: pointer;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #1d4ed8;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.62));
  cursor: pointer;
  z-index: 3;
}

.play-layer span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: #ffffff;
  font-size: 30px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.38);
}

.player-shell.is-playing .play-layer {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 26px 0;
}

.story-card {
  padding: 26px;
}

.story-card p {
  margin: 12px 0 0;
  color: #475569;
  font-size: 16px;
}

.tag-card {
  grid-column: 1 / -1;
}

.tag-card > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 11px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 13px;
  font-weight: 800;
}

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

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

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

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

.site-footer p {
  margin: 16px 0 0;
  color: #94a3b8;
  font-size: 14px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 16px;
}

.site-footer ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #94a3b8;
  font-size: 14px;
}

.site-footer a:hover {
  color: #67e8f9;
}

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1120px) {
  .desktop-nav {
    gap: 14px;
    font-size: 14px;
  }

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero-container {
    padding: 48px 0 78px;
  }

  .hero-slider {
    min-height: 760px;
  }

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

  .hero-poster img {
    height: 330px;
  }

  .movie-list-grid,
  .movie-grid,
  .large-grid,
  .category-grid,
  .compact-grid,
  .footer-grid,
  .detail-layout,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

  .detail-cover img {
    height: 360px;
  }

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

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

  .brand {
    font-size: 20px;
  }

  .hero-slider {
    min-height: 720px;
  }

  .hero-copy p,
  .detail-info p {
    font-size: 16px;
  }

  .hero-poster img {
    height: 270px;
  }

  .hero-control {
    bottom: -42px;
  }

  .movie-row {
    grid-template-columns: 78px 52px minmax(0, 1fr);
    gap: 12px;
  }

  .row-cover {
    width: 78px;
    height: 56px;
  }

  .row-rank {
    font-size: 20px;
  }

  .movie-card.compact {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .movie-card.compact .thumb-wrap {
    width: 100px;
    height: 70px;
  }

  .detail-layout {
    padding: 34px 0;
  }

  .detail-cover img {
    height: 280px;
  }

  .play-layer span {
    width: 68px;
    height: 68px;
    font-size: 24px;
  }
}
