* {
  box-sizing: border-box;
}

:root {
  --emerald: #059669;
  --emerald-dark: #047857;
  --teal: #0d9488;
  --mint: #ecfdf5;
  --sky: #f0fdfa;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #dbeafe;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 42%, #f0fdfa 100%);
  min-height: 100vh;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.28);
}

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

.brand-text strong,
.footer-brand {
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--emerald), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
  font-style: normal;
}

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

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 700;
  color: #334155;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--emerald-dark);
  background: #d1fae5;
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.local-filter input,
.search-panel input {
  width: min(320px, 48vw);
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.94);
  outline: none;
  transition: 0.2s ease;
}

.header-search input:focus,
.local-filter input:focus,
.search-panel input:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

.header-search button,
.local-filter button,
.search-panel button,
.primary-button,
.section-cta {
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 14px 32px rgba(5, 150, 105, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.local-filter button:hover,
.search-panel button:hover,
.primary-button:hover,
.section-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(5, 150, 105, 0.28);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 14px;
  background: #ecfdf5;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--emerald-dark);
}

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

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

.mobile-links,
.mobile-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.mobile-categories a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--emerald-dark);
  background: #ecfdf5;
  font-size: 14px;
  font-weight: 700;
}

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

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

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.65s ease, transform 1.4s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.1));
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
  padding: 120px 24px 140px max(24px, calc((100vw - 1280px) / 2 + 24px));
  color: #ffffff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #34d399;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0 0 22px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  margin: 0 0 26px;
  max-width: 650px;
  color: #e2e8f0;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.8;
}

