:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --soft: #e5e7eb;
  --dark: #111827;
  --accent: #059669;
  --accent-dark: #047857;
  --accent-soft: #d1fae5;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 45%, #f8fafc 100%);
  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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(229, 231, 235, 0.95);
  backdrop-filter: blur(14px);
}

.header-inner {
  max-width: 1180px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #14b8a6);
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(5, 150, 105, 0.25);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link,
.mobile-link {
  color: #374151;
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #111827;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 18px;
  border-top: 1px solid #f3f4f6;
}

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

.hero-carousel {
  position: relative;
  height: 68vh;
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

.hero-slides,
.hero-slide {
  height: 100%;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.28), transparent 32%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.18)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent 46%);
}

.hero-content {
  position: absolute;
  inset: 0;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 72px;
  display: flex;
  align-items: flex-end;
}

.hero-copy {
  max-width: 720px;
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 16px;
  padding: 6px 13px;
  color: #ffffff;
  background: var(--accent);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

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

.hero-desc {
  max-width: 680px;
  margin: 18px 0 0;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 19px);
}

.hero-tags,
.tag-list,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-list span,
.detail-meta span {
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

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

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

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  padding: 0 24px;
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 14px 30px rgba(5, 150, 105, 0.3);
}

.primary-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.primary-btn.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

.ghost-btn {
  padding: 0 22px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  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: 32px;
  background: var(--accent);
}

.site-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 54px 20px;
}

.site-section.tinted {
  max-width: none;
  margin: 0;
}

.site-section.tinted > * {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.emerald-tint {
  background: linear-gradient(90deg, rgba(209, 250, 229, 0.75), rgba(240, 253, 250, 0.55));
}

.amber-tint {
  background: linear-gradient(90deg, rgba(254, 243, 199, 0.72), rgba(255, 247, 237, 0.65));
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.heading-line {
  flex: 1;
  height: 4px;
  min-width: 40px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 999px;
}

.section-more {
  min-height: 36px;
  color: var(--accent);
  font-size: 14px;
}

.movie-grid {
  display: grid;
  gap: 18px;
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(5, 150, 105, 0.35);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #e5e7eb, #f9fafb);
}

.movie-card.compact .poster-wrap {
  aspect-ratio: 2 / 3;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.65));
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.92);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.poster-year {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 8px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.72);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
}

.movie-card-body {
  display: grid;
  gap: 7px;
  padding: 13px;
}

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

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

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

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #6b7280;
  font-size: 12px;
}

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

.category-card,
.category-overview-card {
  display: grid;
  gap: 12px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong,
.category-overview-card h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.category-card em,
.category-overview-card p {
  color: var(--muted);
  font-style: normal;
}

.category-card span {
  display: grid;
  gap: 6px;
}

.category-card span a {
  overflow: hidden;
  color: var(--accent);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.mini-posters img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: #e5e7eb;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 34px 54px 1fr;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(229, 231, 235, 0.82);
  border-radius: 16px;
}

.rank-num {
  color: var(--accent);
  font-size: 22px;
  font-weight: 900;
}

.rank-item img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 9px;
  background: #e5e7eb;
}

.rank-text {
  min-width: 0;
}

.rank-text strong,
.rank-text em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-text em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  min-height: 310px;
  display: flex;
  align-items: flex-end;
  color: #ffffff;
  background:
    radial-gradient(circle at 78% 28%, rgba(16, 185, 129, 0.35), transparent 26%),
    linear-gradient(135deg, #0f172a, #111827 52%, #064e3b);
}

.page-hero > div {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 70px 20px 54px;
}

.page-hero p:last-child {
  max-width: 760px;
  margin: 16px 0 0;
  color: #d1d5db;
  font-size: 18px;
}

.filter-box {
  margin-bottom: 24px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
}

.search-field {
  display: grid;
  gap: 6px;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
}

.search-field input,
.select-group select {
  height: 44px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  outline: none;
}

.search-field input {
  width: 100%;
  padding: 0 14px;
}

.select-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.select-group select {
  min-width: 132px;
  padding: 0 12px;
}

.search-field input:focus,
.select-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.filter-empty {
  display: none;
  margin: 16px 0 0;
  color: var(--muted);
}

.filter-empty.is-visible {
  display: block;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 52px 90px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
}

.ranking-badge {
  color: var(--accent);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.ranking-card img {
  width: 90px;
  height: 120px;
  object-fit: cover;
  border-radius: 12px;
  background: #e5e7eb;
}

.ranking-card strong,
.ranking-card em,
.ranking-card small {
  display: block;
}

.ranking-card strong {
  font-size: 18px;
}

.ranking-card em {
  color: var(--accent);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.ranking-card small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.detail-main {
  background: #f8fafc;
}

.breadcrumb {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--accent);
  font-weight: 700;
}

.detail-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 20px 42px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 28px;
  align-items: center;
}

.player-panel,
.detail-info,
.story-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.player-panel {
  padding: 14px;
}

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

.video-el {
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.56));
  cursor: pointer;
  transition: opacity 0.24s ease;
}

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

.player-start {
  width: 74px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.96);
  border-radius: 999px;
  font-size: 30px;
  box-shadow: 0 16px 36px rgba(5, 150, 105, 0.42);
}

.detail-info {
  padding: 26px;
}

.detail-info .hero-kicker {
  margin-bottom: 14px;
}

.detail-info h1 {
  color: #111827;
  font-size: clamp(30px, 4vw, 46px);
}

.detail-line {
  margin: 18px 0 0;
  color: #4b5563;
  font-size: 17px;
}

.detail-meta {
  margin-top: 18px;
}

.detail-meta span {
  color: #065f46;
  background: var(--accent-soft);
}

.tag-list {
  margin-top: 16px;
}

.tag-list span {
  color: #374151;
  background: #f3f4f6;
}

.detail-content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.story-card {
  padding: 26px;
}

.story-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

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

.related-section {
  padding-top: 32px;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 20px;
  display: grid;
  gap: 14px;
  text-align: center;
}

.footer-logo {
  justify-content: center;
  color: #ffffff;
  font-size: 20px;
}

.footer-inner p {
  margin: 0;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  color: #d1fae5;
  font-size: 14px;
}

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

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

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

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

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

  .menu-toggle {
    display: block;
  }

  .logo-text {
    font-size: 17px;
  }

  .hero-carousel {
    height: 72vh;
    min-height: 560px;
  }

  .hero-content {
    padding-bottom: 78px;
  }

  .hero-arrow {
    width: 38px;
    height: 38px;
    font-size: 26px;
  }

  .hero-prev {
    left: 12px;
  }

  .hero-next {
    right: 12px;
  }

  .site-section {
    padding: 40px 16px;
  }

  .section-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .heading-line {
    order: 3;
    width: 100%;
    flex-basis: 100%;
  }

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

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

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

  .select-group select {
    flex: 1 1 140px;
  }

  .ranking-strip,
  .ranking-list {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    grid-template-columns: 44px 76px 1fr;
  }

  .ranking-card img {
    width: 76px;
    height: 102px;
  }

  .detail-hero,
  .detail-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .detail-info,
  .story-card {
    padding: 20px;
  }
}
