:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #f1f5f9;
  --text: #1f2937;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-dark: #1e40af;
  --orange: #f97316;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

[hidden] {
  display: none !important;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 20px;
  color: #111827;
}

.brand-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link {
  padding: 9px 13px;
  border-radius: 999px;
  color: #475569;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.header-search {
  display: flex;
  width: 300px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  color: var(--text);
}

.header-search button {
  border: 0;
  padding: 0 16px;
  color: #fff;
  background: var(--blue);
  cursor: pointer;
}

.mobile-nav,
.category-strip {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: none;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.category-strip {
  display: flex;
  padding-bottom: 14px;
}

.category-strip a {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease;
}

.category-strip a:hover {
  background: #dbeafe;
  color: var(--blue);
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: end;
  padding: 92px max(32px, calc((100vw - 1180px) / 2)) 86px;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.68) 48%, rgba(2, 6, 23, 0.28) 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(780px, 100%);
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.22);
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1,
.detail-hero-content h1,
.simple-hero h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-copy p,
.detail-hero-content p,
.simple-hero p {
  width: min(720px, 100%);
  margin: 20px 0 0;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  color: #d1d5db;
}

.hero-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.35);
}

.primary-button:hover,
.header-search button:hover {
  background: var(--blue-dark);
}

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 36px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

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

.hero-dot.is-active {
  background: #fff;
}

.quick-search-block {
  transform: translateY(-34px);
  position: relative;
  z-index: 5;
}

.quick-search-inner {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 18px;
}

.quick-search-inner span {
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
}

.quick-search-inner form {
  display: flex;
  flex: 1;
  gap: 10px;
}

.quick-search-inner input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  padding: 12px 16px;
  background: #fff;
  color: var(--text);
}

.quick-search-inner button {
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  color: #fff;
  background: var(--blue);
  font-weight: 800;
  cursor: pointer;
}

.stack-sections {
  display: grid;
  gap: 64px;
  padding: 28px 0 76px;
}

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

.section-heading h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  flex: 0 0 auto;
  color: var(--blue);
  font-weight: 800;
}

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

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

.movie-card {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.movie-card-wide .poster-frame,
.movie-card-compact .poster-frame {
  aspect-ratio: 16 / 9;
}

.poster-frame img,
.category-card img,
.detail-cover,
.rank-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 55%);
  opacity: 0.75;
}

.duration-badge,
.score-badge {
  position: absolute;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.72);
}

.duration-badge {
  right: 10px;
  bottom: 10px;
}

.score-badge {
  top: 10px;
  right: 10px;
  background: rgba(249, 115, 22, 0.92);
}

.card-body {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.card-body strong {
  color: #111827;
  font-size: 16px;
  line-height: 1.35;
}

.card-body em {
  min-height: 42px;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #64748b;
  font-size: 12px;
}

.meta-row span,
.tag-row span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #f1f5f9;
}

.tag-row span {
  color: var(--blue);
  background: #dbeafe;
}

.latest-section {
  padding: 30px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

.latest-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 280px);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.latest-rail::-webkit-scrollbar,
.category-strip::-webkit-scrollbar,
.mobile-nav::-webkit-scrollbar {
  display: none;
}

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

.category-card,
.category-overview-card {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.category-card img {
  position: absolute;
  inset: 0;
  opacity: 0.65;
}

.category-card span {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  padding: 20px;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.1));
}

.category-card strong,
.category-overview-body strong {
  font-size: 22px;
}

.category-card em,
.category-overview-body em {
  color: #e2e8f0;
  font-style: normal;
  line-height: 1.55;
}

.category-card b,
.category-overview-body b {
  color: #bfdbfe;
}

.category-overview-card {
  min-height: auto;
  background: #fff;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 150px;
  background: #dbeafe;
}

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

.category-overview-body {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.category-overview-body em {
  color: var(--muted);
}

.rank-grid,
.rank-list-large {
  display: grid;
  gap: 12px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 82px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
}

.rank-number {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #475569;
  background: #e2e8f0;
  font-weight: 900;
}

.rank-number.top {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), #ef4444);
}

.rank-item img {
  height: 96px;
  border-radius: 12px;
}

.rank-info {
  display: grid;
  gap: 5px;
}

.rank-info strong {
  font-size: 17px;
}

.rank-info em {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-info span {
  color: #94a3b8;
  font-size: 13px;
}

.page-hero {
  padding: 76px 0;
  background: linear-gradient(135deg, #111827, #1e40af);
  color: #fff;
}

.simple-hero p {
  color: #dbeafe;
}

.filter-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(220px, 1.4fr) repeat(3, minmax(130px, 0.7fr));
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.filter-bar strong {
  display: block;
  font-size: 20px;
}

.filter-bar span {
  display: inline-flex;
  margin-top: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--blue);
  background: #dbeafe;
  font-size: 13px;
  font-weight: 800;
}

.detail-hero {
  position: relative;
  min-height: 430px;
  display: flex;
  align-items: end;
  padding: 90px 0 56px;
  background-position: center;
  background-size: cover;
  color: #fff;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.42));
}

.detail-hero-content {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #cbd5e1;
}

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

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

.player-column {
  display: grid;
  gap: 20px;
}

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

.movie-player {
  width: 100%;
  height: 100%;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.28), rgba(2, 6, 23, 0.68));
  cursor: pointer;
}

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

.play-circle {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--blue);
  background: #fff;
  font-size: 30px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.content-card,
.info-panel {
  padding: 24px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.content-card h2,
.info-panel h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.content-card p,
.info-panel p {
  margin: 0;
  color: #475569;
  line-height: 1.9;
}

.detail-aside {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 18px;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.info-panel dl {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.info-panel dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.info-panel dt {
  color: var(--muted);
}

.info-panel dd {
  margin: 0;
  color: #111827;
  font-weight: 700;
  text-align: right;
}

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

.tag-cloud {
  margin-top: 12px;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  gap: 26px;
}

.footer-brand {
  display: flex;
  align-items: start;
  gap: 14px;
}

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

.footer-brand p {
  max-width: 650px;
  margin: 8px 0 0;
  color: #94a3b8;
  line-height: 1.7;
}

.footer-links,
.footer-category-links,
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.footer-links a,
.footer-category-links a {
  color: #cbd5e1;
}

.footer-links a:hover,
.footer-category-links a:hover {
  color: #60a5fa;
}

.footer-bottom {
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

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

  .mobile-nav {
    display: flex;
  }

  .category-strip {
    padding-top: 0;
  }

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

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

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

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-aside {
    position: static;
    grid-template-columns: 220px 1fr;
  }
}

@media (max-width: 720px) {
  .header-inner {
    height: 66px;
  }

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

  .category-strip {
    display: none;
  }

  .hero {
    min-height: 560px;
  }

  .hero-slide {
    padding: 72px 20px 80px;
  }

  .hero-dots {
    left: 20px;
    right: auto;
  }

  .quick-search-inner,
  .quick-search-inner form,
  .section-heading,
  .footer-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .poster-grid,
  .movie-grid,
  .wide-grid,
  .category-grid,
  .category-overview-grid,
  .rank-grid,
  .filter-bar,
  .detail-aside {
    grid-template-columns: 1fr;
  }

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

  .rank-item img {
    height: 86px;
  }

  .latest-section,
  .filter-panel {
    padding: 18px;
  }

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