.hero-tags,
.tag-row,
.rank-tags,
.detail-meta,
.filter-pills,
.search-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.rank-tags span,
.detail-meta span,
.filter-pills button,
.search-links a {
  border: 1px solid rgba(5, 150, 105, 0.22);
  border-radius: 999px;
  padding: 7px 11px;
  color: #047857;
  background: #ecfdf5;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span {
  color: #d1fae5;
  border-color: rgba(110, 231, 183, 0.34);
  background: rgba(6, 78, 59, 0.42);
  backdrop-filter: blur(12px);
}

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

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 12px 20px;
  color: #ffffff;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  transition: 0.2s ease;
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.hero-nav {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 34px;
  width: min(1180px, calc(100% - 36px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 8px;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(18px);
}

.hero-thumb img {
  height: 58px;
  border-radius: 14px;
}

.hero-thumb span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 13px;
  font-weight: 800;
}

.hero-thumb.is-active {
  border-color: rgba(52, 211, 153, 0.92);
  background: rgba(5, 150, 105, 0.44);
}

.search-panel,
.page-shell,
.detail-shell,
.content-section,
.rank-section {
  width: min(1280px, calc(100% - 36px));
  margin: 0 auto;
}

.search-panel {
  margin-top: -52px;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 26px;
  border: 1px solid rgba(5, 150, 105, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1,
.player-caption h2,
.detail-content h2 {
  margin: 0;
  color: var(--ink);
}

.search-panel p,
.section-heading p,
.page-hero p,
.player-caption p,
.detail-one-line,
.detail-content p,
.site-footer p,
.category-main p,
.rank-info p,
.card-desc {
  color: var(--muted);
  line-height: 1.75;
}

.content-section,
.rank-section {
  padding: 74px 0 0;
}

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

.section-heading h2 {
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 740px;
  margin: 10px 0 0;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(5, 150, 105, 0.28);
  box-shadow: var(--shadow);
}

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

.poster-link img {
  transition: transform 0.45s ease;
}

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

.poster-year,
.rank-number {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
}

.rank-number {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 14px 30px rgba(5, 150, 105, 0.25);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--emerald-dark);
  font-size: 12px;
  font-weight: 900;
}

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

.card-body h3 a:hover,
.rank-info h3 a:hover,
.category-links a:hover,
.link-cloud a:hover {
  color: var(--emerald-dark);
}

.card-desc {
  min-height: 84px;
  margin: 0 0 14px;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-desc.compact {
  min-height: 58px;
  -webkit-line-clamp: 2;
}

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

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

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

.category-tile {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
}

.category-main {
  display: block;
}

.category-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
}

.category-main strong {
  display: block;
  margin-top: 14px;
  font-size: 22px;
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.category-links a,
.link-cloud a {
  border-radius: 999px;
  padding: 7px 11px;
  color: #334155;
  background: #f8fafc;
  font-size: 13px;
  font-weight: 700;
}

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

.rank-list.large {
  grid-template-columns: 1fr;
}

.rank-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  padding: 12px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.rank-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 18px;
  background: #ecfdf5;
}

.rank-cover span {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-info p {
  margin: 0 0 12px;
}

.rank-tags a {
  border-radius: 999px;
  padding: 7px 11px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  font-size: 13px;
  font-weight: 800;
}

.page-shell,
.detail-shell {
  padding-top: 34px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(5, 150, 105, 0.16);
  border-radius: 34px;
  padding: 46px;
  background: radial-gradient(circle at top right, rgba(45, 212, 191, 0.25), transparent 34%), linear-gradient(135deg, #ffffff, #ecfdf5);
  box-shadow: var(--shadow);
}

.page-hero.slim {
  padding: 42px;
}

.page-hero h1 {
  max-width: 900px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 820px;
  margin: 14px 0 0;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 18px;
  color: var(--muted);
  font-weight: 700;
}

.breadcrumb a {
  color: var(--emerald-dark);
}

.local-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.filter-pills {
  margin-top: 16px;
}

.filter-pills button {
  cursor: pointer;
}

.filter-pills button:hover,
.filter-pills button.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
}

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

.link-cloud a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.link-cloud span {
  color: var(--muted);
  font-size: 12px;
}

.search-links {
  margin-top: 18px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  background: #ecfdf5;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
}

.detail-copy h1 {
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.detail-one-line {
  margin: 18px 0;
  max-width: 760px;
  font-size: 20px;
}

.detail-meta {
  margin-bottom: 12px;
}

.tag-row.large {
  margin: 16px 0 26px;
}

.player-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: stretch;
  margin-top: 32px;
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.video-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.video-mask::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.35), rgba(6, 95, 70, 0.62));
}

.video-mask.is-hidden {
  display: none;
}

.player-start {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  border: none;
  border-radius: 999px;
  color: #ffffff;
  font-size: 34px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 22px 60px rgba(5, 150, 105, 0.42);
}

.player-caption {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 30px;
  padding: 28px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.player-caption h2 {
  font-size: 30px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

.detail-content article {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 30px;
  padding: 30px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.detail-content h2 {
  margin-bottom: 14px;
  font-size: 30px;
}

.detail-content p {
  margin: 0 0 14px;
}

.related-section {
  padding-bottom: 78px;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(255, 255, 255, 0.86);
}

.footer-inner {
  width: min(1280px, calc(100% - 36px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 34px;
}

.footer-inner h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.footer-inner ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.footer-inner a:hover {
  color: var(--emerald-dark);
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 18px;
  text-align: center;
  color: var(--muted);
}

.is-hidden-card {
  display: none !important;
}

@media (max-width: 1180px) {
  .movie-grid,
  .movie-grid.full {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .hero-nav {
    grid-template-columns: repeat(3, 1fr);
  }

  .header-search {
    display: none;
  }
}

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

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

  .hero {
    min-height: 680px;
  }

  .hero-copy {
    padding: 78px 22px 210px;
  }

  .hero-nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .search-panel,
  .section-heading,
  .player-section,
  .detail-content,
  .footer-inner,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .search-panel {
    margin-top: -30px;
  }

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

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

  .detail-poster {
    width: min(320px, 100%);
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 12px 14px;
  }

  .brand-text em {
    display: none;
  }

  .brand-text strong {
    font-size: 20px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-nav {
    grid-template-columns: 1fr;
    bottom: 18px;
  }

  .hero-thumb:nth-child(n+4) {
    display: none;
  }

  .search-panel,
  .page-hero,
  .detail-hero,
  .detail-content article,
  .player-caption {
    padding: 22px;
    border-radius: 24px;
  }

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

  .rank-row {
    grid-template-columns: 92px 1fr;
  }

  .card-body {
    padding: 13px;
  }

  .card-body h3 {
    font-size: 16px;
  }

  .card-desc {
    min-height: 62px;
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  .local-filter,
  .search-panel form {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .local-filter input,
  .search-panel input {
    width: 100%;
  }
}
