* {
  box-sizing: border-box;
}

:root {
  --green: #059669;
  --green-dark: #047857;
  --amber: #f59e0b;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

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(--ink);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 48%, #f9fafb 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.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(18px);
}

.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,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #10b981, #047857);
  box-shadow: 0 12px 22px rgba(5, 150, 105, 0.25);
}

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

.desktop-nav a,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #374151;
  font-weight: 600;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--green-dark);
  background: #ecfdf5;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-button span {
  width: 20px;
  height: 2px;
  background: #111827;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.54) 48%, rgba(0, 0, 0, 0.18));
}

.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: flex-end;
  align-items: flex-start;
  padding: 0 0 82px;
  color: #fff;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-badges span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 6px 13px;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-size: 14px;
  font-weight: 800;
}

.hero-badges .score {
  color: #fff7ed;
  background: rgba(245, 158, 11, 0.22);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.hero-content h1 {
  max-width: 760px;
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-meta {
  margin-bottom: 28px;
  color: #d1d5db;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
}

.hero-meta span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after,
.card-meta span:not(:last-child)::after {
  content: "";
  width: 4px;
  height: 4px;
  margin-left: 10px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
}

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

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

.primary-btn,
.search-jump button {
  color: #fff;
  background: var(--green);
  box-shadow: 0 14px 26px rgba(5, 150, 105, 0.28);
}

.primary-btn:hover,
.search-jump button:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(5, 150, 105, 0.36);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(8px);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.68);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.quick-search {
  margin-top: -42px;
  position: relative;
  z-index: 6;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 26px;
  padding: 26px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.quick-search h2,
.quick-search p {
  margin: 0;
}

.quick-search h2 {
  margin-bottom: 6px;
  font-size: 26px;
}

.quick-search p {
  color: var(--muted);
  line-height: 1.8;
}

.search-jump,
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-jump input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  color: #111827;
  background: #fff;
  outline: none;
}

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

.section-block {
  padding: 54px 0 0;
}

.section-heading,
.rank-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-heading h2,
.rank-title h2,
.rank-list-section h2,
.text-panel h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-more,
.rank-title a {
  color: var(--green-dark);
  font-weight: 800;
}

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

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

.listing-grid {
  padding: 28px 0 20px;
}

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #374151);
}

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

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

.rating {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(245, 158, 11, 0.92);
  font-size: 13px;
  font-weight: 900;
}

.card-body {
  padding: 14px 14px 16px;
}

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

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

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

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 12px;
  font-weight: 700;
}

.large-tags span {
  padding: 7px 11px;
  color: #d1fae5;
  background: rgba(5, 150, 105, 0.24);
  border: 1px solid rgba(167, 243, 208, 0.24);
}

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

