:root {
  --emerald: #059669;
  --emerald-dark: #047857;
  --text: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --white: #ffffff;
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 42%, #f9fafb 100%);
}

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

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

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.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.85);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #047857);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.32);
}

.logo-text {
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-link,
.mobile-nav-link {
  color: #374151;
  font-weight: 600;
  border-radius: 999px;
  transition: 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--emerald);
  background: rgba(5, 150, 105, 0.1);
}

.nav-cta {
  padding: 10px 18px;
  color: #ffffff;
  font-weight: 700;
  background: var(--emerald);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.24);
}

.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #111827;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

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

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

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

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

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

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

.hero-overlay {
  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.05));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: #ffffff;
  background: var(--emerald);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.eyebrow {
  padding: 8px 14px;
  margin-bottom: 18px;
}

.section-kicker {
  padding: 6px 12px;
  color: var(--emerald);
  background: rgba(5, 150, 105, 0.1);
}

.hero-content h1 {
  max-width: 760px;
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-content p {
  max-width: 700px;
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: clamp(18px, 2.3vw, 24px);
  line-height: 1.65;
}

.hero-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

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

.hero-actions,
.section-head,
.split-section,
.filter-panel,
.detail-layout {
  display: flex;
}

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

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

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

.btn.primary:hover {
  background: var(--emerald-dark);
  transform: translateY(-2px);
}

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

.btn.full {
  width: 100%;
}

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

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

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.search-landing,
.content-section {
  margin-top: 56px;
}

.search-landing {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 28px;
  align-items: center;
  padding: 26px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.search-landing h2,
.section-head h2,
.page-title h1,
.category-hero h1,
.detail-content h1 {
  margin: 10px 0 0;
  letter-spacing: -0.04em;
}

.search-landing h2,
.section-head h2 {
  font-size: clamp(26px, 4vw, 38px);
}

.quick-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  background: #f3f4f6;
  border-radius: 16px;
}

.quick-search input,
.filter-panel input,
.filter-panel select {
  min-width: 0;
  border: 1px solid var(--line);
  outline: none;
  background: #ffffff;
}

.quick-search input {
  flex: 1;
  border: 0;
  padding: 14px 16px;
  background: transparent;
}

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

.section-head {
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-head a,
.text-link {
  color: var(--emerald);
  font-weight: 800;
}

.section-head.compact h2 {
  font-size: 28px;
}

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

.latest-grid,
.category-list,
.search-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.78);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.14);
}

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

.movie-poster img,
.category-tile img,
.rank-thumb img,
.detail-poster-card img,
.compact-card img,
.category-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.45s ease;
}

.movie-card:hover .movie-poster img,
.category-tile:hover img,
.compact-card:hover img,
.category-overview-card:hover .category-cover img {
  transform: scale(1.08);
}

.poster-shade,
.category-tile span,
.category-cover span {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.76));
}

.type-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 9px;
  color: #ffffff;
  background: var(--emerald);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
}

.poster-meta {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

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

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

.movie-card h3 a:hover,
.rank-info h2 a:hover,
.category-overview-card h2 a:hover {
  color: var(--emerald);
}

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

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

.tag-row span {
  padding: 5px 8px;
  color: #047857;
  background: rgba(5, 150, 105, 0.1);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.split-section {
  align-items: stretch;
  gap: 24px;
}

.rank-panel,
.category-panel {
  flex: 1;
  padding: 26px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.rank-mini-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #f9fafb;
  border-radius: 14px;
  transition: 0.2s ease;
}

.rank-mini-row:hover {
  background: rgba(5, 150, 105, 0.08);
}

.rank-mini-row span {
  color: var(--emerald);
  font-size: 20px;
  font-weight: 900;
}

.rank-mini-row em,
.compact-card em,
.category-tile em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

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

.category-tile {
  position: relative;
  display: flex;
  min-height: 156px;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
}

.category-tile img {
  position: absolute;
  inset: 0;
}

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 2;
  align-self: flex-end;
}

.category-tile strong {
  margin: auto 18px 38px;
  color: #ffffff;
  font-size: 21px;
}

.category-tile em {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  color: #d1d5db;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-main {
  min-height: 70vh;
  padding: 56px 0 72px;
}

.page-title {
  margin-bottom: 28px;
}

.page-title h1,
.category-hero h1 {
  font-size: clamp(38px, 6vw, 64px);
}

.page-title p,
.category-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.category-overview-grid {
  display: grid;
  gap: 22px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.category-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 18px;
  background: #e5e7eb;
}

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

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

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.category-samples a {
  padding: 7px 10px;
  color: #374151;
  background: #f3f4f6;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.category-hero {
  margin-top: -56px;
  margin-bottom: 34px;
  padding: 56px 0 48px;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.7), transparent 30%), linear-gradient(135deg, #064e3b, #111827 72%);
}

