:root {
  --bg: #f9fafb;
  --panel: #ffffff;
  --panel-soft: rgba(255, 255, 255, 0.88);
  --text: #111827;
  --muted: #6b7280;
  --line: rgba(229, 231, 235, 0.9);
  --accent: #e11d48;
  --accent-dark: #be123c;
  --accent-soft: rgba(225, 29, 72, 0.1);
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

button,
a,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(229, 231, 235, 0.72);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(18px);
}

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

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  flex: 0 0 auto;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  border-radius: 16px;
  background: linear-gradient(135deg, #e11d48 0%, #f97316 100%);
  box-shadow: 0 14px 28px rgba(225, 29, 72, 0.22);
}

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

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

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

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 420px;
  max-width: 460px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  color: var(--text);
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input,
.mobile-search input {
  padding: 11px 88px 11px 18px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #fb7185;
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.16);
}

.header-search button,
.mobile-search button {
  position: absolute;
  right: 5px;
  top: 5px;
  bottom: 5px;
  padding: 0 18px;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  cursor: pointer;
}

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

.nav-link,
.mobile-link {
  color: #4b5563;
  text-decoration: none;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
  padding: 9px 14px;
  font-size: 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 3px 0;
  background: #374151;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 12px 16px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.mobile-nav.open {
  display: block;
}

.mobile-search {
  position: relative;
  margin-bottom: 14px;
}

.mobile-links,
.mobile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-link,
.mobile-chips a {
  padding: 8px 12px;
  font-size: 13px;
}

.mobile-chips a {
  color: #4b5563;
  text-decoration: none;
  border-radius: 999px;
  background: #f3f4f6;
}

.hero {
  position: relative;
  height: 540px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.94) 0%, rgba(31, 41, 55, 0.74) 48%, rgba(17, 24, 39, 0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1280px;
}

.hero-content > * {
  max-width: 720px;
}

.hero-pill,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  font-weight: 700;
}

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

.hero h1 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.hero-line {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.6;
}

.hero-summary {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.tag-row span {
  color: #4b5563;
  background: #f3f4f6;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn {
  min-height: 46px;
  padding: 0 22px;
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 18px 30px rgba(225, 29, 72, 0.22);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.primary-btn:hover {
  background: var(--accent-dark);
}

.ghost-btn {
  min-height: 46px;
  padding: 0 18px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 26px;
  z-index: 4;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.section-block {
  padding: 56px 0 0;
}

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.article-section h2,
.player-section h2,
.section-mini-head h3 {
  margin: 0;
  color: var(--text);
  line-height: 1.18;
}

.section-head h2 {
  margin-top: 8px;
  font-size: clamp(26px, 4vw, 38px);
}

.section-kicker {
  padding: 5px 10px;
  font-size: 12px;
  letter-spacing: 0.05em;
}

.section-more,
.text-link {
  color: var(--accent);
  white-space: nowrap;
}

.section-more {
  padding: 9px 14px;
  background: var(--accent-soft);
}

.category-grid,
.movie-grid,
.overview-grid,
.editor-grid {
  display: grid;
  gap: 20px;
}

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

.category-card {
  position: relative;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  color: #ffffff;
  text-decoration: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  isolation: isolate;
}

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

.category-card:hover img,
.category-overview-card:hover .category-cover img,
.movie-card:hover img {
  transform: scale(1.06);
}

.category-shade,
.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.72) 100%);
}

.category-card strong,
.category-card small {
  position: relative;
  z-index: 2;
  padding: 0 18px;
}

.category-card strong {
  font-size: 22px;
  margin-bottom: 8px;
}

