:root {
  --bg: #f7faf9;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #637083;
  --line: rgba(15, 23, 42, 0.08);
  --brand: #059669;
  --brand-dark: #047857;
  --brand-soft: rgba(16, 185, 129, 0.12);
  --cyan: #0e7490;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

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

main {
  min-height: 60vh;
}

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

.header-inner {
  max-width: 1200px;
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(5, 150, 105, 0.28);
}

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

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

.site-nav a {
  padding: 10px 16px;
  border-radius: 14px;
  color: #334155;
  font-weight: 700;
  transition: all 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #1f2937;
  background: #f1f5f9;
  cursor: pointer;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: radial-gradient(circle at top left, #10b981 0%, #0f766e 30%, #0f172a 78%);
}

.hero-stage,
.hero-slide,
.hero-backdrop,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-backdrop {
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  filter: saturate(1.08);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.68) 48%, rgba(15, 23, 42, 0.1) 100%),
    linear-gradient(180deg, rgba(5, 150, 105, 0.2), rgba(2, 6, 23, 0.55));
}

.hero-layout {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  min-height: 620px;
  margin: 0 auto;
  padding: 84px 20px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 56px;
}

.hero-copy {
  max-width: 720px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 0 0 18px;
  padding: 8px 14px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(167, 243, 208, 0.22);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 22px;
  color: #ffffff;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-desc {
  max-width: 660px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: 19px;
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.card-tags,
.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.card-tags span,
.tag-line span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

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

.btn-primary,
.btn-ghost,
.top-search button,
.global-search-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 16px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary,
.top-search button,
.global-search-box button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  box-shadow: 0 16px 32px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover,
.top-search button:hover,
.global-search-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(5, 150, 105, 0.38);
}

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

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

.hero-poster {
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

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

.hero-control {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.search-strip,
.content-section,
.page-hero,
.detail-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.search-strip {
  margin-top: -42px;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 24px;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.search-strip h2,
.section-head h2,
.rank-panel h2,
.footer-links h2,
.text-panel h2 {
  margin: 0;
  color: #0f172a;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.search-strip p,
.section-head p,
.category-tile p,
.category-card p,
.footer-brand p,
.text-panel p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.top-search,
.global-search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.top-search input,
.global-search-box input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  outline: none;
}

.top-search input:focus,
.global-search-box input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(5, 150, 105, 0.55);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.content-section {
  padding-top: 64px;
  padding-bottom: 20px;
}

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

.section-link,
.rank-panel-head a {
  color: var(--brand-dark);
  font-weight: 900;
}

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

.category-tile,
.category-card,
.rank-panel,
.text-panel,
.filter-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.07);
}

.category-tile {
  min-height: 150px;
  padding: 22px;
  transition: all 0.2s ease;
}

.category-tile:hover,
.category-card:hover,
.movie-card:hover,
.rank-row:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-tile span,
.category-card h2 {
  display: block;
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.07);
  transition: all 0.22s ease;
}

.card-link {
  display: block;
  height: 100%;
}

.card-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #052e2b, #0f172a);
}

.card-poster img,
.detail-poster img,
.rank-row img,
.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--brand-dark);
  font-size: 22px;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.play-mark::before {
  content: "";
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.25);
}

.play-mark {
  z-index: 1;
}

.play-mark::before {
  z-index: -1;
}

.movie-card:hover .play-mark {
  opacity: 1;
}

.card-content {
  padding: 16px;
}

.card-content h3 {
  margin: 12px 0 8px;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.card-content p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.wide-list {
  display: grid;
  gap: 16px;
}

.movie-card-wide .card-link {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.movie-card-wide .card-poster {
  aspect-ratio: auto;
  height: 150px;
}

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 20px;
}

.rank-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.rank-mini-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid #eef2f7;
}

.rank-no {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--cyan));
  border-radius: 12px;
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  color: #0f172a;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-year {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
}

.page-hero {
  padding-top: 72px;
  padding-bottom: 52px;
}