.category-hero .section-kicker {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.category-hero p,
.category-hero .breadcrumb {
  color: #d1d5db;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--emerald);
}

.filter-panel {
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
}

.filter-panel input {
  flex: 1;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 70px 116px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #047857);
  border-radius: 18px;
  font-size: 24px;
  font-weight: 900;
}

.rank-thumb {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: #e5e7eb;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.rank-info p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
}

.rank-meta span,
.detail-meta span {
  padding: 7px 10px;
  background: #f3f4f6;
  border-radius: 10px;
  color: #374151;
  font-weight: 700;
  font-size: 13px;
}

.watch-section {
  padding: 28px 0 34px;
  background: #0b1220;
}

.watch-section .breadcrumb {
  color: #cbd5e1;
}

.watch-section .breadcrumb a:hover {
  color: #ffffff;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.player-video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  color: #ffffff;
  border: 0;
  background: #000000;
  cursor: pointer;
  z-index: 3;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.player-dim {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.72));
}

.play-circle {
  position: relative;
  z-index: 2;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  color: #ffffff;
  background: var(--emerald);
  border-radius: 999px;
  font-size: 34px;
  box-shadow: 0 0 0 12px rgba(5, 150, 105, 0.24);
}

.player-cover strong {
  position: relative;
  z-index: 2;
  font-size: clamp(22px, 4vw, 42px);
}

.player-shell.is-playing .player-cover {
  display: none;
}

.detail-layout {
  gap: 32px;
  align-items: flex-start;
  padding: 44px 0 16px;
}

.detail-poster-card {
  position: sticky;
  top: 94px;
  width: 260px;
  flex: 0 0 260px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.detail-poster-card img {
  aspect-ratio: 3 / 4;
  margin-bottom: 14px;
  border-radius: 18px;
  background: #e5e7eb;
}

.detail-content {
  flex: 1;
  min-width: 0;
}

.detail-content h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.detail-content .lead {
  color: #374151;
  font-size: 20px;
  line-height: 1.75;
}

.detail-content h2 {
  margin: 34px 0 12px;
  font-size: 26px;
}

.detail-content p {
  color: #374151;
  font-size: 17px;
  line-height: 1.9;
}

.detail-meta,
.detail-tags {
  margin: 18px 0;
}

.compact-card {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.compact-card img {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
}

.compact-card strong {
  display: block;
  margin-bottom: 6px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 46px 0;
}

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

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

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 17px;
}

.site-footer a:not(.footer-logo) {
  display: block;
  margin: 9px 0;
  color: #d1d5db;
}

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

.footer-bottom {
  padding: 18px 0;
  color: #9ca3af;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[hidden],
.is-hidden {
  display: none !important;
}

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

  .split-section {
    flex-direction: column;
  }
}

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

  .mobile-menu-btn {
    display: block;
    margin-left: auto;
  }

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

  .hero-content {
    padding: 0 12px;
  }

  .hero-control {
    display: none;
  }

  .search-landing,
  .category-overview-card,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .search-landing,
  .detail-layout {
    display: grid;
  }

  .quick-search,
  .filter-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-search button,
  .filter-panel input,
  .filter-panel select {
    width: 100%;
  }

  .movie-grid,
  .latest-grid,
  .category-list,
  .search-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .rank-row {
    grid-template-columns: 52px 84px 1fr;
    gap: 12px;
    padding: 14px;
  }

  .rank-number {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 18px;
  }

  .rank-info h2 {
    font-size: 18px;
  }

  .rank-info p,
  .rank-meta,
  .rank-info .tag-row {
    display: none;
  }

  .detail-poster-card {
    position: static;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .nav-wrap {
    height: 64px;
  }

  .logo-text {
    font-size: 18px;
  }

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

  .hero-content h1 {
    font-size: 40px;
  }

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

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

  .movie-card-body {
    padding: 12px;
  }

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

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

  .rank-mini-row {
    grid-template-columns: 40px 1fr;
  }

  .rank-mini-row em {
    display: none;
  }

  .player-shell {
    border-radius: 14px;
  }

  .play-circle {
    width: 66px;
    height: 66px;
    font-size: 28px;
  }
}
