:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #ecfdf5;
  --text: #0f172a;
  --muted: #64748b;
  --line: #dbeafe;
  --primary: #059669;
  --primary-dark: #047857;
  --secondary: #0d9488;
  --accent: #14b8a6;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eefdf7 48%, #ffffff 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  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.84);
  border-bottom: 1px solid rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  box-shadow: 0 12px 22px rgba(5, 150, 105, 0.28);
}

.brand-name {
  font-size: 22px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #334155;
  font-weight: 650;
}

.main-nav a {
  position: relative;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--primary);
}

.main-nav a::after {
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 2px;
  content: "";
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 999px;
  transition: width 0.2s ease;
}

.main-nav a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: #ecfdf5;
  border-radius: 14px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--primary-dark);
  border-radius: 999px;
}

.hero-section {
  position: relative;
  overflow: hidden;
  padding: 52px 0 34px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(20, 184, 166, 0.26), transparent 34%),
    radial-gradient(circle at 85% 12%, rgba(16, 185, 129, 0.24), transparent 32%),
    linear-gradient(135deg, #ecfdf5 0%, #f8fafc 45%, #ccfbf1 100%);
}

.hero-shell {
  position: relative;
  min-height: 520px;
}

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.72fr);
  gap: 42px;
  align-items: center;
  min-height: 500px;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-slide:not(.is-active) {
  position: absolute;
  inset: 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 12px;
  padding: 6px 12px;
  color: var(--primary-dark);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(5, 150, 105, 0.16);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero-copy p,
.page-hero p,
.section-heading p,
.detail-one-line {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
}

.hero-tags,
.tag-list,
.detail-meta,
.card-meta,
.filter-chips,
.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-list span,
.detail-meta span,
.card-meta span,
.filter-chips button,
.category-strip a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: #065f46;
  background: rgba(209, 250, 229, 0.9);
  border: 1px solid rgba(5, 150, 105, 0.13);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
}

.hero-actions,
.section-heading,
.quick-panel,
.search-form,
.inline-filter,
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-actions {
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 760;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 14px 25px rgba(5, 150, 105, 0.28);
}

.btn.ghost {
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(5, 150, 105, 0.18);
}

.btn.ghost.dark {
  background: #ecfdf5;
}

.hero-cover,
.detail-poster,
.category-card-cover,
.card-poster {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.16), rgba(16, 185, 129, 0.08));
}

.hero-cover {
  min-height: 430px;
  border-radius: 34px;
  box-shadow: var(--shadow);
}

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

.hero-cover:hover img,
.movie-card:hover img,
.category-card:hover img {
  transform: scale(1.045);
}

.hero-nav {
  position: absolute;
  left: 0;
  bottom: 6px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 8px;
  padding: 0;
  border: 0;
  background: rgba(5, 150, 105, 0.22);
  border-radius: 999px;
}

.hero-dot.is-active {
  width: 54px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.quick-panel {
  position: relative;
  z-index: 2;
  align-items: stretch;
  margin-top: -10px;
  margin-bottom: 34px;
}

.search-card,
.filter-panel,
.content-card,
.player-card,
.category-card,
.movie-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.search-card {
  flex: 1;
  min-width: 280px;
  padding: 24px;
  border-radius: var(--radius-lg);
}

.search-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  outline: none;
  background: #ffffff;
  border-radius: 999px;
}

.search-form input:focus {
  border-color: rgba(5, 150, 105, 0.52);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.category-strip {
  flex: 0 0 360px;
  align-content: center;
  padding: 24px;
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.86), rgba(255, 255, 255, 0.92));
  border: 1px solid rgba(5, 150, 105, 0.12);
  border-radius: var(--radius-lg);
}

.category-strip a:hover,
.filter-chips button:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

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

