:root {
  --emerald: #059669;
  --emerald-dark: #065f46;
  --emerald-soft: #d1fae5;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --dark: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  display: block;
  width: 100%;
  height: auto;
}

button,
input,
select {
  font: inherit;
}

.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);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
  box-shadow: 0 12px 26px rgba(5, 150, 105, 0.28);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.06) rotate(-2deg);
}

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

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

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

.brand-dark .brand-text strong {
  color: #ffffff;
}

.brand-dark .brand-text small {
  color: #9ca3af;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--emerald);
}

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

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

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

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

.hero-slide {
  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;
  opacity: 0.58;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.48) 45%, rgba(0, 0, 0, 0.08) 100%);
}

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

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

.hero-kicker,
.eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 7px 13px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--emerald);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-content h1 {
  margin: 20px 0 16px;
  color: #ffffff;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-content p {
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: clamp(18px, 2vw, 22px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-meta span {
  padding: 7px 12px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-weight: 700;
}

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

.tag-row span,
.detail-tags a {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--emerald-dark);
  background: var(--emerald-soft);
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #ffffff;
  background: var(--emerald);
  box-shadow: 0 16px 30px rgba(5, 150, 105, 0.25);
}

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

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

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

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.32);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

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

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

.search-band {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.search-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
}

.search-inner strong {
  display: block;
  font-size: 20px;
}

.search-inner span {
  color: var(--muted);
}

.home-search {
  display: flex;
  width: min(520px, 100%);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f9fafb;
}

.home-search input {
  flex: 1;
  min-width: 0;
  padding: 0 14px;
  border: 0;
  outline: 0;
  background: transparent;
}

.home-search button {
  border: 0;
  border-radius: 12px;
  padding: 12px 20px;
  color: #ffffff;
  background: var(--emerald);
  font-weight: 800;
  cursor: pointer;
}

.content-section {
  padding: 58px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.04em;
}

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

.section-more {
  color: var(--emerald);
  font-weight: 900;
}

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

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

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

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card figure {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e5e7eb;
}

.movie-card.landscape figure {
  aspect-ratio: 16 / 9;
}

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

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

.movie-card figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.75) 100%);
}

.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--emerald);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: rgba(15, 23, 42, 0.82);
}

.card-body {
  padding: 16px;
}

.card-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p:not(.card-meta) {
  margin: 0 0 12px;
  color: #4b5563;
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-tile,
.category-top {
  display: block;
  min-height: 152px;
  padding: 22px;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(135deg, #064e3b, #059669);
  box-shadow: 0 18px 36px rgba(6, 95, 70, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(6, 95, 70, 0.24);
}

.category-tile strong,
.category-top strong {
  display: block;
  margin-bottom: 10px;
  font-size: 21px;
}

.category-tile span,
.category-top span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.rank-band {
  padding: 70px 0;
  background: radial-gradient(circle at top left, rgba(5, 150, 105, 0.34), transparent 32%), linear-gradient(135deg, #020617, #111827);
  color: #ffffff;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 36px;
  align-items: center;
}

.rank-copy span {
  color: #6ee7b7;
  font-weight: 900;
}

.rank-copy h2,
.dark-hero h1 {
  margin: 10px 0 16px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.rank-copy p,
.dark-hero p {
  color: #d1d5db;
}

.mini-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mini-list.slim,
.rank-side {
  grid-template-columns: 1fr;
}

.mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  color: #111827;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mini-card:hover {
  transform: translateX(4px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.13);
}

.mini-card img {
  width: 86px;
  height: 58px;
  flex: 0 0 auto;
  border-radius: 10px;
  object-fit: cover;
  background: #e5e7eb;
}

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

.mini-card strong {
  font-size: 14px;
  line-height: 1.35;
}

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

.mini-rank {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  margin-right: 6px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--emerald);
  font-size: 12px;
  font-weight: 900;
}

.page-hero {
  padding: 74px 0;
}

.page-hero.soft {
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
}

.page-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  color: #4b5563;
  font-size: 18px;
}

.dark-hero {
  color: #ffffff;
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.36), transparent 35%), linear-gradient(135deg, #020617, #111827);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.crumbs a {
  color: var(--emerald);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.filter-panel label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #f9fafb;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.category-overview-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

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

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

.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: blur(2px);
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.66), rgba(2, 6, 23, 0.35));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

.poster-panel {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.poster-panel img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-intro h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.detail-intro .lead {
  max-width: 780px;
  color: #e5e7eb;
  font-size: 20px;
}

.detail-meta span {
  background: rgba(255, 255, 255, 0.18);
}

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

.main-column,
.side-column {
  display: grid;
  gap: 22px;
}

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

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(5, 150, 105, 0.28), rgba(0, 0, 0, 0.64));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: var(--emerald);
  box-shadow: 0 20px 45px rgba(5, 150, 105, 0.35);
  font-size: 34px;
}

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

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

.detail-block,
.side-card {
  padding: 26px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.detail-block h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.detail-block p {
  margin: 0;
  color: #374151;
  font-size: 17px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

.side-card dt {
  color: var(--muted);
  font-weight: 800;
}

.side-card dd {
  margin: 0;
  color: #111827;
}

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

.prev-next a {
  padding: 18px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.prev-next span,
.prev-next strong {
  display: block;
}

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

.prev-next strong {
  margin-top: 5px;
  color: var(--emerald-dark);
}

.site-footer {
  margin-top: 30px;
  color: #d1d5db;
  background: #111827;
}

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

.footer-brand p {
  max-width: 520px;
  color: #9ca3af;
}

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

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

.site-footer li + li {
  margin-top: 9px;
}

.site-footer a:hover {
  color: #6ee7b7;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  text-align: center;
}

.is-hidden-card {
  display: none !important;
}

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

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

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

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

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

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

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

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

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

  .nav-link:hover,
  .nav-link.active {
    background: #ecfdf5;
  }

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

  .hero-arrow {
    display: none;
  }

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

  .home-search {
    width: 100%;
  }

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

  .category-grid,
  .category-overview-grid,
  .mini-list {
    grid-template-columns: 1fr;
  }

  .detail-hero-inner {
    min-height: auto;
    padding: 60px 0;
    grid-template-columns: 1fr;
  }

  .poster-panel {
    max-width: 260px;
  }

  .side-column,
  .prev-next,
  .footer-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand-text small {
    display: none;
  }

  .hero-content h1,
  .detail-intro h1 {
    letter-spacing: -0.03em;
  }

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

  .movie-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .content-section {
    padding: 42px 0;
  }

  .detail-block,
  .side-card {
    padding: 20px;
  }
}
