:root {
  --bg: #f7fbfa;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #07111f;
  --dark-2: #0f172a;
  --emerald: #10b981;
  --emerald-2: #059669;
  --cyan: #22d3ee;
  --amber: #f59e0b;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 17, 31, 0.92);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.nav-shell {
  max-width: 1240px;
  height: 72px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #04110d;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 0 28px rgba(16, 185, 129, 0.35);
  font-size: 14px;
}

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

.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(16, 185, 129, 0.16);
  transform: translateY(-1px);
}

.nav-link.subtle {
  color: rgba(255, 255, 255, 0.64);
}

.header-search {
  position: relative;
  width: min(260px, 22vw);
}

.header-search input,
.filter-tools input,
.filter-tools select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.header-search input:focus,
.filter-tools input:focus,
.filter-tools select:focus {
  border-color: rgba(16, 185, 129, 0.78);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.search-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 360px;
  max-height: 430px;
  overflow: auto;
  display: none;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  padding: 10px;
}

.search-popover.open {
  display: grid;
  gap: 6px;
}

.search-popover a {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  align-items: center;
  border-radius: 14px;
  padding: 8px;
  color: #ffffff;
}

.search-popover a:hover {
  background: rgba(16, 185, 129, 0.14);
}

.search-popover img {
  width: 46px;
  height: 62px;
  border-radius: 10px;
  object-fit: cover;
}

.search-popover b,
.compact-item b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-popover em,
.compact-item em {
  display: block;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.7);
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 8px 11px;
}

.mobile-nav {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

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

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}

.hero-slider {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: var(--dark);
}

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

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

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

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 28%, rgba(34, 211, 238, 0.18), transparent 32%),
    linear-gradient(90deg, rgba(3, 7, 18, 0.86) 0%, rgba(3, 7, 18, 0.62) 48%, rgba(3, 7, 18, 0.18) 100%),
    linear-gradient(0deg, rgba(3, 7, 18, 0.78) 0%, rgba(3, 7, 18, 0.05) 42%);
}

.hero-content {
  position: absolute;
  inset: 0;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 690px;
  color: #ffffff;
  padding-top: 44px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--emerald);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.hero-copy h1 span,
.hero-copy h2 span {
  color: var(--emerald);
}

.hero-copy p {
  margin: 22px 0 0;
  max-width: 650px;
  color: rgba(226, 232, 240, 0.92);
  font-size: clamp(16px, 2vw, 21px);
}

.hero-meta,
.detail-meta,
.card-meta,
.category-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin-top: 26px;
}

.hero-meta span,
.detail-meta span,
.card-meta span,
.card-meta b,
.category-stats span,
.rank-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 700;
}

.card-meta span,
.card-meta b,
.category-stats span {
  background: #ecfdf5;
  color: #047857;
}

.rank-badge,
.card-meta .rank-badge {
  background: linear-gradient(135deg, var(--amber), #f97316);
  color: #ffffff;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.primary-btn,
.ghost-btn,
.small-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #04110d;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.32);
}

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

.small-link {
  min-height: 38px;
  padding: 0 16px;
  color: var(--emerald-2);
  background: #ecfdf5;
}

.primary-btn:hover,
.ghost-btn:hover,
.small-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--soft-shadow);
}

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

.hero-dots button {
  width: 42px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  padding: 0;
}

.hero-dots button.active {
  background: var(--emerald);
}

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 22px 0;
}

.section-panel,
.detail-panel,
.player-panel,
.story-panel {
  margin-bottom: 46px;
}

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

.section-head.wide {
  align-items: start;
}

.section-head h1,
.section-head h2,
.detail-copy h1,
.story-panel h2,
.player-panel h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head p,
.detail-copy p,
.story-panel p,
.category-card p {
  color: var(--muted);
}

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

.movie-card {
  min-width: 0;
  border-radius: 24px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(226, 232, 240, 0.92);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(16, 185, 129, 0.32);
}

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

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.7), transparent 48%);
}

.play-pill {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  padding: 6px 12px;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.9);
  font-size: 13px;
  font-weight: 800;
}

