:root {
  --bg: #f7faf9;
  --surface: #ffffff;
  --surface-soft: #f0fdf4;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #041017;
  --dark-soft: #0b1f2a;
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-soft: rgba(16, 185, 129, 0.12);
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.13), transparent 32rem),
    linear-gradient(180deg, #f8fffb 0%, #ffffff 46%, #f6faf9 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(226, 232, 240, 0.82);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #10b981, #34d399 45%, #065f46);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.28);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  font-size: 14px;
  color: #334155;
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link.sub {
  color: #64748b;
  font-weight: 550;
}

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

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #0f172a;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 8px 20px 16px;
  background: #fff;
}

.mobile-nav.open {
  display: grid;
}

.mobile-nav-link {
  padding: 12px 4px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-weight: 650;
}

.mobile-nav-link.active {
  color: var(--primary-dark);
}

.hero {
  max-width: 1240px;
  margin: 28px auto 0;
  padding: 0 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
}

.hero-slider {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  border-radius: 30px;
  background: var(--dark);
  box-shadow: var(--shadow);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.34), transparent 22rem),
    linear-gradient(0deg, rgba(4, 16, 23, 0.88), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
  min-height: 540px;
  padding: 72px 64px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}

.eyebrow {
  width: max-content;
  max-width: 100%;
  padding: 7px 12px;
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(167, 243, 208, 0.24);
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 590px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.card-tags span,
.detail-tags span,
.meta-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #ecfdf5;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.card-tags span,
.meta-pills span {
  color: #047857;
  background: var(--primary-soft);
}

.detail-tags span {
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.text-link,
.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.play-button {
  padding: 13px 22px;
  color: #fff;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.25);
}

.ghost-btn {
  padding: 12px 20px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.text-link:hover,
.play-button:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  left: 64px;
  bottom: 34px;
  z-index: 4;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 28px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

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

.hero-side {
  border-radius: 30px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-side h2,
.panel h2,
.section-heading h2,
.category-title h1,
.detail-copy h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.hero-side h2 {
  font-size: 24px;
}

.hero-side p {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.hot-row {
  display: grid;
  grid-template-columns: 34px 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #eef2f7;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hot-row:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.32);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.hot-row img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
  background: #e2e8f0;
}

.hot-index {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #047857;
  background: #d1fae5;
  font-weight: 900;
}

.hot-row strong,
.hot-row em {
  display: block;
}

.hot-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-row em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-main,
.page-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 20px;
}

.page-section.compact-top {
  padding-top: 28px;
}

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

.section-heading h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.section-heading p,
.category-title p,
.detail-copy p,
.search-panel p,
.panel p {
  color: var(--muted);
}

.section-heading p {
  margin: 6px 0 0;
}

.section-more,
.text-link {
  color: var(--primary-dark);
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(16, 185, 129, 0.32);
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.1);
}

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

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

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

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.year-badge {
  right: 12px;
  top: 12px;
  padding: 5px 10px;
  color: #ecfdf5;
  background: rgba(4, 16, 23, 0.72);
  backdrop-filter: blur(10px);
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 12px 20px rgba(239, 68, 68, 0.24);
}

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

.movie-card-body h2 {
  margin: 10px 0 6px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card-body p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.category-card,
.panel,
.search-panel,
.detail-copy,
.player-shell,
.breadcrumb,
.recommend-panel {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.category-card {
  padding: 22px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

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

.category-card span {
  margin-top: 18px;
  color: var(--primary-dark);
  font-weight: 800;
}

.category-title,
.search-panel,
.panel {
  max-width: 1240px;
  margin: 28px auto 0;
  padding: 32px;
}

.category-title h1,
.search-panel h1,
.panel h1 {
  margin: 0 0 10px;
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: -0.05em;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 20px;
}

.filter-bar input,
.filter-bar select {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 0 16px;
  color: var(--text);
  font: inherit;
  outline: none;
}

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

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

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

.breadcrumb {
  max-width: 1240px;
  margin: 28px auto 0;
  padding: 14px 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-layout {
  max-width: 1240px;
  margin: 22px auto 0;
  padding: 0 20px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

.player-shell {
  overflow: hidden;
  background: #020617;
}

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

.video-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.25s ease;
}

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

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

.play-button {
  position: relative;
  z-index: 2;
  min-width: 132px;
  border: 0;
  cursor: pointer;
  font-size: 16px;
}

.detail-copy {
  margin-top: 20px;
  padding: 30px;
}

.detail-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.detail-copy h2 {
  margin-top: 28px;
  font-size: 24px;
}

.detail-copy p {
  font-size: 16px;
}

.detail-tags {
  margin-top: 16px;
}

.recommend-panel {
  padding: 22px;
  align-self: start;
  position: sticky;
  top: 88px;
}

.recommend-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.site-footer {
  margin-top: 24px;
  color: #cbd5e1;
  background:
    radial-gradient(circle at 15% 0, rgba(16, 185, 129, 0.22), transparent 24rem),
    linear-gradient(135deg, #041017, #0b1f2a);
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  padding: 50px 20px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 30px;
}

.footer-brand {
  color: #fff;
  font-size: 24px;
}

.footer-grid p {
  max-width: 430px;
  color: #94a3b8;
}

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

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 20px 26px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 1100px) {
  .hero,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-side,
  .recommend-panel {
    position: static;
  }

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

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

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

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

  .hero-slider,
  .hero-content {
    min-height: 480px;
  }

  .hero-content {
    padding: 48px 28px 74px;
  }

  .hero-dots {
    left: 28px;
  }

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

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

  .section-heading,
  .filter-bar {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .page-main,
  .page-section,
  .hero,
  .detail-layout {
    padding-left: 14px;
    padding-right: 14px;
  }

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

  .hero {
    margin-top: 18px;
  }

  .hero-slider {
    border-radius: 22px;
  }

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

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

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

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

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

  .category-title,
  .search-panel,
  .panel,
  .detail-copy,
  .recommend-panel {
    padding: 22px;
  }
}