.category-card small {
  min-height: 46px;
  padding-bottom: 18px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(229, 231, 235, 0.78);
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

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

.poster-type,
.rank-badge {
  position: absolute;
  z-index: 3;
  color: #ffffff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.poster-type {
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e11d48, #f97316);
}

.card-body {
  padding: 14px;
}

.card-title {
  display: block;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-title:hover {
  color: var(--accent);
}

.card-meta,
.card-line {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.card-meta {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-line {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body .tag-row {
  margin-top: 12px;
}

.card-body .tag-row span:nth-child(n + 3) {
  display: none;
}

.two-columns {
  display: grid;
  grid-template-columns: minmax(300px, 420px) 1fr;
  gap: 28px;
  align-items: start;
  padding-bottom: 56px;
}

.ranking-panel,
.editor-column,
.category-overview-card,
.filter-panel,
.article-section,
.player-section,
.detail-hero {
  background: var(--panel);
  border: 1px solid rgba(229, 231, 235, 0.78);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.ranking-panel {
  padding: 12px;
}

.horizontal-card {
  display: grid;
  grid-template-columns: auto 58px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  color: var(--text);
  text-decoration: none;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.horizontal-card:hover {
  background: #f9fafb;
}

.horizontal-card img {
  width: 58px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
}

.horizontal-card strong,
.horizontal-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horizontal-card strong {
  font-size: 15px;
}

.horizontal-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.mini-rank {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

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

.editor-column {
  padding: 14px;
}

.section-mini-head {
  margin-bottom: 8px;
}

.section-mini-head h3 {
  font-size: 18px;
}

.section-mini-head a {
  color: var(--accent);
  font-size: 13px;
  text-decoration: none;
}

.mini-list .horizontal-card {
  grid-template-columns: 52px 1fr;
  padding: 8px 0;
}

.mini-list .horizontal-card img {
  width: 52px;
  height: 70px;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  padding: 42px;
  border-radius: 30px;
}

.soft-hero {
  background: linear-gradient(135deg, #fff1f2 0%, #ffffff 52%, #f9fafb 100%);
  border: 1px solid rgba(251, 113, 133, 0.16);
}

.compact-hero {
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin-top: 10px;
  font-size: clamp(32px, 4vw, 48px);
}

.page-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  overflow: hidden;
  padding: 16px;
}

.category-cover {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
  background: #111827;
}

.category-overview-card h2 {
  margin: 4px 0 8px;
  font-size: 24px;
}

.category-overview-card h2 a,
.category-overview-card li a {
  color: var(--text);
  text-decoration: none;
}

.category-overview-card p,
.category-overview-card ul {
  color: var(--muted);
  line-height: 1.7;
}

.category-overview-card ul {
  padding-left: 18px;
}

.category-overview-card li a:hover {
  color: var(--accent);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 16px;
}

.empty-state {
  display: none;
  margin: 24px 0 0;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.empty-state.show {
  display: block;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.detail-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  padding: 22px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 2 / 3;
  background: #111827;
}

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

.detail-info {
  align-self: center;
}

.detail-info h1 {
  margin-top: 10px;
  font-size: clamp(32px, 4vw, 52px);
}

.detail-line {
  margin: 16px 0 18px;
  color: #374151;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 7px 12px;
  color: #4b5563;
  background: #f3f4f6;
  border-radius: 999px;
  font-size: 13px;
}

.detail-tags {
  margin-bottom: 24px;
}

.player-section,
.article-section,
.related-block {
  margin-top: 28px;
}

.player-section {
  padding: 22px;
}

.player-section h2,
.article-section h2 {
  margin-bottom: 16px;
  font-size: 26px;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18) 0%, rgba(0, 0, 0, 0.55) 70%);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.play-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid var(--accent);
}

.article-section {
  padding: 26px;
}

.article-section p {
  margin: 0 0 22px;
  color: #374151;
  line-height: 1.95;
  text-align: justify;
}

.article-section p:last-child {
  margin-bottom: 0;
}

.related-block {
  padding-top: 0;
}

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

.compact-card .card-line,
.compact-card .tag-row {
  display: none;
}

.ranking-grid .movie-card:nth-child(-n + 3) .rank-badge {
  background: linear-gradient(135deg, #f59e0b, #e11d48);
}

.site-footer {
  margin-top: 20px;
  padding: 34px 0;
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-inner strong {
  font-size: 18px;
}

.footer-inner p {
  margin: 8px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a {
  color: #4b5563;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

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

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

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

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

  .mobile-toggle {
    display: grid;
    margin-left: auto;
  }

  .hero {
    height: 600px;
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 72px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.18) 0%, rgba(17, 24, 39, 0.94) 82%);
  }

  .category-grid,
  .overview-grid,
  .editor-grid,
  .two-columns,
  .detail-hero {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    max-width: 320px;
  }
}

@media (max-width: 720px) {
  .header-inner,
  .footer-inner,
  .section-block,
  .page-main,
  .detail-main,
  .hero-content {
    width: min(100% - 24px, 1280px);
  }

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

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

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

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

  .page-hero,
  .detail-hero,
  .player-section,
  .article-section {
    padding: 20px;
    border-radius: 22px;
  }

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

  .category-cover {
    aspect-ratio: 16 / 9;
  }

  .section-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-actions {
    gap: 10px;
  }

  .primary-btn,
  .ghost-btn {
    min-height: 42px;
    padding: 0 16px;
  }

  .card-body {
    padding: 12px;
  }

  .card-line {
    min-height: 40px;
  }
}

@media (max-width: 420px) {
  .movie-grid,
  .large-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 34px;
  }
}