.card-content {
  padding: 16px;
}

.card-meta {
  gap: 7px;
  margin-bottom: 10px;
}

.card-meta span,
.card-meta b {
  font-size: 12px;
  padding: 4px 8px;
}

.card-content h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.28;
}

.card-content h2 a:hover {
  color: var(--emerald-2);
}

.card-content p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-row span,
.detail-tags span {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 750;
}

.split-layout {
  display: grid;
  grid-template-columns: 1.6fr 0.85fr;
  gap: 26px;
}

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

.compact-item {
  display: grid;
  grid-template-columns: 42px 66px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.compact-item:hover {
  border-color: rgba(16, 185, 129, 0.35);
  transform: translateY(-2px);
}

.compact-item img {
  width: 66px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
}

.compact-item em {
  color: var(--muted);
}

.mini-rank {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--dark-2), var(--emerald-2));
  font-weight: 900;
  font-size: 12px;
}

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

.category-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 24px;
  padding: 22px;
  color: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.24), transparent 35%),
    linear-gradient(135deg, #0f172a, #064e3b);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.category-card h2 {
  margin: 0;
  font-size: 22px;
}

.category-card p,
.category-card .category-stats span {
  color: rgba(255, 255, 255, 0.78);
}

.category-card .category-stats span {
  background: rgba(255, 255, 255, 0.12);
}

.filter-tools {
  min-width: min(520px, 100%);
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 10px;
}

.filter-tools input,
.filter-tools select {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line);
}

.empty-tip {
  display: none;
  border-radius: 18px;
  padding: 24px;
  color: var(--muted);
  background: #ffffff;
  border: 1px dashed var(--line);
}

.empty-tip.open {
  display: block;
}

.breadcrumb {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-panel {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 32px;
  align-items: center;
  padding: 28px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 211, 238, 0.14), transparent 34%),
    linear-gradient(135deg, #0f172a, #111827 58%, #064e3b);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.detail-cover {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 55px rgba(0, 0, 0, 0.35);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.detail-copy p {
  margin: 18px 0 0;
  color: rgba(226, 232, 240, 0.86);
  font-size: 18px;
}

.detail-meta {
  margin-top: 22px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.detail-tags span {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
}

.player-panel,
.story-panel {
  border-radius: 28px;
  padding: 26px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--soft-shadow);
}

.player-panel h2,
.story-panel h2 {
  margin-bottom: 16px;
}

.video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
}

.video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background:
    radial-gradient(circle at center, rgba(16, 185, 129, 0.24), transparent 26%),
    rgba(0, 0, 0, 0.28);
  color: #ffffff;
  cursor: pointer;
  z-index: 2;
}

.video-wrap.is-playing .player-cover {
  display: none;
}

.play-icon-large {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  color: #04110d;
  font-size: 34px;
  box-shadow: 0 22px 50px rgba(16, 185, 129, 0.38);
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.story-card {
  border-radius: 20px;
  padding: 22px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.story-card p {
  margin: 0;
}

.site-footer {
  margin-top: 70px;
  color: rgba(226, 232, 240, 0.78);
  background: #07111f;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 44px 22px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 30px;
}

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

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

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

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

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

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 22px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
}

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

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

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

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

  .split-layout,
  .story-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    height: 64px;
    padding: 0 16px;
  }

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

  .hero-slider {
    min-height: 640px;
  }

  .hero-content {
    padding: 0 16px;
  }

  main {
    padding: 28px 16px 0;
  }

  .section-head,
  .section-head.wide {
    display: block;
  }

  .filter-tools {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

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

  .category-grid,
  .footer-inner,
  .detail-panel {
    grid-template-columns: 1fr;
  }

  .detail-panel,
  .player-panel,
  .story-panel {
    padding: 18px;
    border-radius: 24px;
  }

  .compact-item {
    grid-template-columns: 34px 58px 1fr;
  }

  .compact-item img {
    width: 58px;
    height: 78px;
  }
}

@media (max-width: 480px) {
  .grid-movies {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .detail-actions {
    display: grid;
  }

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