* {
  box-sizing: border-box;
}

:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --line: #e5e7eb;
  --brand: #10b981;
  --brand-dark: #059669;
  --brand-deep: #0f766e;
  --slate: #111827;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.28);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, var(--brand-dark), var(--brand-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #334155;
  font-size: 15px;
  font-weight: 650;
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #0f172a;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--soft);
  background: #ffffff;
}

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  font-weight: 650;
}

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

.hero {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.12)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.18));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding-bottom: 74px;
}

.hero-copy {
  width: min(760px, 100%);
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a7f3d0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-hero h1 {
  margin: 12px 0 14px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(16px, 2vw, 19px);
  margin: 0 0 22px;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-tags span,
.block-tags span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.18);
  color: #d1fae5;
  border: 1px solid rgba(16, 185, 129, 0.28);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.primary-btn,
.ghost-btn,
.search-panel button,
.hero-search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn,
.hero-search-form button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.28);
}

.primary-btn:hover,
.hero-search-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(16, 185, 129, 0.36);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 34px;
  display: flex;
  gap: 9px;
  z-index: 5;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--brand);
}

.quick-search {
  position: relative;
  z-index: 8;
  margin-top: -34px;
}

.hero-search-form,
.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-search-form input,
.search-panel input,
.search-panel select {
  width: 100%;
  height: 48px;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  background: #f8fafc;
  color: var(--ink);
  padding: 0 16px;
  outline: none;
}

.search-panel {
  grid-template-columns: 1fr 180px;
}

.page-flow {
  padding: 46px 0 64px;
}

.content-section {
  margin-bottom: 58px;
}

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

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 10px 22px rgba(16, 185, 129, 0.22);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.2;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.section-more {
  color: var(--brand-dark);
  font-weight: 800;
}

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

.all-grid {
  margin-top: 24px;
}

.movie-card,
.horizontal-card,
.category-tile,
.category-overview-card,
.detail-card,
.side-card,
.player-card,
.top-rank-card {
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.88);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.movie-card {
  overflow: hidden;
  border-radius: 16px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

.poster-frame img,
.horizontal-cover img,
.poster-card img,
.top-rank-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-frame img,
.horizontal-card:hover .horizontal-cover img,
.top-rank-card:hover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.42), transparent 56%);
  opacity: 0.8;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  backdrop-filter: blur(10px);
}

.poster-play.small {
  width: 34px;
  height: 34px;
}

.movie-card:hover .poster-play,
.horizontal-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.year-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: rgba(2, 6, 23, 0.78);
}

.movie-card-body {
  display: block;
  padding: 12px;
}

.movie-card-body strong {
  display: -webkit-box;
  min-height: 42px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-card-body strong,
.horizontal-card:hover strong {
  color: var(--brand-dark);
}

.movie-card-body span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.category-tile {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.16), transparent 42%),
    #ffffff;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.category-tile span {
  color: var(--brand-dark);
  font-weight: 850;
  font-size: 20px;
}

.category-tile strong {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

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

.horizontal-card {
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.horizontal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.horizontal-card a {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 14px;
  align-items: stretch;
}

.horizontal-cover {
  position: relative;
  min-height: 88px;
  background: #0f172a;
  overflow: hidden;
}

.horizontal-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  padding: 12px 14px 12px 0;
}

.horizontal-content strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.horizontal-content span,
.horizontal-content em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.horizontal-content em {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.list-rank {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  border-radius: 9px;
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
}

.subpage {
  min-height: 70vh;
}

.page-hero,
.detail-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.34), transparent 36%),
    linear-gradient(135deg, #0f172a, #111827 58%, #064e3b);
  padding: 62px 0 54px;
}

.page-hero.slim {
  padding: 48px 0;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #a7f3d0;
}

.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.category-overview-card {
  border-radius: 22px;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-overview-card a {
  display: block;
  padding: 28px;
}

.category-overview-card h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

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

.sample-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.sample-list span {
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-overview-card strong {
  color: var(--brand-dark);
}

.empty-state {
  padding: 36px;
  border-radius: 18px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
  border: 1px solid var(--line);
}

.detail-hero {
  padding: 42px 0 38px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 32px 0 24px;
}

.detail-main {
  min-width: 0;
}

.player-card,
.detail-card,
.side-card {
  border-radius: 20px;
  overflow: hidden;
}

.video-shell {
  position: relative;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #ffffff;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.12));
  cursor: pointer;
}

.player-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.play-circle {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 18px 42px rgba(16, 185, 129, 0.34);
  font-size: 28px;
}

.player-status {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 4;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 13px;
  pointer-events: none;
}

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

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

.detail-card h2 {
  margin: 0 0 14px;
  font-size: 23px;
}

.detail-card h2:not(:first-child) {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.detail-card p {
  margin: 0;
  color: #334155;
  font-size: 16px;
}

.detail-tags {
  margin-bottom: 18px;
}

.muted-tags span {
  padding: 6px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.block-tags span {
  color: #047857;
  background: #d1fae5;
  border-color: #a7f3d0;
}

.detail-side {
  min-width: 0;
}

.side-card {
  padding: 18px;
  margin-bottom: 22px;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  background: #0f172a;
}

.poster-card h2 {
  margin: 14px 0 4px;
  font-size: 20px;
}

.poster-card p {
  margin: 0;
  color: var(--muted);
}

.side-card .section-heading {
  align-items: flex-start;
  margin-bottom: 16px;
}

.side-card .section-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.side-card .section-heading h2 {
  font-size: 20px;
}

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

.side-list .horizontal-card a {
  grid-template-columns: 104px 1fr;
}

.side-list .horizontal-content em {
  display: none;
}

.detail-more {
  padding-top: 12px;
}

.top-rank-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 18px;
}

.top-rank-card {
  position: relative;
  min-height: 260px;
  border-radius: 22px;
  overflow: hidden;
  color: #ffffff;
}

.top-rank-card img,
.top-rank-shade {
  position: absolute;
  inset: 0;
}

.top-rank-shade {
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.12));
}

.top-rank-card strong {
  position: absolute;
  left: 20px;
  top: 18px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  font-size: 22px;
}

.top-rank-card div {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
}

.top-rank-card h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.top-rank-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

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

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
  margin-top: 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding: 48px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
}

.footer-about p {
  max-width: 520px;
  color: #94a3b8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin: 8px 0;
}

.site-footer a:hover {
  color: #6ee7b7;
}

.footer-bottom {
  border-top: 1px solid #1f2937;
  padding: 20px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

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

  .menu-toggle {
    display: block;
  }

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

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 22px;
  }
}

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

  .hero {
    height: 520px;
  }

  .hero-content {
    padding-bottom: 72px;
  }

  .hero-actions,
  .hero-tags {
    gap: 8px;
  }

  .primary-btn,
  .ghost-btn {
    min-height: 40px;
    padding: 0 16px;
    font-size: 14px;
  }

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

  .search-panel {
    padding: 12px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

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

  .horizontal-card a {
    grid-template-columns: 112px 1fr;
  }

  .horizontal-content em {
    display: none;
  }

  .page-hero,
  .detail-hero {
    padding: 42px 0;
  }

  .detail-side {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 420px) {
  .brand-text {
    font-size: 17px;
  }

  .mobile-nav {
    grid-template-columns: 1fr;
  }

  .hero {
    height: 500px;
  }

  .movie-grid {
    gap: 12px;
  }

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

  .movie-card-body strong {
    font-size: 14px;
  }
}
