:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f1f5f9;
  --dark: #020617;
  --dark-2: #0f172a;
  --brand: #10b981;
  --brand-2: #059669;
  --brand-soft: #ecfdf5;
  --orange: #f97316;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  color: #fff;
  background: linear-gradient(90deg, #020617 0%, #0f172a 50%, #111827 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.25);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: linear-gradient(135deg, #10b981, #22c55e);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.36);
}

.brand-text strong {
  display: block;
  font-size: 20px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.brand-text span {
  display: block;
  margin-top: 4px;
  color: #cbd5e1;
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 700;
}

.nav-links a {
  padding: 8px 0;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #34d399;
}

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

.mobile-menu {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 18px;
}

.mobile-menu a {
  display: block;
  color: #e2e8f0;
  padding: 12px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 15% 20%, rgba(16, 185, 129, 0.28), transparent 30%), linear-gradient(120deg, #020617 0%, #0f172a 42%, #1e293b 100%);
}

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

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

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: saturate(1.1) contrast(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.8) 48%, rgba(15, 23, 42, 0.18) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.9) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 72vh;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1.02fr) minmax(300px, 0.66fr);
  gap: 46px;
  padding: 64px 20px 54px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  background: rgba(16, 185, 129, 0.94);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 12px 25px rgba(16, 185, 129, 0.25);
}

.hero h1,
.hero h2 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  margin: 0;
  max-width: 690px;
  color: #dbeafe;
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.85;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 30px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  min-height: 46px;
  padding: 0 20px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 16px 32px rgba(16, 185, 129, 0.3);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.hero-panel {
  position: relative;
  z-index: 3;
  align-self: end;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 23, 42, 0.58);
  border-radius: 28px;
  padding: 18px;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(20px);
}

.hero-panel h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.hero-mini-list {
  display: grid;
  gap: 12px;
}

.hero-mini {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-mini:hover {
  background: rgba(16, 185, 129, 0.18);
  transform: translateY(-2px);
}

.hero-mini img {
  width: 72px;
  height: 58px;
  border-radius: 14px;
  object-fit: cover;
}

.hero-mini strong {
  display: block;
  color: #fff;
  font-size: 14px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-mini span {
  display: block;
  margin-top: 4px;
  color: #cbd5e1;
  font-size: 12px;
}

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

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: #10b981;
}

.search-strip {
  margin-top: -32px;
  position: relative;
  z-index: 8;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(18px);
}

.search-box input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
  color: var(--ink);
  background: #fff;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.main-space {
  padding: 70px 0;
}

.section {
  margin-bottom: 72px;
}

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

.section-kicker {
  display: inline-flex;
  align-items: center;
  color: var(--brand-2);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 7px 12px;
  margin-bottom: 10px;
  font-weight: 900;
  font-size: 13px;
}

.section-heading h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.section-heading p,
.page-hero p,
.detail-title p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.34);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.14);
}

.poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #cbd5e1;
}

.poster.tall {
  aspect-ratio: 4 / 5;
}

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

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

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.54) 100%);
}

.quality-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
}

.quality-badge {
  top: 12px;
  right: 12px;
  background: #10b981;
}

.rank-badge {
  top: 12px;
  left: 12px;
  background: rgba(249, 115, 22, 0.96);
}

.card-body {
  padding: 17px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #0f172a;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--soft);
}