.compact-hero,
.search-hero {
  max-width: none;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
  background: radial-gradient(circle at 20% 10%, rgba(16, 185, 129, 0.25), transparent 28%), linear-gradient(135deg, #082f2c, #0f172a 65%, #164e63);
  color: #ffffff;
}

.compact-hero > div,
.search-hero > div {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-hero h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 900;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  color: #d1d5db;
  font-size: 17px;
}

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

.category-card {
  overflow: hidden;
  transition: all 0.22s ease;
}

.category-card > div:last-child {
  padding: 20px;
}

.category-thumbs {
  height: 140px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 16px;
  margin-bottom: 24px;
  padding: 18px;
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 900;
}

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

.rank-row {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: all 0.2s ease;
}

.rank-row a {
  display: grid;
  grid-template-columns: 68px 112px minmax(0, 1fr) 90px;
  gap: 18px;
  align-items: center;
  padding: 12px;
}

.rank-row-number {
  color: var(--brand-dark);
  font-size: 26px;
  font-weight: 950;
  text-align: center;
}

.rank-row img {
  width: 112px;
  height: 72px;
  border-radius: 12px;
  background: #0f172a;
}

.rank-row-main strong {
  display: block;
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
}

.rank-row-main em {
  display: block;
  margin: 4px 0 8px;
  color: #64748b;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-row-year {
  color: #94a3b8;
  font-weight: 900;
  text-align: right;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  background: #0f172a;
  color: #ffffff;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(18px) saturate(1.2);
  transform: scale(1.1);
  opacity: 0.32;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.72));
}

.detail-wrap {
  position: relative;
  z-index: 2;
  padding-top: 32px;
  padding-bottom: 58px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 28px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a {
  color: #a7f3d0;
  font-weight: 800;
}

.detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  margin: 0;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.36);
}

.detail-info h1 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(38px, 5.2vw, 68px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 780px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.detail-content {
  display: grid;
  gap: 26px;
}

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

.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.25), rgba(2, 6, 23, 0.55));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  font-size: 34px;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.38);
}

.player-start.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-state {
  position: absolute;
  left: 18px;
  bottom: 18px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.text-panel {
  padding: 28px;
}

.text-panel h2 + p {
  margin-bottom: 24px;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 0;
}

.info-list div {
  padding: 14px;
  background: #f8fafc;
  border-radius: 16px;
}

.info-list dt {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
}

.info-list dd {
  margin: 6px 0 0;
  color: #0f172a;
  font-weight: 900;
}

.global-search-box {
  max-width: 720px;
  margin-top: 26px;
}

.global-search-box input {
  background: rgba(255, 255, 255, 0.96);
}

.site-footer {
  margin-top: 64px;
  background: linear-gradient(135deg, #111827, #0f172a 60%, #064e3b);
  color: #cbd5e1;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 44px 20px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
}

.footer-brand strong {
  display: block;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.footer-links h2 {
  color: #ffffff;
  font-size: 18px;
}

.footer-links div {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #a7f3d0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 20px;
  color: #94a3b8;
  text-align: center;
  font-size: 14px;
}

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

@media (max-width: 1024px) {
  .hero-layout,
  .detail-grid,
  .split-section,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

  .rank-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .brand-text {
    font-size: 18px;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero-carousel,
  .hero-layout {
    min-height: 570px;
  }

  .hero-layout {
    padding-top: 70px;
    padding-bottom: 82px;
  }

  .hero-control {
    display: none;
  }

  .search-strip,
  .top-search,
  .global-search-box,
  .filter-panel,
  .rank-row a,
  .movie-card-wide .card-link,
  .info-list {
    grid-template-columns: 1fr;
  }

  .search-strip {
    margin-top: 0;
    border-radius: 0;
  }

  .section-head {
    display: block;
  }

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

  .rank-row img {
    width: 100%;
    height: 160px;
  }

  .rank-row-year {
    text-align: left;
  }

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