:root {
  --bg: #f8fafc;
  --paper: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --brand: #2563eb;
  --brand-strong: #0f766e;
  --accent: #e11d48;
  --gold: #f59e0b;
  --shadow: 0 18px 55px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 20px;
  --container: min(1180px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

img {
  max-width: 100%;
  height: auto;
}

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

.site-header-inner {
  width: var(--container);
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.28);
}

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

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

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

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: var(--brand);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(310px, 30vw);
}

.header-search input,
.big-search input,
.search-page-form input,
.search-page-form select,
.category-filter input {
  width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  background: #ffffff;
  padding: 12px 16px;
  outline: none;
  color: var(--ink);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input:focus,
.big-search input:focus,
.search-page-form input:focus,
.search-page-form select:focus,
.category-filter input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.header-search button,
.big-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: #0f172a;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  background: #e2e8f0;
  padding: 10px 12px;
  font-weight: 800;
}

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

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

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

.hero-image-link,
.hero-image,
.hero-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image img {
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 10%, rgba(59, 130, 246, 0.28), transparent 26%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.72) 45%, rgba(15, 23, 42, 0.2) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 48%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  right: 32px;
  bottom: 86px;
  max-width: 760px;
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #bfdbfe;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 19px;
}

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

.hero-tags span,
.tag-row span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span {
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.hero-actions,
.detail-backline,
.side-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  padding: 13px 20px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #2563eb);
  box-shadow: 0 18px 35px rgba(16, 185, 129, 0.28);
}

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

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.home-search-panel,
.content-section,
.search-page-panel,
.detail-layout {
  width: var(--container);
  margin: 0 auto;
}

.home-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
  gap: 24px;
  align-items: center;
  margin-top: -48px;
  position: relative;
  z-index: 2;
  padding: 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.home-search-panel h2,
.section-heading h2,
.info-card h2,
.side-card h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.home-search-panel p,
.section-heading p,
.info-card p,
.side-card,
.search-summary {
  color: var(--muted);
}

.big-search,
.search-page-form {
  display: flex;
  gap: 10px;
}

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

.soft-bg {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100vw - 1180px) / 2));
  padding-right: max(16px, calc((100vw - 1180px) / 2));
  background: linear-gradient(180deg, #ffffff, #f1f5f9);
}

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

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

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  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.35);
  box-shadow: var(--shadow);
}

.movie-poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #0f172a;
}

.poster-frame {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 20%, rgba(14, 165, 233, 0.36), transparent 28%),
    linear-gradient(135deg, #0f172a, #1d4ed8 48%, #0f766e);
}

.poster-frame::after {
  content: attr(data-title);
  position: absolute;
  inset: auto 16px 16px 16px;
  z-index: 1;
  display: none;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 950;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.38);
}

.poster-frame.poster-missing::after {
  display: block;
}

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

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

.movie-year,
.card-rank {
  position: absolute;
  z-index: 2;
  top: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.76);
}

.movie-year {
  right: 12px;
}

.card-rank {
  left: 12px;
  background: linear-gradient(135deg, #f59e0b, #e11d48);
}

.play-mask {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 950;
  background: rgba(2, 6, 23, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  padding: 16px;
}

.movie-card-body strong {
  display: block;
  overflow: hidden;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 950;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-line {
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  color: #64748b;
  font-size: 13px;
}

.movie-meta em {
  font-style: normal;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  padding: 4px 8px;
  color: #1d4ed8;
  background: #dbeafe;
}

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

.category-shortcuts a,
.category-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  padding: 18px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-shortcuts a:hover,
.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.35);
}

.category-shortcuts strong,
.category-card strong {
  display: block;
  font-size: 18px;
  font-weight: 950;
}

.category-shortcuts span,
.category-card em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.poster-tiny {
  width: 76px;
  height: 56px;
  flex: 0 0 76px;
  border-radius: 14px;
}

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

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

.movie-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-row:hover {
  transform: translateX(4px);
  border-color: rgba(37, 99, 235, 0.4);
}

.poster-wide {
  width: 152px;
  height: 92px;
  flex: 0 0 152px;
  border-radius: 14px;
}

.row-info {
  min-width: 0;
  flex: 1;
}

.row-title {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 18px;
  font-weight: 950;
}

.row-line {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--muted);
  font-size: 14px;
}

