:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-solid: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --text: #f8fafc;
  --accent: #10b981;
  --accent-2: #34d399;
  --accent-3: #06b6d4;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -10%, rgba(16, 185, 129, 0.22), transparent 32rem),
    radial-gradient(circle at 78% 6%, rgba(6, 182, 212, 0.14), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #0f172a 54%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #022c22;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  box-shadow: 0 12px 26px rgba(16, 185, 129, 0.28);
}

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

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  border-radius: 12px;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--accent-2);
  background: rgba(15, 23, 42, 0.86);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-link {
  display: block;
  padding: 13px 14px;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-stage,
.hero-slide {
  min-height: 600px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-bg,
.detail-backdrop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 44%, rgba(2, 6, 23, 0.36) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.12) 0%, rgba(2, 6, 23, 0.95) 100%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 56px;
  align-items: center;
  padding: 56px 0;
}

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

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.hero-copy h1 {
  font-size: clamp(32px, 6vw, 64px);
}

.hero-copy h2 {
  margin-top: 12px;
  font-size: clamp(28px, 4vw, 48px);
}

.hero-copy p,
.page-hero p,
.detail-info .lead {
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.tag-row a,
.detail-meta span {
  padding: 7px 11px;
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(6, 78, 59, 0.24);
  font-size: 13px;
}

.hero-actions,
.quick-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.btn:hover,
.category-tile:hover,
.movie-card:hover,
.rank-row:hover {
  transform: translateY(-3px);
}

.btn.primary {
  color: #022c22;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  box-shadow: 0 18px 34px rgba(16, 185, 129, 0.25);
}

.btn.ghost {
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.66);
}

.btn.text {
  color: var(--accent-2);
}

.hero-poster {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(16, 185, 129, 0.22), rgba(15, 23, 42, 0.96)),
    #0f172a;
  box-shadow: var(--shadow);
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 9px 12px;
  border-radius: 12px;
  color: #022c22;
  background: var(--accent-2);
  font-weight: 900;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.44);
  cursor: pointer;
}

.hero-dot.active {
  width: 30px;
  background: var(--accent-2);
}

.search-band,
.content-section,
.page-main,
.detail-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.search-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 0 8px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 620px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.24);
}

.search-box span {
  color: var(--accent-2);
  font-weight: 900;
  white-space: nowrap;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
}

.quick-links {
  margin-top: 0;
}

.quick-links a,
.section-more,
.footer-links a {
  color: #cbd5e1;
  transition: color 0.25s ease;
}

.quick-links a:hover,
.section-more:hover,
.footer-links a:hover {
  color: var(--accent-2);
}

.content-section {
  padding: 58px 0 0;
}

.content-section.no-top {
  padding-top: 28px;
}

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

.section-title h2,
.detail-content h2,
.category-panel h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

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

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(52, 211, 153, 0.48);
  box-shadow: 0 24px 60px rgba(16, 185, 129, 0.1);
}

.poster-frame {
  position: relative;
  display: block;
  height: 260px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(52, 211, 153, 0.32), transparent 30%),
    linear-gradient(135deg, #0f172a, #064e3b);
}

.card-large .poster-frame {
  height: 340px;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.82) 100%);
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #022c22;
  background: rgba(52, 211, 153, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-year {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.card-body strong {
  color: var(--text);
  font-size: 17px;
  line-height: 1.35;
}

.card-line {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  margin-top: auto;
  color: var(--muted);
  font-size: 13px;
}

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

.category-tile,
.category-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(15, 23, 42, 0.88)),
    var(--panel-solid);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.2);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
}

.category-tile:hover,
.category-panel:hover {
  border-color: rgba(52, 211, 153, 0.38);
}

.category-tile span {
  color: var(--accent-2);
  font-weight: 900;
}

.category-tile strong {
  font-size: 20px;
}

.category-tile em,
.category-panel p,
.site-footer p {
  color: #cbd5e1;
  font-style: normal;
  line-height: 1.7;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 44px 78px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 110px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.74);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.rank-row:hover {
  border-color: rgba(52, 211, 153, 0.38);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: #022c22;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  font-weight: 900;
}

.rank-cover {
  width: 78px;
  height: 92px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #064e3b);
}

.rank-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.rank-info strong {
  color: var(--text);
}

.rank-info em,
.rank-info span {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.page-main,
.detail-main {
  padding: 28px 0 72px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  padding: 52px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 0 0, rgba(52, 211, 153, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.78));
  box-shadow: var(--shadow);
}

.page-hero.compact h1 {
  font-size: clamp(34px, 6vw, 58px);
}

.page-search {
  margin-top: 26px;
}

.category-panels {
  display: grid;
  gap: 26px;
  margin-top: 32px;
}

.category-panel {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
  padding: 22px;
}

.category-panel-head span {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 16px;
  color: #022c22;
  background: var(--accent-2);
  font-weight: 900;
}

.category-panel-head .btn {
  margin-top: 14px;
}

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

.mini-grid .poster-frame {
  height: 180px;
}

.mini-grid .card-line,
.mini-grid .card-meta {
  display: none;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 10px 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--accent-2);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  filter: blur(2px);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.76));
}

.detail-layout {
  position: relative;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  padding: 34px;
}

.detail-poster {
  min-height: 410px;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 24px;
  background: linear-gradient(135deg, #0f172a, #064e3b);
  box-shadow: 0 22px 50px rgba(2, 6, 23, 0.35);
}

.detail-info h1 {
  font-size: clamp(34px, 6vw, 58px);
}

.player-section {
  padding-top: 42px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #022c22;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.04), rgba(2, 6, 23, 0.28));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-start span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.32);
  font-size: 30px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding-top: 42px;
}

.detail-content article {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-content p {
  color: #cbd5e1;
  line-height: 1.9;
}

.related-section {
  width: 100%;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.58);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  max-width: 560px;
  margin: 12px 0 0;
}

.hidden-by-search {
  display: none !important;
}

@media (max-width: 1024px) {
  .hero-content,
  .detail-layout,
  .category-panel {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

  .rank-list,
  .detail-content {
    grid-template-columns: 1fr;
  }
}

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

  .menu-toggle {
    display: block;
  }

  body.menu-open .mobile-nav {
    display: block;
  }

  .hero,
  .hero-stage,
  .hero-slide,
  .hero-content {
    min-height: 640px;
  }

  .hero-content {
    padding: 48px 0 82px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-info .lead {
    font-size: 16px;
  }

  .search-band,
  .section-title,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

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

  .poster-frame {
    height: 210px;
  }

  .page-hero,
  .detail-layout {
    padding: 24px;
  }

  .detail-poster {
    min-height: 340px;
  }

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

  .rank-cover {
    width: 64px;
    height: 80px;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .category-grid,
  .mini-grid,
  .featured-six {
    grid-template-columns: 1fr;
  }

  .poster-frame,
  .mini-grid .poster-frame {
    height: 260px;
  }

  .hero-copy h2 {
    font-size: 28px;
  }
}