.section-heading {
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-heading h2,
.content-card h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.text-link {
  color: var(--primary-dark);
  font-weight: 760;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.card-poster {
  display: block;
  aspect-ratio: 3 / 4;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 5px 10px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.22);
}

.card-body {
  padding: 16px;
}

.card-meta {
  margin-bottom: 10px;
}

.card-meta span {
  min-height: 24px;
  padding: 2px 8px;
  font-size: 12px;
}

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

.movie-card h3 a:hover {
  color: var(--primary);
}

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

.card-category {
  display: inline-flex;
  margin-top: 12px;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 750;
}

.category-preview-wrap {
  padding-bottom: 28px;
}

.page-main {
  padding: 46px 0 60px;
}

.page-hero {
  padding: 44px;
  background:
    radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.20), transparent 30%),
    linear-gradient(135deg, rgba(236, 253, 245, 0.94), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(5, 150, 105, 0.12);
  border-radius: 34px;
  box-shadow: var(--shadow-soft);
}

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

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

.category-grid-page {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.category-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  overflow: hidden;
  border-radius: 28px;
}

.category-card-cover {
  min-height: 260px;
}

.category-card-body {
  padding: 26px;
}

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

.category-card-body p {
  color: var(--muted);
}

.category-sample {
  min-height: 3.4em;
}

.filter-panel {
  margin-top: 24px;
  padding: 20px;
  border-radius: 24px;
}

.inline-filter {
  width: 100%;
}

.filter-chips {
  margin-top: 14px;
}

.filter-chips button {
  border: 0;
  cursor: pointer;
}

.list-grid,
.ranking-page-grid {
  margin-top: 24px;
}

.detail-main {
  padding-bottom: 60px;
}

.detail-hero {
  padding: 46px 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(20, 184, 166, 0.18), transparent 30%),
    linear-gradient(135deg, #f8fafc 0%, #ecfdf5 100%);
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin-bottom: 18px;
}

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

.player-section {
  margin-top: 30px;
}

.player-card {
  position: relative;
  overflow: hidden;
  background: #020617;
  border-radius: 30px;
}

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.20), rgba(2, 6, 23, 0.62));
  cursor: pointer;
}

.play-layer.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  padding-left: 6px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  font-size: 32px;
  box-shadow: 0 16px 45px rgba(5, 150, 105, 0.42);
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.content-card {
  padding: 28px;
  border-radius: 26px;
}

.content-card p {
  margin: 14px 0 0;
  color: #334155;
  font-size: 17px;
}

.site-footer {
  padding: 44px 0 22px;
  color: #d1fae5;
  background: #064e3b;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.footer-grid p {
  max-width: 520px;
  color: rgba(209, 250, 229, 0.78);
}

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

.footer-links strong {
  color: #ffffff;
}

.footer-links a:hover,
.footer-brand:hover {
  color: #ffffff;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 0;
  padding-top: 18px;
  color: rgba(209, 250, 229, 0.68);
  border-top: 1px solid rgba(209, 250, 229, 0.18);
  font-size: 14px;
}

.is-filtered-out {
  display: none !important;
}

@media (max-width: 1000px) {
  .hero-slide,
  .detail-hero-grid,
  .category-card {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .ranking-grid,
  .compact-grid,
  .category-grid-page,
  .detail-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-panel {
    flex-direction: column;
  }

  .category-strip {
    flex-basis: auto;
  }
}

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

  .nav-wrap {
    height: 64px;
  }

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

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 64px;
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 12px;
  }

  .main-nav a::after {
    display: none;
  }

  .hero-section {
    padding-top: 28px;
  }

  .hero-shell {
    min-height: 720px;
  }

  .hero-slide {
    min-height: 690px;
    gap: 24px;
  }

  .hero-cover {
    min-height: 360px;
  }

  .hero-nav {
    bottom: 0;
  }

  .hero-actions,
  .section-heading,
  .search-form,
  .inline-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .section-heading {
    gap: 10px;
  }

  .movie-grid,
  .ranking-grid,
  .compact-grid,
  .category-grid-page,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 28px;
    border-radius: 26px;
  }

  .detail-hero {
    padding: 28px 0;
  }

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