:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --emerald: #10b981;
  --emerald-dark: #059669;
  --cyan: #06b6d4;
  --amber: #f59e0b;
  --radius: 1.5rem;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

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

img {
  object-fit: cover;
}

.site-header {
  backdrop-filter: blur(10px);
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
}

.logo-text,
.footer-logo {
  letter-spacing: 0.02em;
}

.nav-link {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.86);
  transition: color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: #6ee7b7;
  transform: translateY(-1px);
}

.mobile-menu-button {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  color: #fff;
  font-size: 1.35rem;
}

.mobile-nav {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  padding: 0.75rem 0 1rem;
}

.mobile-link {
  display: block;
  padding: 0.75rem 0;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: var(--dark);
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.86) 0%, rgba(15, 23, 42, 0.68) 46%, rgba(15, 23, 42, 0.18) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 72vh;
  display: flex;
  align-items: center;
  max-width: 80rem;
  margin: 0 auto;
  padding: 5rem 1rem;
}

.hero-content {
  max-width: 46rem;
  color: #fff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(110, 231, 183, 0.45);
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(6, 78, 59, 0.32);
  backdrop-filter: blur(6px);
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.06em;
  margin-bottom: 1.2rem;
}

.hero h1 span {
  color: #34d399;
}

.hero p {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: #d1d5db;
  line-height: 1.8;
  margin-bottom: 1.6rem;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  color: #fff;
  box-shadow: 0 18px 36px rgba(16, 185, 129, 0.32);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.btn-ghost {
  color: var(--emerald-dark);
  background: #ecfdf5;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.2rem;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  color: #047857;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: #e0f2fe;
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.55rem;
}

.hero-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

.hero-dot.active {
  width: 2rem;
  background: #34d399;
}

.main-wrap {
  max-width: 80rem;
  margin: 0 auto;
  padding: 4rem 1rem 5rem;
}

.section-block {
  margin-bottom: 5rem;
}

.section-panel {
  padding: clamp(1.25rem, 4vw, 3rem);
  border-radius: 2rem;
  background: linear-gradient(135deg, #ecfdf5, #ecfeff);
  box-shadow: var(--shadow);
}

.section-dark {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
}

.section-amber {
  background: linear-gradient(135deg, #fffbeb, #fff7ed);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.section-title {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.15;
  font-weight: 900;
  color: var(--text);
}

.section-dark .section-title,
.section-dark .section-desc {
  color: #fff;
}

.section-desc {
  color: var(--muted);
  margin-top: 0.35rem;
  max-width: 44rem;
}

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

.movie-card {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.35rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16);
}

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

.poster-link img {
  width: 100%;
  height: 100%;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

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

.poster-badge,
.poster-play {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.poster-badge {
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.32rem 0.65rem;
  color: #fff;
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(8px);
  font-size: 0.75rem;
}

.poster-play {
  left: 50%;
  top: 50%;
  width: 3.4rem;
  height: 3.4rem;
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  color: #fff;
  background: rgba(16, 185, 129, 0.86);
  box-shadow: 0 16px 35px rgba(16, 185, 129, 0.42);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 1rem;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 0.55rem;
}

.card-meta a {
  color: var(--emerald-dark);
  font-weight: 800;
}

.card-body h3 {
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 900;
  margin-bottom: 0.55rem;
}

.card-body h3 a:hover {
  color: var(--emerald-dark);
}

.card-body p {
  min-height: 3.1rem;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.7;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

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

.category-card {
  position: relative;
  min-height: 13rem;
  overflow: hidden;
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  color: #fff;
  box-shadow: var(--shadow);
}

.category-card img,
.category-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.category-card img {
  transition: transform 0.35s ease;
}

.category-mask {
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.16));
}

.category-card strong,
.category-card em {
  position: relative;
  z-index: 2;
}

.category-card strong {
  font-size: 1.15rem;
  font-weight: 900;
}

.category-card em {
  margin-top: 0.35rem;
  color: #d1d5db;
  font-size: 0.86rem;
  line-height: 1.55;
  font-style: normal;
}

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

.compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.compact-card {
  position: relative;
  min-height: 8.5rem;
  border-radius: 1.25rem;
  overflow: hidden;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
  background: #0f172a;
}

.compact-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.62;
  transition: transform 0.3s ease;
}

.compact-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.2));
}

.compact-card strong,
.compact-card em,
.compact-rank {
  position: relative;
  z-index: 2;
}

.compact-card strong {
  font-size: 1.05rem;
  font-weight: 900;
  margin-bottom: 0.25rem;
}

.compact-card em {
  color: #d1d5db;
  font-style: normal;
  font-size: 0.86rem;
}

.compact-rank {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--emerald));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 900;
}

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

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.search-input {
  min-height: 3rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 0 1.1rem;
  outline: none;
  color: var(--text);
}

.search-input:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.filter-select {
  min-height: 3rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  padding: 0 1rem;
  background: #fff;
  color: var(--text);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

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

.page-hero {
  padding: 4rem 0 2.5rem;
}

.page-hero h1,
.detail-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.page-hero p,
.detail-lead {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.85;
  max-width: 52rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(18rem, 0.85fr);
  gap: 2rem;
  align-items: start;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 1.5rem;
  background: #000;
  box-shadow: 0 25px 60px rgba(2, 6, 23, 0.35);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.72));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-shell.playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-button {
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  font-size: 1.8rem;
  box-shadow: 0 20px 45px rgba(16, 185, 129, 0.45);
}

.detail-card {
  padding: 1.4rem;
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 1.2rem;
  margin-bottom: 1rem;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  color: #475569;
  font-size: 0.92rem;
}

.detail-meta strong {
  display: block;
  color: var(--text);
  font-weight: 900;
}

.content-panel {
  margin-top: 2rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 1.5rem;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.content-panel h2 {
  font-size: 1.55rem;
  font-weight: 950;
  margin-bottom: 0.85rem;
}

.content-panel p {
  color: #334155;
  line-height: 1.95;
  margin-bottom: 1rem;
}

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 3rem 0;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-logo {
  display: inline-flex;
  font-size: 1.35rem;
  font-weight: 950;
  color: #6ee7b7;
  margin-bottom: 0.6rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

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

.no-results {
  display: none;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #cbd5e1;
  border-radius: 1.25rem;
}

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

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

@media (max-width: 768px) {
  .hero,
  .hero-inner {
    min-height: 74vh;
  }

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

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

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

@media (max-width: 520px) {
  .movie-grid,
  .category-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

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

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