:root {
  --emerald: #059669;
  --teal: #0d9488;
  --cyan: #0891b2;
  --dark: #0f172a;
  --muted: #64748b;
  --soft: #f0fdfa;
  --line: rgba(15, 23, 42, 0.08);
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 1.25rem;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: #111827;
  background: linear-gradient(135deg, #f8fafc 0%, #ecfdf5 48%, #ecfeff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #059669, #0d9488, #0891b2);
  box-shadow: 0 10px 25px rgba(4, 120, 87, 0.28);
}

.nav-shell {
  max-width: 1280px;
  height: 4rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #ffffff;
  flex-shrink: 0;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  transition: transform 0.25s ease;
}

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

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
}

.brand-subtitle {
  margin-top: 0.15rem;
  color: #ccfbf1;
  font-size: 0.75rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-link,
.mobile-link {
  color: #ffffff;
  font-weight: 650;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #d1fae5;
}

.nav-search input,
.mobile-nav input {
  width: 16rem;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  color: #ffffff;
  outline: none;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.nav-search input::placeholder,
.mobile-nav input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.menu-toggle {
  display: none;
  color: #ffffff;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  background: #047857;
}

.mobile-nav.is-open {
  display: grid;
  gap: 0.9rem;
}

.hero-section {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  color: #ffffff;
}

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.42);
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.36), rgba(0, 0, 0, 0.16));
}

.hero-shell {
  position: relative;
  min-height: 600px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 5rem 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 3rem;
}

.hero-copy {
  max-width: 760px;
}

.hero-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #facc15;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-copy h1 {
  margin: 1rem 0 1.3rem;
  font-size: clamp(2.7rem, 7vw, 4.8rem);
  line-height: 1.05;
  font-weight: 900;
}

.hero-copy p {
  max-width: 780px;
  color: #e5e7eb;
  font-size: 1.25rem;
  line-height: 1.8;
}

.hero-chips,
.detail-meta,
.detail-tags,
.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-chips span,
.detail-meta span,
.detail-tags span,
.tag-line span {
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-weight: 650;
  font-size: 0.9rem;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.primary-btn,
.ghost-btn,
.home-search-form button,
.clear-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0.95rem 1.55rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-btn,
.home-search-form button,
.clear-filter {
  color: #ffffff;
  background: linear-gradient(90deg, #10b981, #14b8a6);
  box-shadow: 0 14px 30px rgba(20, 184, 166, 0.3);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.primary-btn:hover,
.ghost-btn:hover,
.home-search-form button:hover,
.clear-filter:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-rank-panel {
  padding: 1.25rem;
  border-radius: 1.5rem;
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.26);
}

.rank-panel-title {
  margin-bottom: 0.8rem;
  font-size: 1.25rem;
  font-weight: 900;
}

.rank-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem;
  border-radius: 1rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(4px);
}

.rank-card span {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  font-weight: 900;
}

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

.rank-card em {
  margin-top: 0.25rem;
  color: #d1d5db;
  font-style: normal;
  font-size: 0.86rem;
}

.search-band,
.content-section,
.detail-content-grid,
.player-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 1rem 0;
}

.search-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 1.5rem;
  align-items: center;
}

.search-band h2,
.section-heading h2,
.synopsis-card h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 900;
}

.search-band p,
.section-heading p,
.page-hero p,
.synopsis-card p {
  color: var(--muted);
  line-height: 1.8;
}

.home-search-form {
  display: flex;
  gap: 0.75rem;
  padding: 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.home-search-form input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: none;
  padding: 0 1rem;
  background: transparent;
  font-size: 1rem;
}

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

.section-kicker {
  display: inline-grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  margin-bottom: 0.75rem;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #0ea5e9);
}

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

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #ffffff;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.14);
}

