:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --deep: #0f172a;
  --emerald: #10b981;
  --emerald-dark: #059669;
  --teal: #0d9488;
  --rose: #e11d48;
  --blue: #2563eb;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
}

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.9);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.28);
  transform: translateZ(0);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.06);
}

.brand-text {
  font-size: 22px;
  line-height: 1;
  background: linear-gradient(90deg, var(--emerald-dark), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-link,
.mobile-link {
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--emerald-dark);
}

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

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: #374151;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.mobile-nav.open {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f9fafb;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #000;
}

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-text {
  max-width: 680px;
  color: #fff;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6ee7b7;
  font-weight: 750;
  margin-bottom: 16px;
}

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

.hero p {
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 18px;
  max-width: 640px;
}

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

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

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #f9fafb;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--emerald);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.28);
}

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

.btn.secondary {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.btn.secondary:hover {
  background: rgba(255, 255, 255, 0.24);
}

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

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

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}

.hero-dots button.active {
  width: 34px;
  background: var(--emerald);
}

.hero-search {
  display: flex;
  gap: 10px;
  width: min(560px, 100%);
  margin-top: 26px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
}

.hero-search input,
.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: #fff;
  color: var(--text);
}

.hero-search input {
  min-height: 46px;
  padding: 0 16px;
  border: 0;
}

.hero-search button {
  flex: 0 0 auto;
}

.section-stack {
  padding: 56px 0 72px;
}

.section {
  margin-top: 58px;
}

.section:first-child {
  margin-top: 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--emerald-dark);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
  transform: translateZ(0);
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

.movie-card:not(.movie-card-small) .card-cover {
  aspect-ratio: 16 / 10;
}

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

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

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  font-size: 12px;
  font-weight: 750;
  backdrop-filter: blur(10px);
}

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 10px;
  padding: 16px;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.08));
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.movie-card:hover .card-overlay {
  opacity: 1;
  transform: translateY(0);
}

.card-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
  line-height: 1.5;
}

.card-genre {
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.86);
  font-size: 12px;
  font-weight: 750;
}

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

.card-body strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.movie-card:hover .card-body strong {
  color: var(--emerald-dark);
}

.card-body span {
  display: block;
  overflow: hidden;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-panel {
  padding: 32px;
  border-radius: 26px;
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
}

.category-row {
  margin-top: 32px;
}

.category-row:first-child {
  margin-top: 0;
}

.category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 20px;
}

.category-title::before {
  content: "";
  width: 5px;
  height: 26px;
  border-radius: 999px;
  background: var(--emerald);
}

.latest-panel {
  padding: 32px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.page-hero {
  padding: 70px 0;
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
}

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

.page-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.page-main {
  padding: 48px 0 70px;
}

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

.category-card {
  min-height: 180px;
  padding: 24px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.category-card strong {
  display: block;
  font-size: 21px;
  margin-bottom: 10px;
}

.category-card span {
  color: var(--muted);
  font-size: 14px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 18px;
  margin-bottom: 28px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.filter-input,
.filter-select {
  min-height: 46px;
  padding: 0 14px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tab {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #374151;
  cursor: pointer;
}

.filter-tab.active,
.filter-tab:hover {
  border-color: var(--emerald);
  color: var(--emerald-dark);
  background: #ecfdf5;
}

.empty-state {
  display: none;
  padding: 32px;
  border-radius: 20px;
  text-align: center;
  color: var(--muted);
  background: #fff;
}

.empty-state.show {
  display: block;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 76px 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 104px;
  padding: 14px 18px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.rank-number {
  font-size: 24px;
  font-weight: 900;
  color: var(--emerald-dark);
}

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

.rank-info strong,
.rank-info em {
  display: block;
}

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

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

.rank-action {
  padding: 8px 12px;
  border-radius: 999px;
  background: #ecfdf5;
  color: var(--emerald-dark);
  font-weight: 800;
  font-size: 13px;
}

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

.breadcrumb a {
  color: var(--emerald-dark);
  font-weight: 700;
}

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

.detail-primary,
.detail-side {
  min-width: 0;
}

.player-card,
.detail-article,
.side-card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

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

.player-frame video {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: #000;
  cursor: pointer;
  transition: opacity 0.24s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.play-icon {
  position: absolute;
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  font-size: 32px;
  box-shadow: 0 16px 42px rgba(16, 185, 129, 0.38);
}

.player-message {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  min-height: 24px;
  color: #fecaca;
  text-align: center;
  pointer-events: none;
}

.detail-article {
  margin-top: 24px;
  padding: 30px;
}

.detail-article h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.detail-article h2 {
  margin: 30px 0 12px;
  font-size: 24px;
}

.detail-article p {
  color: #374151;
}

.lead {
  font-size: 18px;
  color: #111827 !important;
}

.detail-meta .pill,
.card-tags .pill {
  color: #065f46;
  background: #ecfdf5;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tag-list span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #065f46;
  background: #ecfdf5;
  font-size: 13px;
  font-weight: 700;
}

.side-card {
  padding: 22px;
  margin-bottom: 22px;
}

.side-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  background: #111827;
}

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

.side-card h2,
.side-card h3 {
  margin: 0 0 14px;
}

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

.side-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: #374151;
}

.side-list a:hover {
  color: var(--emerald-dark);
}

.related-section {
  margin-top: 48px;
}

.site-footer {
  color: #e5e7eb;
  background: linear-gradient(135deg, #111827, #1f2937 56%, #111827);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding: 48px 0 34px;
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 14px;
  color: #6ee7b7;
}

.footer-grid p {
  margin: 0;
  color: #d1d5db;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: #d1d5db;
}

.footer-links a:hover {
  color: #6ee7b7;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #9ca3af;
  font-size: 14px;
}

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

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 22px;
  }
}

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

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

  .hero {
    height: 560px;
  }

  .hero-control {
    display: none;
  }

  .hero-search {
    flex-direction: column;
  }

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

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

  .feature-panel,
  .latest-panel,
  .detail-article {
    padding: 22px;
  }

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

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

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

  .rank-action {
    display: none;
  }

  .detail-side {
    display: block;
  }

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

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

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

  .brand-text {
    font-size: 19px;
  }

  .hero {
    height: 520px;
  }

  .hero h1 {
    font-size: 34px;
  }

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

  .page-hero {
    padding: 52px 0;
  }

  .card-body {
    padding: 12px;
  }

  .play-icon {
    width: 66px;
    height: 66px;
    font-size: 26px;
  }
}
