* {
  box-sizing: border-box;
}

:root {
  --bg: #f9fafb;
  --panel: #ffffff;
  --panel-soft: #f0fdf4;
  --text: #111827;
  --muted: #6b7280;
  --muted-strong: #4b5563;
  --line: #e5e7eb;
  --emerald: #10b981;
  --emerald-dark: #059669;
  --teal: #0d9488;
  --rose: #e11d48;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 1rem;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.header-inner,
.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #0d9488);
  box-shadow: 0 16px 28px rgba(16, 185, 129, 0.28);
  transition: transform 0.2s ease;
}

.logo:hover .logo-mark {
  transform: scale(1.05);
}

.logo-text {
  background: linear-gradient(90deg, #059669, #0d9488);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.primary-nav a,
.mobile-nav a {
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease;
}

.primary-nav a:hover,
.mobile-nav a:hover {
  color: var(--emerald-dark);
}

.header-search {
  width: 250px;
  position: relative;
}

.search-box {
  position: relative;
}

.search-input,
.local-input,
.filter-select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  outline: none;
  padding: 0 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.search-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 80;
  max-height: 380px;
  overflow: auto;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 8px;
}

.search-panel.is-open {
  display: block;
}

.search-result {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  padding: 9px;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.search-result:hover {
  background: #f3f4f6;
}

.search-result img {
  width: 48px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  background: linear-gradient(135deg, #ecfdf5, #ccfbf1);
}

.search-result strong {
  display: block;
  line-height: 1.35;
  color: #111827;
}

.search-result span {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 0.82rem;
}

.search-empty {
  padding: 12px;
  color: #6b7280;
  font-size: 0.92rem;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  color: #111827;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid #e5e7eb;
  padding: 12px 16px 18px;
  background: rgba(255, 255, 255, 0.98);
}

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

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #030712;
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
}

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

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 650px;
  padding: 72px 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6ee7b7;
  font-weight: 800;
  margin-bottom: 14px;
}

.hero-kicker::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #34d399;
  box-shadow: 0 0 0 7px rgba(52, 211, 153, 0.2);
}

.hero h1 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(2.1rem, 6vw, 4.8rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.78;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-size: 0.92rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #0d9488);
  box-shadow: 0 15px 28px rgba(16, 185, 129, 0.28);
}

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

.btn-secondary {
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

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

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  transform: translateY(-50%);
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.main-space {
  padding: 48px 0 72px;
}

.section {
  margin-top: 52px;
}

.section:first-child {
  margin-top: 0;
}

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

.section-title {
  margin: 0;
  color: #111827;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.section-desc {
  margin: 8px 0 0;
  max-width: 760px;
  color: #6b7280;
  line-height: 1.72;
}

.title-line {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.title-line::before {
  content: "";
  width: 6px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #10b981, #0d9488);
}

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

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

.movie-card {
  min-width: 0;
}

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

.poster-link,
.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #ecfdf5, #ccfbf1);
}

.poster-frame {
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow-soft);
}

.poster-frame.wide {
  aspect-ratio: 16 / 10;
}

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

.poster-link:hover img {
  transform: scale(1.06);
  filter: saturate(1.08);
}

.card-badge,
.rank-badge {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 10px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(10px);
  font-size: 0.78rem;
  font-weight: 800;
}