.movie-card-link {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.poster-frame {
  position: relative;
  height: 14rem;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #047857);
}

.compact .poster-frame {
  height: 12.5rem;
}

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

.movie-card:hover .poster-frame img {
  transform: scale(1.1);
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.poster-badge {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  color: #ffffff;
  background: #ef4444;
  font-size: 0.78rem;
  font-weight: 900;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 3.1rem;
  height: 3.1rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.86);
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.movie-card-body {
  flex: 1;
  padding: 1.1rem;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.movie-card h3 {
  margin: 0.55rem 0;
  color: #111827;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.35;
}

.movie-card p {
  margin: 0;
  color: #4b5563;
  line-height: 1.7;
  font-size: 0.94rem;
}

.tag-line {
  margin-top: 0.85rem;
}

.tag-line span {
  background: #ecfdf5;
  color: #047857;
  font-size: 0.78rem;
}

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

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

.category-tile,
.category-card-inner {
  min-height: 9rem;
  display: block;
  padding: 1.3rem;
  border-radius: 1.25rem;
  background: #ffffff;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-card-inner:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 34px rgba(15, 23, 42, 0.14);
}

.category-tile span,
.category-name {
  display: block;
  margin-bottom: 0.55rem;
  color: #047857;
  font-size: 1.3rem;
  font-weight: 900;
}

.category-tile p,
.category-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.7;
}

.category-samples {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category-samples a {
  display: inline-flex;
  min-height: auto;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  color: #065f46;
  background: #ecfdf5;
  box-shadow: none;
  font-size: 0.86rem;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  position: relative;
  min-height: 330px;
  padding: 4.5rem 1rem;
  color: #ffffff;
  background: radial-gradient(circle at 25% 10%, rgba(250, 204, 21, 0.3), transparent 28%), linear-gradient(120deg, #064e3b, #0f766e, #0e7490);
  overflow: hidden;
}

.page-hero.slim {
  min-height: 270px;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -6rem;
  top: -6rem;
  width: 20rem;
  height: 20rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.page-hero > div {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
}

.page-hero h1 {
  margin: 0.8rem 0 1rem;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.12;
  font-weight: 950;
}

.page-hero p {
  max-width: 760px;
  color: #dcfce7;
  font-size: 1.12rem;
}

.filter-panel {
  margin-bottom: 1.6rem;
  padding: 1rem;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 180px 180px 180px auto;
  gap: 0.85rem;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.filter-panel label {
  display: grid;
  gap: 0.35rem;
  color: #0f172a;
  font-weight: 800;
  font-size: 0.86rem;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #d1fae5;
  border-radius: 0.9rem;
  padding: 0.72rem 0.85rem;
  outline: none;
  background: #ffffff;
}

.clear-filter {
  align-self: end;
  padding: 0.78rem 1rem;
}

.empty-state {
  display: none;
  margin: 2rem 0;
  padding: 2rem;
  text-align: center;
  border-radius: 1.2rem;
  background: #ffffff;
  color: #64748b;
  box-shadow: var(--shadow);
}

.empty-state.is-visible {
  display: block;
}

.ranking-list {
  display: grid;
  gap: 1rem;
}

.ranking-row a {
  display: grid;
  grid-template-columns: 3.5rem 7rem minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1.2rem;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row a:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 36px rgba(15, 23, 42, 0.14);
}

.ranking-index {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f43f5e, #ec4899);
  font-weight: 950;
}

.ranking-row img {
  width: 7rem;
  height: 5rem;
  object-fit: cover;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, #0f172a, #047857);
}

.ranking-row h3 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 900;
}

.ranking-row p {
  margin: 0 0 0.35rem;
  color: #4b5563;
  line-height: 1.6;
}

.ranking-row em {
  color: #059669;
  font-style: normal;
  font-weight: 800;
}

.detail-main {
  background: linear-gradient(135deg, #f8fafc 0%, #ecfdf5 100%);
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: #ffffff;
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.46), rgba(0, 0, 0, 0.2));
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 560px;
  margin: 0 auto;
  padding: 4rem 1rem;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 1.5rem;
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.34);
  background: linear-gradient(135deg, #0f172a, #047857);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.breadcrumb {
  display: inline-flex;
  margin-bottom: 1rem;
  color: #a7f3d0;
  font-weight: 900;
}

.detail-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  line-height: 1.08;
  font-weight: 950;
}

.detail-copy p {
  max-width: 850px;
  color: #e5e7eb;
  font-size: 1.15rem;
  line-height: 1.85;
}

.detail-tags {
  margin-top: 1rem;
}

.detail-tags span {
  background: rgba(16, 185, 129, 0.24);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  background: #020617;
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.22);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 0.8rem;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.2));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 5rem;
  height: 5rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #10b981, #14b8a6);
  box-shadow: 0 18px 38px rgba(16, 185, 129, 0.36);
  font-size: 2rem;
}

.play-overlay strong {
  max-width: 82%;
  text-align: center;
  font-size: 1.35rem;
}

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

.synopsis-card {
  padding: 1.5rem;
  border-radius: 1.25rem;
  background: #ffffff;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
}

.detail-nav {
  max-width: 1280px;
  margin: 2rem auto 0;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.detail-nav a {
  padding: 0.85rem 1rem;
  border-radius: 999px;
  color: #047857;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  font-weight: 850;
}

.related-section {
  padding-bottom: 2rem;
}

.site-footer {
  margin-top: 5rem;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937, #111827);
}

.footer-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1rem 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr 1.5fr;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 900;
}

.footer-brand span {
  color: #34d399;
}

.site-footer h3 {
  margin: 0 0 0.8rem;
  color: #ffffff;
}

.site-footer p,
.site-footer li {
  color: #9ca3af;
  line-height: 1.8;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: #9ca3af;
}

.searchable-card.is-hidden {
  display: none;
}

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

  .menu-toggle {
    display: block;
  }

  .hero-shell {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-rank-panel {
    max-width: 620px;
  }

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

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

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

  .filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-hero-content {
    grid-template-columns: 200px minmax(0, 1fr);
  }

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

@media (max-width: 700px) {
  .nav-shell {
    height: 3.8rem;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .hero-section,
  .hero-shell {
    min-height: 620px;
  }

  .hero-shell {
    padding: 3rem 1rem;
  }

  .hero-copy p {
    font-size: 1rem;
  }

  .home-search-form {
    border-radius: 1.2rem;
    flex-direction: column;
  }

  .home-search-form input {
    padding: 0.85rem 1rem;
  }

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

  .movie-grid,
  .library-grid,
  .category-grid,
  .category-grid.wide,
  .detail-content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .poster-frame,
  .compact .poster-frame {
    height: 15rem;
  }

  .ranking-row a {
    grid-template-columns: 3rem 5rem minmax(0, 1fr);
    gap: 0.8rem;
  }

  .ranking-row img {
    width: 5rem;
    height: 4rem;
  }

  .detail-hero-content {
    grid-template-columns: 1fr;
    padding-top: 2.5rem;
  }

  .detail-poster {
    max-width: 220px;
  }

  .detail-nav {
    flex-direction: column;
  }
}
