:root {
  --green-50: #ecfdf5;
  --green-100: #d1fae5;
  --green-500: #10b981;
  --green-600: #059669;
  --green-700: #047857;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 40%, #ffffff 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(16, 185, 129, 0.14);
  backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: #0f172a;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.28);
}

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

.desktop-nav a,
.mobile-nav a,
.footer-links a,
.footer-links button {
  color: #374151;
  border-radius: 999px;
  padding: 10px 16px;
  transition: 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover,
.footer-links button:hover {
  color: var(--green-700);
  background: var(--green-50);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--green-50);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--green-700);
}

.mobile-nav {
  display: none;
  padding: 0 20px 16px;
  max-width: 1240px;
  margin: 0 auto;
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  padding: 78px 20px 90px;
  background: radial-gradient(circle at 15% 18%, rgba(16, 185, 129, 0.16), transparent 30%), radial-gradient(circle at 82% 16%, rgba(34, 197, 94, 0.16), transparent 28%), linear-gradient(135deg, #ecfdf5 0%, #ffffff 52%, #f0fdf4 100%);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.10);
  filter: blur(2px);
}

.hero::before {
  width: 420px;
  height: 420px;
  right: -120px;
  top: 40px;
}

.hero::after {
  width: 280px;
  height: 280px;
  left: -90px;
  bottom: -80px;
}

.hero-inner,
.section-inner,
.footer-inner,
.detail-wrap,
.category-wrap,
.rank-wrap {
  width: min(1240px, 100%);
  margin: 0 auto;
  position: relative;
}

.hero-slider {
  position: relative;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  align-items: center;
  gap: 56px;
  animation: fadeUp 0.55s ease both;
}

.hero-slide.is-active {
  display: grid;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--green-700);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero h1 span,
.section-title span,
.detail-title span {
  color: transparent;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-desc {
  max-width: 650px;
  margin: 0 0 26px;
  color: #4b5563;
  font-size: 19px;
  line-height: 1.8;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 26px 0 30px;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 700;
  transition: 0.22s ease;
}

.primary-btn {
  color: #ffffff;
  background: var(--green-600);
  box-shadow: 0 16px 34px rgba(5, 150, 105, 0.28);
}

.primary-btn:hover {
  background: var(--green-700);
  transform: translateY(-2px);
}

.secondary-btn {
  color: var(--green-700);
  background: #ffffff;
  border: 2px solid var(--green-600);
}

.secondary-btn:hover,
.ghost-btn:hover {
  background: var(--green-50);
  transform: translateY(-2px);
}

.hero-tags,
.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  color: var(--green-700);
  background: rgba(16, 185, 129, 0.10);
  font-size: 13px;
  font-weight: 650;
}

.hero-art {
  position: relative;
  min-height: 470px;
}

.hero-cover {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  background: #d1fae5;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-cover::after,
.movie-cover::after,
.detail-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
  pointer-events: none;
}

.hero-cover img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hero-glass {
  position: absolute;
  left: -28px;
  bottom: 34px;
  max-width: 330px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.70);
  border-radius: 24px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.22);
}

.hero-glass strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.hero-glass p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.65;
}

.hero-dots {
  display: flex;
  gap: 10px;
  margin-top: 34px;
}

.hero-dots button {
  width: 38px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.22);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-dots button.is-active {
  width: 64px;
  background: var(--green-600);
}

.quick-search {
  margin-top: -44px;
  padding: 0 20px;
  position: relative;
  z-index: 5;
}

.search-panel {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  border: 1px solid rgba(16, 185, 129, 0.16);
  backdrop-filter: blur(18px);
}

.search-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px 160px auto;
  gap: 12px;
}

.search-form input,
.search-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  min-height: 48px;
  padding: 0 15px;
  color: #1f2937;
  background: #ffffff;
  outline: none;
}

.search-form input:focus,
.search-form select:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.13);
}

.ghost-btn {
  border: 0;
  color: var(--green-700);
  background: var(--green-50);
  cursor: pointer;
}

.section {
  padding: 74px 20px;
}

.section-soft {
  background: linear-gradient(180deg, #ffffff 0%, #f0fdf4 100%);
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid rgba(16, 185, 129, 0.10);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: 0.24s ease;
}

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

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--green-100);
}

.movie-cover img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: 0.35s ease;
}

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

.movie-type,
.movie-year {
  position: absolute;
  z-index: 2;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.92);
  font-size: 12px;
  font-weight: 700;
}

.movie-year {
  left: auto;
  right: 12px;
  background: rgba(15, 23, 42, 0.72);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-info h3 a:hover {
  color: var(--green-700);
}

.movie-info p {
  margin: 0 0 12px;
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: #4b5563;
  font-size: 13px;
}

.movie-meta span {
  padding: 5px 8px;
  border-radius: 10px;
  background: #f3f4f6;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.category-card {
  min-height: 190px;
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(135deg, #ffffff, #ecfdf5);
  border: 1px solid rgba(16, 185, 129, 0.16);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.13);
}

.category-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: 23px;
}

.category-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.75;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.12);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.rank-item:hover {
  color: var(--green-700);
  transform: translateX(4px);
}

.rank-item span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  font-weight: 800;
}

.rank-item strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-item em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.detail-hero {
  padding: 58px 20px 40px;
  background: radial-gradient(circle at 15% 10%, rgba(16, 185, 129, 0.14), transparent 30%), linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
}

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

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

.detail-main {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 38px;
  align-items: start;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: var(--green-100);
  box-shadow: var(--shadow);
}

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

.detail-title {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-desc {
  color: #4b5563;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.content-panel {
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.12);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.content-panel h2,
.content-panel h3 {
  margin: 0 0 14px;
}

.content-panel p {
  margin: 0;
  color: #4b5563;
  line-height: 1.9;
}

.content-stack {
  display: grid;
  gap: 20px;
}

.player-section {
  padding: 54px 20px;
  background: #0f172a;
}

.player-wrap {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  color: #ffffff;
}

.player-head h2 {
  margin: 0;
  font-size: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.36), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: 0.2s ease;
}

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

.play-overlay span:first-child {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--green-600);
  box-shadow: 0 18px 38px rgba(5, 150, 105, 0.35);
  font-size: 30px;
}

.play-overlay:hover span:first-child {
  transform: scale(1.08);
  background: var(--green-500);
}

.site-footer {
  padding: 44px 20px;
  background: linear-gradient(180deg, #ecfdf5, #ffffff);
  border-top: 1px solid rgba(16, 185, 129, 0.13);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-inner p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
  gap: 8px;
}

.footer-links button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.empty-result {
  display: none;
  padding: 24px;
  border-radius: 24px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
}

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-slide,
  .detail-main,
  .rank-layout {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: auto;
  }

  .hero-cover {
    transform: none;
  }

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

  .footer-inner {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: auto;
    padding-top: 48px;
  }

  .hero-glass {
    position: relative;
    left: auto;
    bottom: auto;
    margin-top: 14px;
    max-width: none;
  }

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

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

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

  .movie-info {
    padding: 12px;
  }

  .movie-info p,
  .tag-row {
    display: none;
  }

  .rank-item {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .rank-item em {
    grid-column: 2;
  }

  .content-panel {
    padding: 22px;
  }
}