.rank-badge {
  background: linear-gradient(135deg, #f43f5e, #fb7185);
}

.card-body {
  padding: 12px 2px 0;
}

.card-title {
  margin: 0;
  color: #111827;
  font-size: 1rem;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title {
  color: var(--emerald-dark);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  color: #6b7280;
  font-size: 0.86rem;
}

.card-desc {
  margin: 8px 0 0;
  color: #6b7280;
  font-size: 0.92rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-panel {
  padding: 30px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.14);
}

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

.category-block:first-child {
  margin-top: 0;
}

.category-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.category-heading h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #1f2937;
  font-size: 1.18rem;
}

.category-heading h3::before {
  content: "";
  width: 5px;
  height: 24px;
  border-radius: 999px;
  background: #10b981;
}

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

.category-card {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  color: #111827;
}

.category-card p {
  margin: 0;
  color: #6b7280;
  line-height: 1.68;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 170px 170px;
  gap: 14px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  margin: 24px 0 28px;
}

.page-hero {
  padding: 58px 0 36px;
  background: linear-gradient(135deg, #ecfdf5, #ffffff 52%, #ccfbf1);
  border-bottom: 1px solid #e5e7eb;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 820px;
  margin: 16px 0 0;
  color: #4b5563;
  line-height: 1.76;
  font-size: 1.08rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #6b7280;
  font-size: 0.94rem;
}

.breadcrumb a {
  color: #047857;
  font-weight: 700;
}

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

.detail-card,
.side-card {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  border: 1px solid #eef2f7;
}

.detail-card {
  overflow: hidden;
}

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

.movie-video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  padding: 0;
  color: #ffffff;
  background: #020617;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
  filter: blur(1px) saturate(1.08);
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.2), rgba(2, 6, 23, 0.52));
}

.player-cover.is-hidden {
  display: none;
}

.player-play {
  position: relative;
  z-index: 2;
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #0d9488);
  box-shadow: 0 20px 45px rgba(16, 185, 129, 0.34);
}

.player-play::before {
  content: "";
  position: absolute;
  left: 33px;
  top: 25px;
  width: 0;
  height: 0;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 24px solid #ffffff;
}

.detail-content {
  padding: 28px;
}

.detail-content h1 {
  margin: 0 0 16px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.16;
  letter-spacing: -0.04em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0 24px;
}

.detail-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 0.88rem;
  font-weight: 650;
}

.detail-section {
  margin-top: 28px;
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.detail-section p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.side-card {
  padding: 22px;
}

.side-card h2,
.side-card h3 {
  margin: 0 0 16px;
  font-size: 1.25rem;
}

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

.related-item {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  padding: 8px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.related-item:hover {
  background: #f9fafb;
}

.related-item img {
  width: 78px;
  height: 104px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #ecfdf5, #ccfbf1);
}

.related-item strong {
  display: block;
  color: #111827;
  line-height: 1.38;
}

.related-item span {
  display: block;
  margin-top: 7px;
  color: #6b7280;
  font-size: 0.88rem;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 90px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #eef2f7;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.rank-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #0d9488);
  font-weight: 900;
}

.rank-row img {
  width: 90px;
  height: 120px;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #ecfdf5, #ccfbf1);
}

.rank-row h2,
.rank-row h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.rank-row p {
  margin: 0;
  color: #6b7280;
  line-height: 1.65;
}

.site-footer {
  color: #e5e7eb;
  background: linear-gradient(135deg, #111827, #1f2937 56%, #111827);
  margin-top: 56px;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: #6ee7b7;
  font-size: 1.05rem;
}

.site-footer p,
.site-footer a {
  color: #d1d5db;
  line-height: 1.76;
  font-size: 0.94rem;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(229, 231, 235, 0.12);
  padding: 16px 0;
  color: #9ca3af;
  text-align: center;
  font-size: 0.9rem;
}

@media (max-width: 1050px) {
  .primary-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

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

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

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

@media (max-width: 760px) {
  .header-inner,
  .container,
  .hero-content,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .hero,
  .hero-content {
    min-height: 520px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-copy {
    padding: 58px 0;
  }

  .section-head,
  .category-heading {
    display: block;
  }

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

  .category-panel,
  .detail-content {
    padding: 20px;
  }

  .category-cards,
  .filter-bar,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 42px 74px 1fr;
    gap: 12px;
  }

  .rank-number {
    width: 38px;
    height: 38px;
  }

  .rank-row img {
    width: 74px;
    height: 98px;
  }

  .player-play {
    width: 70px;
    height: 70px;
  }

  .player-play::before {
    left: 28px;
    top: 21px;
    border-top-width: 14px;
    border-bottom-width: 14px;
    border-left-width: 21px;
  }
}