.card-meta span {
  color: #475569;
  background: #f8fafc;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

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

.category-tile {
  display: block;
  min-height: 168px;
  border-radius: 24px;
  padding: 24px;
  color: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 54px rgba(15, 23, 42, 0.18);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-tile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
  font-size: 14px;
}

.from-emerald.to-teal {
  background: linear-gradient(135deg, #10b981, #0f766e);
}

.from-blue.to-indigo {
  background: linear-gradient(135deg, #3b82f6, #4f46e5);
}

.from-red.to-orange {
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.from-pink.to-rose {
  background: linear-gradient(135deg, #ec4899, #e11d48);
}

.from-yellow.to-amber {
  background: linear-gradient(135deg, #eab308, #f59e0b);
}

.from-violet.to-purple {
  background: linear-gradient(135deg, #8b5cf6, #7e22ce);
}

.from-cyan.to-sky {
  background: linear-gradient(135deg, #06b6d4, #0284c7);
}

.from-stone.to-slate {
  background: linear-gradient(135deg, #57534e, #334155);
}

.from-lime.to-green {
  background: linear-gradient(135deg, #84cc16, #16a34a);
}

.from-fuchsia.to-pink {
  background: linear-gradient(135deg, #d946ef, #db2777);
}

.page-hero {
  color: #fff;
  background: radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.24), transparent 30%), linear-gradient(120deg, #020617 0%, #0f172a 58%, #1e293b 100%);
  padding: 70px 0;
}

.page-hero h1,
.page-hero p {
  color: #fff;
}

.page-hero p {
  max-width: 760px;
  color: #cbd5e1;
}

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

.breadcrumb a:hover {
  color: #34d399;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 14px;
  padding: 16px;
  margin-bottom: 26px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 62px 120px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, border 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: rgba(16, 185, 129, 0.35);
}

.rank-number {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
}

.rank-cover {
  width: 120px;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  background: #cbd5e1;
}

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

.rank-info h2,
.rank-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.rank-meta {
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

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

.player-card,
.detail-panel,
.side-panel {
  border-radius: 26px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

.video-frame {
  position: relative;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding-left: 6px;
  font-size: 34px;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 20px 44px rgba(16, 185, 129, 0.32);
}

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

.detail-title {
  padding: 24px;
}

.detail-title h1 {
  color: #fff;
}

.detail-title p {
  color: #dbeafe;
}

.detail-hero {
  color: #fff;
  background: linear-gradient(120deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.76)), var(--detail-bg);
  background-size: cover;
  background-position: center;
  padding: 64px 0;
}

.detail-hero .breadcrumb {
  color: #cbd5e1;
}

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

.detail-content {
  padding: 24px;
}

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

.detail-content p {
  margin: 0 0 18px;
  color: #334155;
  line-height: 1.95;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.tag-cloud span,
.tag-cloud a {
  border-radius: 999px;
  padding: 7px 11px;
  color: #047857;
  background: #ecfdf5;
  font-size: 13px;
  font-weight: 800;
}

.side-panel {
  padding: 20px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 82px;
  height: 62px;
  object-fit: cover;
  border-radius: 14px;
  background: #cbd5e1;
}

.related-item strong {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  line-height: 1.35;
}

.related-item span {
  color: var(--muted);
  font-size: 12px;
}

.index-list {
  column-count: 4;
  column-gap: 28px;
}

.index-list a {
  display: block;
  break-inside: avoid;
  padding: 8px 0;
  color: #334155;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
}

.index-list a:hover {
  color: #059669;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 54px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 34px;
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 18px;
}

.footer-grid p,
.footer-grid li {
  color: #94a3b8;
  line-height: 1.8;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
}

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

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

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

.empty-tip {
  display: none;
  padding: 36px;
  text-align: center;
  color: var(--muted);
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--line);
}

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

@media (max-width: 1100px) {
  .grid-4,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .mobile-menu.is-open {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-items: end;
    gap: 20px;
    padding-top: 42px;
    padding-bottom: 76px;
  }

  .hero-panel {
    display: none;
  }

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

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

  .rank-item {
    grid-template-columns: 48px 96px 1fr;
  }

  .rank-meta {
    grid-column: 3;
  }

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

  .index-list {
    column-count: 2;
  }
}

@media (max-width: 560px) {
  .header-inner {
    min-height: 64px;
  }

  .brand-text span {
    display: none;
  }

  .hero {
    min-height: 78vh;
  }

  .hero-content {
    min-height: 78vh;
  }

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

  .btn {
    width: 100%;
  }

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

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

  .rank-item {
    grid-template-columns: 42px 1fr;
  }

  .rank-cover {
    display: none;
  }

  .rank-meta {
    grid-column: 2;
  }

  .index-list {
    column-count: 1;
  }
}
