:root {
  --page-bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --panel: #ffffff;
  --emerald: #059669;
  --emerald-dark: #047857;
  --teal: #0f766e;
  --slate: #1e293b;
  --deep: #020617;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.header-inner {
  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: 12px;
  min-width: 210px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.32);
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

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

.brand-copy small {
  margin-top: 4px;
  color: #cbd5e1;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 14px;
}

.nav-link {
  color: #e2e8f0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #34d399;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.hero-carousel {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 10% 10%, rgba(16, 185, 129, 0.32), transparent 34%), linear-gradient(135deg, #0f172a 0%, #334155 52%, #065f46 100%);
}

.hero-slides {
  position: relative;
}

.hero-slide {
  display: none;
  min-height: 640px;
  position: relative;
  align-items: center;
  isolation: isolate;
}

.hero-slide.is-active {
  display: flex;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(15, 23, 42, 0.7) 45%, rgba(15, 118, 110, 0.28) 100%);
}

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

.hero-content {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 120px 0 180px;
  max-width: 760px;
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px);
  font-size: 14px;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 22px;
  max-width: 820px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 720px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #0f766e;
  background: #d1fae5;
  font-size: 12px;
  font-weight: 600;
}

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

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

.btn-primary,
.btn-ghost,
.hero-search button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
  padding: 0 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 16px 30px rgba(5, 150, 105, 0.32);
}

.btn-primary:hover,
.btn-ghost:hover,
.hero-search button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

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

.hero-panel {
  position: absolute;
  left: 50%;
  bottom: 38px;
  transform: translateX(-50%);
  width: min(1200px, calc(100% - 32px));
  display: grid;
  grid-template-columns: minmax(280px, 430px) 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.35);
}

.hero-search {
  display: flex;
  min-height: 50px;
  overflow: hidden;
  border-radius: 999px;
  background: #ffffff;
}

.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

.hero-search input {
  padding: 0 18px;
}

.hero-search button {
  border: 0;
  padding: 0 20px;
  color: #ffffff;
  background: var(--emerald);
  cursor: pointer;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.08);
}

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

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

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

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

.soft-panel {
  width: min(1200px, calc(100% - 32px));
  margin-top: 18px;
  padding: 34px;
  border-radius: 30px;
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
}

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

.section-heading h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

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

.section-more {
  min-width: max-content;
  padding: 0 18px;
  color: var(--emerald-dark);
  background: #d1fae5;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 22px;
}

.featured-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.archive-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

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

.movie-card a {
  display: block;
  height: 100%;
}

.card-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #e2e8f0;
}

.compact-card .card-cover {
  aspect-ratio: 3 / 4;
}

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

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

.card-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 700;
}

.card-badge {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.92);
  box-shadow: 0 16px 34px rgba(5, 150, 105, 0.35);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 9px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  min-height: 43px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.tag-line .pill {
  min-height: 24px;
  padding: 4px 8px;
  font-size: 11px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.full-category-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.category-card {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.category-cover {
  position: relative;
  display: block;
  height: 170px;
  overflow: hidden;
  background: #cbd5e1;
}

.category-cover img {
  height: 100%;
  object-fit: cover;
  filter: brightness(0.72);
  transition: transform 0.35s ease;
}

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

.category-cover span {
  position: absolute;
  left: 20px;
  bottom: 18px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
}

.category-body {
  padding: 20px;
}

.category-body h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-body p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.7;
}

.category-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-preview a {
  max-width: 100%;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--emerald-dark);
  background: #ecfdf5;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #334155 58%, #065f46);
}

.page-hero > div {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

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

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.breadcrumb {
  margin: 0 0 18px !important;
  color: #a7f3d0 !important;
  font-size: 14px !important;
}

.breadcrumb a {
  color: #ffffff;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-bottom: 28px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.empty-state {
  margin-bottom: 22px;
  padding: 18px;
  border-radius: 16px;
  color: #475569;
  background: #ffffff;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

.expanded-rank-list {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.detail-page {
  width: 100%;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 36px;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  background: #cbd5e1;
  box-shadow: var(--shadow);
}

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

.detail-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-info .breadcrumb {
  color: var(--emerald-dark) !important;
}

.detail-info .breadcrumb a {
  color: var(--emerald-dark);
}

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

.lead-text {
  margin: 0 0 22px;
  color: #334155;
  font-size: 19px;
  line-height: 1.8;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0 0;
}

.detail-meta div {
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.detail-meta dt {
  color: var(--muted);
  font-size: 12px;
}

.detail-meta dd {
  margin: 6px 0 0;
  font-weight: 800;
}

.player-section h2,
.detail-copy h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.24);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.48));
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.play-button {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 20px 45px rgba(5, 150, 105, 0.35);
  cursor: pointer;
  font-size: 28px;
  pointer-events: auto;
}

.player-status {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  min-height: 20px;
  margin: 0;
  color: #fecaca;
  font-size: 13px;
  pointer-events: none;
}

.detail-copy {
  padding-top: 24px;
}

.detail-copy p {
  margin: 0 0 28px;
  color: #334155;
  font-size: 17px;
  line-height: 1.9;
}

.detail-nav {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 54px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.detail-nav a {
  max-width: 48%;
  padding: 14px 18px;
  border-radius: 999px;
  color: var(--emerald-dark);
  background: #d1fae5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
}

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-inner strong {
  color: #ffffff;
  font-size: 22px;
}

.footer-inner p {
  max-width: 680px;
  margin: 10px 0 0;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 12px;
  min-width: 240px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-slide {
    min-height: 720px;
  }

  .hero-content {
    padding: 96px 0 240px;
  }

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

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

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

  .detail-cover {
    max-width: 360px;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .header-inner {
    width: min(100% - 24px, 1200px);
  }

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

  .hero-content,
  .hero-panel,
  .content-section,
  .page-hero > div,
  .detail-hero,
  .detail-nav,
  .footer-inner {
    width: min(100% - 24px, 1200px);
  }

  .hero-slide {
    min-height: 760px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-links {
    max-height: 84px;
    overflow: hidden;
  }

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

  .soft-panel {
    padding: 24px;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 15px;
  }

  .card-body p {
    min-height: 38px;
    font-size: 12px;
  }

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

  .detail-nav {
    flex-direction: column;
  }

  .detail-nav a {
    max-width: 100%;
  }
}
