* {
  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: #111827;
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 42%, #f7fbf9 100%);
  line-height: 1.6;
}

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

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

main {
  min-height: 70vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.nav-wrap {
  max-width: 1180px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #065f46);
  box-shadow: 0 12px 30px rgba(5, 150, 105, 0.22);
  transition: transform 0.22s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.05);
}

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

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

.brand-text em {
  font-style: normal;
  font-size: 12px;
  color: #6b7280;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}

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

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

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

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

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

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

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

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: min(1180px, calc(100% - 48px));
  transform: translate(-50%, -50%);
  color: #ffffff;
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 14px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: clamp(17px, 2.3vw, 22px);
}

.hero-badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 13px;
  background: #059669;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.25);
}

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

.hero-meta {
  margin-bottom: 30px;
}

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

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

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 12px 24px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: #059669;
  box-shadow: 0 14px 30px rgba(5, 150, 105, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  background: #047857;
}

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

.btn-ghost:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.24);
}

.hero-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

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

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  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: #ffffff;
}

.intro-block,
.content-section,
.rank-panel,
.overview-grid,
.filter-panel,
.rank-page-list,
.detail-copy {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.intro-block {
  margin-top: 42px;
  padding: 30px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.07);
}

.intro-block h2 {
  margin: 16px 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.18;
}

.intro-block p {
  margin: 0;
  color: #4b5563;
  font-size: 17px;
}

.home-search,
.filter-panel {
  display: flex;
  gap: 12px;
}

.home-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  padding: 0 16px;
  color: #111827;
  background: #ffffff;
  outline: none;
}

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

.home-search button {
  min-width: 96px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: #059669;
  font-weight: 800;
  cursor: pointer;
}

.content-section,
.rank-panel {
  margin-top: 72px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.section-head h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(26px, 3.5vw, 38px);
  line-height: 1.2;
}

.section-line {
  height: 4px;
  flex: 1;
  min-width: 40px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(5, 150, 105, 0.32), rgba(5, 150, 105, 0));
}

.section-more {
  color: #059669;
  font-weight: 800;
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #e5e7eb;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.16));
  opacity: 0;
  transition: opacity 0.24s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 16px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #059669;
}

.card-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 43px;
  margin: 0 0 12px;
  color: #6b7280;
  font-size: 14px;
}

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

.meta-row span:not(:last-child)::after {
  content: "·";
  margin-left: 7px;
  color: #9ca3af;
}

.tag-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

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

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

.category-tile,
.overview-card {
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(135deg, #ffffff, #ecfdf5);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover,
.overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
}

.category-tile strong,
.overview-card h2 {
  display: block;
  margin: 0 0 10px;
  font-size: 22px;
  color: #064e3b;
}

.category-tile span,
.overview-card p {
  color: #4b5563;
}

.rank-list {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
}

.rank-list li {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.rank-list li span,
.rank-number {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #065f46);
  font-weight: 900;
}

.rank-list a {
  font-weight: 800;
}

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

.rank-list em {
  color: #6b7280;
  font-style: normal;
}

.page-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.3), transparent 35%), linear-gradient(135deg, #022c22, #111827);
  color: #ffffff;
}

.compact-hero {
  width: min(1180px, calc(100% - 48px));
  margin: 36px auto 0;
  padding: 52px;
  border-radius: 28px;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.18);
}

.compact-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.08;
}

.compact-hero p {
  max-width: 820px;
  margin: 0;
  color: #d1d5db;
  font-size: 18px;
}

.overview-grid {
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.overview-card h2 a:hover,
.mini-row a:hover {
  color: #059669;
}

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

.mini-row a {
  padding: 6px 10px;
  border-radius: 999px;
  color: #047857;
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.filter-panel {
  margin-top: 32px;
  padding: 22px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
}

.rank-page-list {
  margin-top: 42px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rank-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: stretch;
}

.card-horizontal {
  display: grid;
  grid-template-columns: 150px 1fr;
  width: 100%;
}

.card-horizontal .poster {
  aspect-ratio: 5 / 3;
  height: 100%;
}

.card-horizontal .card-body p {
  min-height: auto;
}

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

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

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: blur(10px);
  transform: scale(1.08);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.42));
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 38px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #d1d5db;
  font-size: 14px;
}

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

.detail-info h1 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.06;
}

.detail-one-line {
  max-width: 780px;
  color: #d1d5db;
  font-size: 20px;
}

.detail-meta {
  margin: 24px 0 12px;
}

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

.watch-section {
  width: min(1180px, calc(100% - 48px));
  margin: 48px auto 0;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.26);
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.58));
  cursor: pointer;
}

.play-overlay span {
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #059669;
  box-shadow: 0 16px 42px rgba(5, 150, 105, 0.35);
  font-size: 40px;
  text-indent: 5px;
}

.play-overlay.hidden {
  display: none;
}

.detail-copy {
  margin-top: 42px;
  padding: 36px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
}

.detail-copy h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 28px;
}

.detail-copy h2:not(:first-child) {
  margin-top: 30px;
}

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

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

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.site-footer p {
  max-width: 560px;
  margin: 0;
  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: 8px;
}

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

.footer-bottom {
  border-top: 1px solid #374151;
  padding: 18px 24px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

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

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

  .nav-links {
    gap: 14px;
    font-size: 14px;
  }
}

@media (max-width: 820px) {
  .nav-wrap {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
  }

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

  .nav-links {
    display: none;
    width: 100%;
    padding: 0 0 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

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

  .nav-links a {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .nav-links a:hover {
    background: #f3f4f6;
  }

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

  .hero-arrow {
    display: none;
  }

  .intro-block {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .home-search,
  .filter-panel {
    flex-direction: column;
  }

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

  .rank-list,
  .overview-grid,
  .rank-page-list,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-wrap {
    grid-template-columns: 1fr;
    padding: 44px 0;
  }

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

  .compact-hero {
    padding: 34px 24px;
  }

  .card-horizontal {
    grid-template-columns: 120px 1fr;
  }
}

@media (max-width: 520px) {
  .nav-wrap,
  .intro-block,
  .content-section,
  .rank-panel,
  .overview-grid,
  .filter-panel,
  .rank-page-list,
  .detail-copy,
  .watch-section,
  .detail-wrap,
  .compact-hero,
  .footer-grid {
    width: min(100% - 28px, 1180px);
  }

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

  .hero-content {
    width: calc(100% - 28px);
  }

  .movie-grid {
    gap: 12px;
  }

  .card-body {
    padding: 11px;
  }

  .card-body p,
  .tag-row {
    display: none;
  }

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

  .rank-card {
    grid-template-columns: 44px 1fr;
  }

  .card-horizontal {
    grid-template-columns: 96px 1fr;
  }

  .play-overlay span {
    width: 68px;
    height: 68px;
    font-size: 32px;
  }
}