.rank-panel,
.rank-list-section,
.text-panel,
.player-card,
.category-overview-card,
.filter-bar {
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.rank-panel {
  position: sticky;
  top: 88px;
  padding: 20px;
}

.rank-row {
  display: grid;
  grid-template-columns: 34px 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid #f3f4f6;
}

.rank-row:first-of-type {
  border-top: 0;
}

.rank-num {
  color: var(--green-dark);
  font-weight: 900;
  font-size: 18px;
}

.rank-row img {
  width: 56px;
  height: 78px;
  border-radius: 10px;
  object-fit: cover;
  background: #111827;
}

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

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

.rank-info strong {
  font-size: 15px;
}

.rank-info em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.rank-score {
  color: var(--amber);
  font-weight: 900;
}

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

.category-card {
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(135deg, #111827, #064e3b);
  color: #fff;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.14);
}

.category-card span {
  display: block;
  margin-bottom: 9px;
  color: #a7f3d0;
  font-weight: 900;
}

.category-card strong {
  display: block;
  line-height: 1.7;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.mini-links a {
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-size: 13px;
}

.site-footer {
  margin-top: 70px;
  padding: 46px 0;
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.footer-logo {
  color: #fff;
}

.footer-inner p {
  max-width: 620px;
  color: #9ca3af;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

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

.copyright {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.page-main {
  padding-top: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--green-dark);
  font-weight: 800;
}

.breadcrumb.dark,
.breadcrumb.dark a {
  color: #d1fae5;
}

.compact-hero {
  padding: 42px;
  border-radius: 28px;
  color: #fff;
  background: radial-gradient(circle at 0% 0%, rgba(16, 185, 129, 0.85), rgba(17, 24, 39, 0.98) 55%), linear-gradient(135deg, #064e3b, #111827);
  box-shadow: var(--shadow);
}

.compact-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  font-weight: 900;
}

.compact-hero p {
  max-width: 720px;
  margin: 0;
  color: #d1fae5;
  line-height: 1.8;
}

.category-overview-card {
  overflow: hidden;
}

.category-overview-card a {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: center;
  padding: 18px;
}

.category-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.category-posters img {
  height: 104px;
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

.category-overview-card h2 {
  margin: 0 0 10px;
  font-size: 25px;
}

.category-overview-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.category-overview-card span {
  color: var(--green-dark);
  font-weight: 900;
}

.filter-bar {
  margin-top: 24px;
  padding: 16px;
}

.global-filter {
  margin-bottom: 10px;
}

.rank-list-section {
  margin-top: 34px;
  padding: 22px;
}

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

.detail-main {
  background: #f9fafb;
}

.detail-hero {
  position: relative;
  padding: 28px 0 70px;
  color: #fff;
  background: #111827;
  overflow: hidden;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.98), rgba(17, 24, 39, 0.68), rgba(17, 24, 39, 0.96)), var(--detail-bg);
  background-size: cover;
  background-position: center;
  filter: blur(0px);
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
}

.detail-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
  padding-top: 34px;
}

.detail-poster img {
  width: 260px;
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  object-fit: cover;
  background: #111827;
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.36);
}

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

.detail-info p {
  max-width: 840px;
  margin: 0 0 20px;
  color: #e5e7eb;
  line-height: 1.8;
  font-size: 18px;
}

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

.detail-content {
  margin-top: -44px;
  position: relative;
  z-index: 5;
}

.player-card {
  padding: 14px;
}

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

.video-el {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
  cursor: pointer;
}

.play-layer.hide {
  display: none;
}

.play-icon {
  width: 78px;
  height: 78px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  box-shadow: 0 18px 36px rgba(5, 150, 105, 0.32);
  font-size: 32px;
}

.play-layer strong {
  font-size: 20px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.text-panel {
  margin-top: 22px;
  padding: 28px;
}

.text-panel h2 {
  margin-top: 26px;
}

.text-panel h2:first-child {
  margin-top: 0;
}

.text-panel p {
  color: #374151;
  line-height: 2;
  font-size: 17px;
}

.hidden-by-filter {
  display: none !important;
}

@media (max-width: 1024px) {
  .movie-grid,
  .small-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .split-layout,
  .quick-search,
  .category-overview-card a,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }

  .detail-grid {
    align-items: start;
  }
}

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

  .menu-button {
    display: inline-flex;
  }

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

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

  .hero-control {
    width: 40px;
    height: 40px;
    font-size: 28px;
  }

  .quick-search,
  .compact-hero {
    padding: 22px;
    border-radius: 22px;
  }

  .search-jump,
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .movie-grid,
  .small-grid,
  .category-grid,
  .category-overview-grid,
  .rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .rank-list {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 28px 50px 1fr auto;
  }

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

  .detail-poster img {
    width: 190px;
  }
}

@media (max-width: 520px) {
  .wrap,
  .nav-shell,
  .footer-inner,
  .mobile-nav {
    width: min(100% - 22px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

  .movie-grid,
  .small-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .hero-content p,
  .detail-info p {
    font-size: 16px;
  }

  .hero-prev {
    left: 10px;
  }

  .hero-next {
    right: 10px;
  }

  .detail-hero {
    padding-bottom: 54px;
  }
}
