:root {
  --bg: #f8fafc;
  --bg-soft: #f3f4f6;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --border: rgba(148, 163, 184, 0.32);
  --dark: #111827;
  --dark-soft: #1f2937;
  --accent: #0f172a;
  --accent-soft: #e5e7eb;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(135deg, #f8fafc 0%, #f3f4f6 45%, #f5f5f4 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.header-inner,
.footer-inner,
.section-wrap,
.page-main,
.detail-main,
.ranking-list {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 210px;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #334155);
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

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

.brand-dark .brand-icon {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 600;
  color: #334155;
}

.main-nav a {
  position: relative;
  padding: 8px 0;
}

.main-nav a::after {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  content: "";
  background: var(--dark);
  transition: width 0.25s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #334155;
}

.hero-carousel {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  height: min(72vh, 620px);
  min-height: 480px;
  margin: 28px auto 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #111827;
  box-shadow: var(--shadow);
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 30%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.62) 42%, rgba(15, 23, 42, 0.18)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.82), transparent 45%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  bottom: clamp(28px, 8vw, 80px);
  width: min(680px, calc(100% - 48px));
  color: #ffffff;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content .eyebrow {
  color: #cbd5e1;
}

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

.hero-content p {
  max-width: 620px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

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

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  font-size: 13px;
}

.tag-list span {
  color: #334155;
  border-color: var(--border);
  background: #f8fafc;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #111827;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(255, 255, 255, 0.22);
}

.button-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.button-dark {
  color: #ffffff;
  background: var(--dark);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
}

.button-light {
  color: var(--dark);
  background: #f8fafc;
  border: 1px solid var(--border);
}

.hero-controls {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 3;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  backdrop-filter: blur(12px);
  font-size: 28px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

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

.section-wrap {
  margin-top: 48px;
}

.intro-tools,
.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 26px;
  align-items: end;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(16px);
}

.intro-tools h2,
.page-hero h1,
.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.intro-tools p,
.page-hero p,
.category-panel p,
.prose-card p {
  color: var(--muted);
  line-height: 1.8;
}

.quick-search,
.inline-filter,
.filter-panel {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #ffffff;
}

.quick-search label,
.inline-filter label,
.filter-field label {
  display: block;
  margin-bottom: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.quick-search div {
  display: flex;
  gap: 10px;
}

.quick-search input,
.inline-filter input,
.filter-field input,
.filter-field select {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
  outline: none;
}

.quick-search input:focus,
.inline-filter input:focus,
.filter-field input:focus,
.filter-field select:focus {
  border-color: #0f172a;
  box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.08);
}

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

.more-link {
  color: #334155;
  font-weight: 800;
}

.movie-strip {
  display: flex;
  gap: 18px;
  padding: 6px 2px 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.movie-strip::-webkit-scrollbar {
  display: none;
}

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

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

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

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

.strip-card {
  flex: 0 0 172px;
}

.poster-link {
  display: block;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #e5e7eb, #cbd5e1);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.12);
}

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

.poster-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.78));
  transition: opacity 0.3s ease;
}

