:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-strong: #0f172a;
  --text: #111827;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --cyan: #0891b2;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --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(20, 184, 166, 0.12), transparent 34rem), var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

img.image-hidden {
  opacity: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(18px);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
}

.nav-shell {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.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;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 10px 22px rgba(13, 148, 136, 0.35);
}

.brand-text {
  font-size: 1.2rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-link {
  padding: 10px 16px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  transition: all 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #ffffff;
  background: rgba(20, 184, 166, 0.2);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 24px 18px;
  flex-direction: column;
  gap: 8px;
}

.hero-slider {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: linear-gradient(135deg, #042f2e, #164e63);
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  transform: scale(1.02);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.56) 48%, rgba(13, 148, 136, 0.28));
}

.hero-copy {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1180px, calc(100% - 48px));
  transform: translate(-50%, -50%);
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.92);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

.hero-copy h1,
.hero-copy h2,
.simple-hero h1,
.category-hero h1 {
  margin: 20px 0 16px;
  max-width: 780px;
  font-size: clamp(2.4rem, 7vw, 5.3rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.8;
}

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

.hero-meta a,
.hero-meta span,
.hero-meta strong,
.detail-kicker a,
.detail-kicker span,
.detail-kicker strong {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-weight: 700;
}

.hero-actions,
.compact-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-btn,
.secondary-btn,
.quick-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-btn,
.quick-search button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 14px 30px rgba(13, 148, 136, 0.32);
}

.secondary-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.primary-btn:hover,
.secondary-btn:hover,
.quick-search button:hover {
  transform: translateY(-2px);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: all 0.22s ease;
}

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

.main-shell {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.page-shell {
  padding: 40px 0 70px;
}

.quick-search {
  margin: -44px auto 42px;
  position: relative;
  z-index: 7;
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.quick-search input,
.search-box input,
.filter-controls select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--text);
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quick-search input:focus,
.search-box input:focus,
.filter-controls select:focus {
  border-color: rgba(13, 148, 136, 0.55);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.quick-tags a,
.link-cloud a,
.detail-tags a,
.tag-row span {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(13, 148, 136, 0.1);
  color: var(--teal-dark);
  font-weight: 700;
}

.content-section {
  margin: 48px 0;
}

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

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.03em;
}

.section-head p,
.simple-hero p,
.category-hero p,
.footer-shell p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  color: var(--teal-dark);
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #164e63, #0f766e);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.65));
  opacity: 0;
  transition: opacity 0.24s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.type-badge,
.year-badge,
.rank-badge,
.play-pill {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}

.type-badge {
  left: 10px;
  top: 10px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.75);
}

.year-badge {
  right: 10px;
  top: 10px;
  padding: 6px 10px;
  background: rgba(13, 148, 136, 0.9);
}

.rank-badge {
  left: 10px;
  bottom: 10px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.play-pill {
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  background: rgba(13, 148, 136, 0.94);
  transition: all 0.24s ease;
}

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

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.45;
}

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

.card-body p {
  margin: 0 0 13px;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.card-meta {
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.84rem;
}

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

.card-meta strong {
  color: #f97316;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 9px;
  font-size: 0.78rem;
}

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

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

.category-tile {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  border-radius: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #164e63, #0f766e);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.3s ease;
}

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

.category-tile span,
.category-tile strong {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 1.25rem;
  font-weight: 900;
}

.category-tile strong {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.78);
}

.simple-hero,
.category-hero {
  margin-bottom: 34px;
  border-radius: 28px;
  padding: clamp(28px, 5vw, 54px);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 118, 110, 0.88));
  color: #ffffff;
  overflow: hidden;
}

.simple-hero p,
.category-hero p {
  color: rgba(255, 255, 255, 0.78);
  max-width: 760px;
}

.category-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: center;
}

.category-hero img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin: 0 0 28px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.filter-controls {
  display: flex;
  gap: 10px;
}

.filter-controls select {
  min-width: 138px;
}

.link-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.detail-shell {
  padding: 34px 0 72px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.detail-main,
.detail-side,
.side-card,
.poster-panel,
.detail-info {
  border-radius: 26px;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.28), rgba(2, 6, 23, 0.58));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.big-play {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 14px 30px rgba(13, 148, 136, 0.34);
  font-size: 1.7rem;
}

.detail-info {
  margin-top: 22px;
  padding: 28px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.detail-kicker a,
.detail-kicker span,
.detail-kicker strong {
  color: var(--teal-dark);
  background: rgba(13, 148, 136, 0.1);
}

.detail-info h1 {
  margin: 18px 0 14px;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.lead-text {
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.9;
}

.detail-info h2,
.side-card h2 {
  margin: 28px 0 12px;
  font-size: 1.35rem;
}

.detail-info p {
  color: #334155;
  line-height: 1.95;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.poster-panel,
.side-card {
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.poster-panel {
  overflow: hidden;
}

.poster-panel img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #164e63, #0f766e);
}

.poster-panel div {
  display: flex;
  justify-content: space-between;
  padding: 16px;
  font-weight: 900;
}

.poster-panel strong {
  color: #f97316;
}

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

.side-card h2 {
  margin-top: 0;
}

.side-card dl {
  margin: 0;
}

.side-card div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.side-card div:last-child {
  border-bottom: 0;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.site-footer {
  margin-top: 60px;
  background: #0f172a;
  color: #ffffff;
}

.footer-shell {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 1fr;
  gap: 26px;
}

.footer-links,
.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
}

.footer-links a,
.footer-tags a {
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
}

[data-card].is-filtered {
  display: none;
}

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

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

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

  .side-card {
    margin-top: 0;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero-slider {
    min-height: 560px;
  }

  .hero-copy,
  .main-shell,
  .footer-shell {
    width: min(100% - 28px, 1280px);
  }

  .quick-search form,
  .filter-panel,
  .category-hero,
  .footer-shell,
  .detail-side {
    grid-template-columns: 1fr;
  }

  .filter-controls {
    flex-direction: column;
  }

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

@media (max-width: 520px) {
  .nav-shell {
    padding: 0 14px;
  }

  .brand-text {
    font-size: 1rem;
  }

  .hero-slider {
    min-height: 510px;
  }

  .hero-copy h1,
  .hero-copy h2,
  .simple-hero h1,
  .category-hero h1 {
    font-size: 2.25rem;
  }

  .movie-grid,
  .library-grid,
  .rank-grid,
  .category-grid,
  .large-category-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-info {
    padding: 20px;
  }
}
