* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #111827;
  background: #f8fafc;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
}

.header-inner {
  max-width: 1220px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #34d399, #06b6d4);
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.26);
}

.brand-name,
.footer-logo {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #059669, #0891b2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  font-weight: 700;
  color: #475569;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: #059669;
}

.header-search {
  width: 280px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #ffffff;
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 10px 12px 10px 16px;
  background: transparent;
  color: #0f172a;
}

.header-search button,
.primary-btn,
.secondary-btn,
.filter-panel button,
.play-button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.header-search button {
  padding: 10px 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #06b6d4);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  border: 0;
  background: transparent;
  padding: 8px;
}

.mobile-toggle span {
  width: 24px;
  height: 2px;
  background: #0f172a;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 22px 18px;
  border-top: 1px solid #e2e8f0;
}

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

.main-wrap,
.footer-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 22px;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 48%, #2563eb 100%);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  mix-blend-mode: screen;
}

.hero::before {
  width: 520px;
  height: 520px;
  left: -150px;
  top: -220px;
  background: rgba(255, 255, 255, 0.18);
  filter: blur(18px);
}

.hero::after {
  width: 440px;
  height: 440px;
  right: -110px;
  bottom: -170px;
  background: rgba(251, 191, 36, 0.22);
  filter: blur(30px);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1220px;
  margin: 0 auto;
  padding: 76px 22px 68px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.72fr);
  gap: 48px;
  align-items: center;
}

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

.hero-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-weight: 800;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero h1 span {
  color: #fef3c7;
}

.hero p {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions,
.hero-meta,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
  color: #064e3b;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

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

.primary-btn:hover,
.secondary-btn:hover,
.movie-card:hover,
.category-card:hover {
  transform: translateY(-3px);
}

.hero-meta span {
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.18);
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 800;
}

.hero-poster {
  position: relative;
  aspect-ratio: 4 / 5;
  min-height: 440px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 34px 70px rgba(15, 23, 42, 0.36);
  background: rgba(15, 23, 42, 0.16);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(15, 23, 42, 0.82));
}

.hero-poster-title {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  font-size: 22px;
  font-weight: 900;
}

.hero-dots {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 10px;
  margin-top: 34px;
}

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 42px;
  background: #ffffff;
}

.home-search-card {
  margin: -34px auto 64px;
  position: relative;
  z-index: 5;
  max-width: 1100px;
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.13);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.home-search-card form,
.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 150px;
  gap: 14px;
}

.home-search-card input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  padding: 14px 16px;
  background: #f8fafc;
  outline: 0;
  color: #0f172a;
}

.home-search-card button,
.filter-panel button {
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #06b6d4);
}

.section-block {
  margin: 72px 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.05em;
}

.section-head p {
  max-width: 560px;
  margin: 0;
  color: #64748b;
  line-height: 1.8;
}

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

.category-card {
  min-height: 160px;
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(135deg, #ecfdf5, #ecfeff);
  border: 1px solid #dbeafe;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  box-shadow: 0 24px 44px rgba(15, 23, 42, 0.10);
}

.category-card strong {
  display: block;
  margin-bottom: 12px;
  color: #0f766e;
  font-size: 21px;
}

.category-card p {
  margin: 0;
  color: #475569;
  line-height: 1.7;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: 0 26px 54px rgba(15, 23, 42, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #d1fae5, #cffafe);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 52%, rgba(15, 23, 42, 0.78));
}

.poster-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.68);
  font-size: 12px;
  font-weight: 900;
}

.movie-card-body {
  padding: 16px;
}

.movie-meta-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  color: #059669;
  font-size: 12px;
  font-weight: 900;
}

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

.movie-card p {
  margin: 10px 0 0;
  color: #64748b;
  line-height: 1.65;
  font-size: 14px;
}

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

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.rank-num {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  font-weight: 900;
}

.rank-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 900;
}

.rank-meta {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.page-hero {
  padding: 64px 0;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #06b6d4);
}

.page-hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  font-size: 18px;
}

.filter-panel {
  margin: 34px 0;
  padding: 18px;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
}

.breadcrumb a {
  color: #059669;
}

.player-card,
.detail-card,
.sidebar-card {
  overflow: hidden;
  border-radius: 30px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.09);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-box video,
.play-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-box video {
  object-fit: contain;
  z-index: 1;
}

.play-layer {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.play-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.74));
}

.play-layer.is-hidden {
  display: none;
}

.play-button {
  position: relative;
  z-index: 3;
  min-width: 128px;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  color: #064e3b;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.detail-card {
  padding: 28px;
  margin-top: 24px;
}

.detail-card h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.18;
  letter-spacing: -0.05em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-weight: 900;
  font-size: 13px;
}

.prose-block {
  margin-top: 30px;
}

.prose-block h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.prose-block p {
  margin: 0;
  color: #475569;
  line-height: 1.95;
  font-size: 16px;
}

.sidebar-card {
  padding: 22px;
}

.sidebar-card h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

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

.sidebar-list a {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.sidebar-list img {
  width: 72px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #d1fae5, #cffafe);
}

.sidebar-list strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

.sidebar-list span {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 13px;
}

.site-footer {
  margin-top: 80px;
  padding: 44px 0;
  background: linear-gradient(180deg, #f8fafc, #e2e8f0);
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

.footer-inner p {
  max-width: 520px;
  color: #64748b;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.no-result {
  display: none;
  padding: 30px;
  border-radius: 24px;
  background: #ffffff;
  color: #64748b;
  font-weight: 800;
}

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

@media (max-width: 1080px) {
  .header-search {
    display: none;
  }

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

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

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

  .mobile-toggle {
    display: flex;
    margin-left: auto;
  }

  .hero-inner {
    padding: 54px 18px 50px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-poster {
    min-height: 320px;
  }

  .home-search-card form,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

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

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

  .rank-meta {
    grid-column: 2;
  }
}

@media (max-width: 520px) {
  .header-inner {
    padding: 0 16px;
  }

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

  .main-wrap,
  .footer-inner {
    padding: 0 16px;
  }

  .movie-grid,
  .category-grid,
  .ranking-panel {
    grid-template-columns: 1fr;
  }

  .detail-card,
  .sidebar-card {
    padding: 20px;
  }
}