.play-badge {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

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

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

.movie-card strong {
  display: block;
  margin-top: 10px;
  overflow: hidden;
  color: #111827;
  font-size: 15px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.movie-card p {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-tile,
.category-panel,
.prose-card,
.detail-info-card,
.player-card,
.side-poster-card,
.related-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--surface-strong);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.category-tile {
  position: relative;
  min-height: 190px;
  padding: 22px;
  overflow: hidden;
}

.category-title {
  position: relative;
  z-index: 2;
  display: block;
  color: #111827;
  font-size: 20px;
  font-weight: 900;
}

.category-desc {
  position: relative;
  z-index: 2;
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.category-thumbs {
  position: absolute;
  right: -18px;
  bottom: -18px;
  display: grid;
  grid-template-columns: repeat(2, 54px);
  gap: 8px;
  opacity: 0.72;
  transform: rotate(-8deg);
}

.category-thumbs img {
  width: 54px;
  height: 78px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
}

.page-main {
  padding: 34px 0 64px;
}

.small-hero {
  margin-top: 0;
  background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.category-panels {
  display: grid;
  gap: 26px;
  margin-top: 30px;
}

.category-panel {
  padding: 24px;
}

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

.panel-arrow {
  flex: 0 0 auto;
  color: #334155;
  font-weight: 900;
}

.category-preview-images {
  display: flex;
  gap: 10px;
  margin: 18px 0;
  overflow: hidden;
}

.category-preview-images img {
  width: 64px;
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
}

.slim-strip .strip-card {
  flex-basis: 150px;
}

.full-width-section {
  width: 100%;
}

.filter-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 14px;
  align-items: end;
}

.wide-field {
  grid-column: span 2;
}

.result-meta {
  margin-bottom: 18px;
  color: #475569;
  font-weight: 700;
}

.movie-card.is-hidden,
.rank-row.is-hidden {
  display: none;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 74px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.rank-number {
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
}

.rank-poster img {
  width: 74px;
  height: 104px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-info a {
  display: inline-block;
  margin-bottom: 6px;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
}

.rank-info p {
  margin: 0 0 8px;
  color: #475569;
  line-height: 1.7;
}

.rank-info span {
  color: var(--muted);
  font-size: 13px;
}

.detail-main {
  padding: 24px 0 64px;
}

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

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

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

.detail-primary {
  min-width: 0;
}

.player-card {
  padding: 14px;
  overflow: hidden;
}

.video-player {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 20px;
  background: #000000;
}

.video-player video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}

.center-play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.center-play-button span {
  margin-left: 4px;
  font-size: 26px;
}

.video-player.is-playing .center-play-button {
  opacity: 0;
  pointer-events: none;
}

.player-status {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 4;
  max-width: calc(100% - 32px);
  padding: 8px 12px;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(8px);
  font-size: 13px;
}

.player-status.is-hidden {
  display: none;
}

.detail-info-card {
  margin-top: 20px;
  padding: 28px;
}

.detail-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.detail-title-row h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.meta-line span {
  padding: 8px 12px;
  color: #334155;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8fafc;
  font-size: 14px;
}

.story-block {
  margin-top: 22px;
  padding: 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.highlight-block {
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

.review-block {
  background: linear-gradient(135deg, #ecfeff, #f8fafc);
}

.story-block h2,
.related-panel h2,
.prose-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.story-block p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
  white-space: pre-line;
}

.detail-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.side-poster-card {
  padding: 16px;
}

.side-poster-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
}

.side-poster-card strong {
  display: block;
  margin-top: 14px;
  font-size: 20px;
}

.side-poster-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.related-panel {
  padding: 18px;
}

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

.related-grid .movie-card p {
  display: none;
}

.related-grid .movie-card strong {
  font-size: 13px;
}

.prose-card {
  padding: 32px;
}

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #111827, #1f2937 55%, #0f172a);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) 2fr;
  gap: 32px;
  padding: 46px 0;
}

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

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

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

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid li {
  margin: 9px 0;
  color: #94a3b8;
}

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

@media (max-width: 1080px) {
  .movie-grid,
  .compact-grid,
  .large-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .detail-sidebar {
    position: static;
  }

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

@media (max-width: 820px) {
  .header-inner {
    min-height: 64px;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

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

  .main-nav a:hover {
    background: #f8fafc;
  }

  .main-nav a::after {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }

  .hero-carousel {
    min-height: 560px;
    height: 70vh;
    border-radius: 22px;
  }

  .hero-content {
    left: 22px;
    bottom: 92px;
  }

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

  .intro-tools,
  .page-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .wide-field {
    grid-column: span 1;
  }

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

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

  .rank-row {
    grid-template-columns: 42px 68px minmax(0, 1fr);
  }

  .rank-row .button {
    grid-column: 2 / -1;
    width: max-content;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .footer-inner,
  .section-wrap,
  .page-main,
  .detail-main,
  .ranking-list,
  .hero-carousel {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    min-width: auto;
  }

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

  .brand-text small {
    display: none;
  }

  .hero-carousel {
    min-height: 520px;
  }

  .quick-search div,
  .section-head,
  .detail-title-row,
  .category-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .strip-card {
    flex-basis: 150px;
  }

  .intro-tools,
  .page-hero,
  .detail-info-card,
  .prose-card {
    padding: 22px;
  }

  .rank-info p {
    display: none;
  }
}