.row-meta {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #94a3b8;
  font-size: 13px;
}

.row-rank {
  color: var(--gold);
  font-size: 28px;
  font-weight: 950;
}

.page-hero {
  width: var(--container);
  margin: 32px auto 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 48px;
  border-radius: 28px;
  color: #ffffff;
  background:
    radial-gradient(circle at 85% 20%, rgba(20, 184, 166, 0.36), transparent 30%),
    linear-gradient(135deg, #0f172a, #1d4ed8);
  box-shadow: var(--shadow);
}

.compact-hero {
  min-height: 260px;
}

.category-hero {
  align-items: center;
}

.category-filter {
  min-width: min(360px, 100%);
}

.search-page-panel {
  padding: 42px 0 72px;
}

.search-page-form {
  align-items: center;
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.search-page-form select {
  max-width: 190px;
  border-radius: 14px;
}

.search-summary {
  margin: 18px 4px 24px;
  font-weight: 800;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
}

.pagination a,
.pagination strong,
.pagination span {
  min-width: 42px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  font-weight: 900;
}

.pagination strong {
  color: #ffffff;
  background: var(--brand);
  border-color: var(--brand);
}

.detail-player-area {
  background: #020617;
  padding: 20px max(16px, calc((100vw - 1180px) / 2)) 40px;
}

.detail-backline {
  margin: 0 auto 16px;
  color: #cbd5e1;
  font-weight: 800;
}

.detail-backline a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.player-shell {
  position: relative;
  overflow: hidden;
  max-width: 1180px;
  margin: 0 auto;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.48);
  aspect-ratio: 16 / 9;
}

.video-player {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 42%, rgba(37, 99, 235, 0.35), transparent 24%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.62));
  cursor: pointer;
}

.player-start span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(10px);
  font-size: 30px;
}

.player-start strong {
  font-size: 18px;
}

.player-shell.is-playing .player-start {
  opacity: 0;
  pointer-events: none;
}

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

.detail-title-card,
.info-card,
.side-card {
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: var(--soft-shadow);
}

.detail-title-card {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  margin-bottom: 20px;
}

.detail-title-card h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  font-weight: 950;
}

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

.info-card,
.side-card {
  padding: 24px;
  margin-bottom: 20px;
}

.info-card p {
  margin: 0;
  font-size: 17px;
  color: #334155;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-cloud span {
  padding: 8px 12px;
  color: #075985;
  background: #e0f2fe;
}

.side-card dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

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

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

.side-links a {
  display: inline-flex;
  padding: 9px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
}

.prose-panel {
  max-width: 880px;
}

.site-footer {
  margin-top: 42px;
  padding: 54px max(16px, calc((100vw - 1180px) / 2)) 24px;
  color: #cbd5e1;
  background: #020617;
}

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

.footer-brand {
  display: inline-block;
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 950;
}

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

.site-footer p {
  margin: 0;
  color: #94a3b8;
}

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
  font-size: 14px;
}

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

@media (max-width: 1060px) {
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .detail-layout,
  .split-section,
  .home-search-panel {
    grid-template-columns: 1fr;
  }

  .header-search {
    display: none;
  }
}

@media (max-width: 760px) {
  .site-header-inner {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
  }

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

  .site-nav {
    display: none;
    order: 4;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-link {
    justify-content: center;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 80px;
  }

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

  .home-search-panel {
    margin-top: 0;
    border-radius: 0;
  }

  .big-search,
  .search-page-form {
    flex-direction: column;
  }

  .search-page-form select {
    max-width: none;
  }

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

  .movie-grid,
  .category-shortcuts,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .page-hero,
  .detail-title-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-hero {
    padding: 32px 22px;
    border-radius: 20px;
  }

  .poster-wide {
    width: 112px;
    height: 76px;
    flex-basis: 112px;
  }

  .row-rank {
    display: none;
  }
}
