:root {
  --green: #10b981;
  --green-dark: #059669;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f3f4f6;
  --paper: #ffffff;
  --footer: #111827;
  --shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 46%, #f8fafc 100%);
  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 {
  display: block;
  max-width: 100%;
}

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

.nav-shell {
  width: min(1200px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green), #14b8a6);
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.3);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: #374151;
}

.main-nav a {
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--green-dark);
}

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

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #111827;
}

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

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(16, 185, 129, 0.32), transparent 32%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.38) 58%, rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  padding-bottom: 76px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  color: #ffffff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 700;
  color: #d1fae5;
}

.hero-kicker span,
.eyebrow {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.9);
  color: #ffffff;
}

.hero-content h1 {
  max-width: 780px;
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 20px);
}

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

.hero-tags {
  margin-bottom: 28px;
}

.hero-tags span,
.detail-meta span,
.tag-list span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #e5e7eb;
  background: rgba(17, 24, 39, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 13px;
}

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

.btn-primary,
.btn-ghost,
.filter-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  box-shadow: 0 16px 30px rgba(16, 185, 129, 0.32);
}

.btn-primary:hover,
.filter-row button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(16, 185, 129, 0.38);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

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

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: var(--green);
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  width: min(1200px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: 54px;
  border-radius: 28px;
  color: #ffffff;
  background:
    radial-gradient(circle at right top, rgba(20, 184, 166, 0.48), transparent 34%),
    linear-gradient(135deg, #111827, #064e3b);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 850px;
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: 18px;
}

.content-section {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
}

.soft-bg {
  width: 100%;
  max-width: none;
  padding: 54px max(16px, calc((100% - 1200px) / 2));
  background: linear-gradient(90deg, rgba(236, 253, 245, 0.9), rgba(240, 253, 250, 0.7));
}

.ranking-band {
  padding-top: 64px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

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

.section-link,
.text-link {
  color: var(--green-dark);
  font-weight: 800;
}

.movie-grid,
.category-grid,
.category-large-grid,
.ranking-list {
  display: grid;
  gap: 18px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: var(--shadow);
  transform: translateY(-5px);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #065f46);
}

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

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.12));
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

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

.rank-badge {
  left: 10px;
  right: auto;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.movie-info {
  padding: 15px;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.3;
}

.movie-info h3 a:hover {
  color: var(--green-dark);
}

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

.movie-meta {
  gap: 6px;
  color: #6b7280;
  font-size: 12px;
}

.movie-meta span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #f3f4f6;
}

.movie-tags {
  margin: 10px 0 0;
  color: #9ca3af;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.category-tile,
.category-card-large {
  border: 1px solid rgba(16, 185, 129, 0.16);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.category-tile {
  min-height: 160px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-card-large:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-tile strong {
  font-size: 20px;
}

.category-tile span,
.category-card-large span {
  color: var(--green-dark);
  font-weight: 800;
}

.category-tile p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.category-card-large {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

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

.category-card-large h2 {
  margin: 0 0 8px;
}

.category-card-large p {
  color: var(--muted);
}

.filter-panel {
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.filter-title {
  margin-bottom: 12px;
  font-weight: 900;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 160px 160px auto;
  gap: 12px;
}

.filter-row input,
.filter-row select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  outline: none;
}

.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.filter-row button {
  border: 0;
  color: #ffffff;
  background: var(--green-dark);
  cursor: pointer;
}

.filter-count {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.detail-main {
  background: #ffffff;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.32;
  filter: blur(4px);
}

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

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.35));
}

.detail-shell {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 60px 0;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: #d1d5db;
  font-size: 14px;
}

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

.detail-intro h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 18px;
  color: #e5e7eb;
  font-size: 18px;
}

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

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.detail-section {
  padding-top: 38px;
  padding-bottom: 38px;
}

.player-card {
  overflow: hidden;
  border-radius: 24px;
  background: #111827;
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.site-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.18), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

.player-start span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 16px 40px rgba(16, 185, 129, 0.35);
  font-size: 32px;
}

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

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

.player-note {
  padding: 14px 18px;
  color: #d1d5db;
  background: #111827;
}

.prose-section {
  color: #1f2937;
  font-size: 17px;
}

.prose-section h2 {
  margin: 22px 0 10px;
  font-size: 26px;
}

.prose-section p {
  margin: 0 0 18px;
}

.sitemap-section h2 {
  margin-top: 34px;
}

.sitemap-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sitemap-list li {
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}

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

.sitemap-columns {
  columns: 3;
  column-gap: 36px;
}

.site-footer {
  color: #d1d5db;
  background: var(--footer);
}

.footer-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

.brand-footer {
  color: #ffffff;
}

.footer-brand p,
.site-footer li {
  color: #9ca3af;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: #ffffff;
}

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

.site-footer a:hover {
  color: #34d399;
}

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

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

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

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

  .hero-arrow {
    display: none;
  }

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

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

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

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

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

  .detail-poster {
    width: 210px;
  }

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

  .sitemap-columns {
    columns: 1;
  }
}

@media (max-width: 520px) {
  .nav-shell,
  .content-section,
  .page-hero,
  .detail-shell,
  .footer-shell {
    width: min(100% - 24px, 1200px);
  }

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

  .movie-grid,
  .compact-grid,
  .ranking-grid,
  .ranking-list,
  .category-grid,
  .category-large-grid {
    gap: 12px;
  }

  .movie-info {
    padding: 12px;
  }

  .movie-info h3 {
    font-size: 15px;
  }

  .movie-line {
    font-size: 13px;
  }
}
