:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111c32;
  --card: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #10b981;
  --accent-2: #34d399;
  --accent-dark: #047857;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.55);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  object-fit: cover;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.brand-mark,
.footer-brand span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #052e26;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.28);
  font-size: 15px;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 20px;
  line-height: 1;
}

.brand-copy small {
  color: var(--accent-2);
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--accent-2);
}

.header-search,
.mobile-search,
.quick-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.quick-search input,
.category-tools input {
  width: 240px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0f1b2d;
  color: var(--text);
  padding: 0 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.quick-search input:focus,
.category-tools input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

.header-search button,
.mobile-search button,
.quick-search button,
.primary-button,
.rank-action,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--accent);
  color: white;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.quick-search button:hover,
.primary-button:hover,
.rank-action:hover,
.text-button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(16, 185, 129, 0.18);
}

.menu-button {
  display: none;
  color: var(--text);
  font-size: 28px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 16px 18px;
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-search input {
  flex: 1;
  width: auto;
}

.mobile-nav {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 38%, rgba(2, 6, 23, 0.16) 100%),
    linear-gradient(0deg, #020617 0%, transparent 42%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(660px, 92%);
  padding-top: 64px;
}

.hero-tags,
.detail-meta,
.rank-meta,
.card-meta,
.tag-row,
.filter-row,
.side-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags span,
.detail-meta span,
.rank-meta span,
.card-meta span,
.tag-row span {
  border: 1px solid rgba(16, 185, 129, 0.22);
  background: rgba(15, 23, 42, 0.74);
  color: #d1fae5;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
}

.hero-copy h1 {
  margin-top: 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.045em;
  text-shadow: 0 12px 38px rgba(0, 0, 0, 0.6);
}

.hero-copy p {
  margin-top: 18px;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.75;
  max-width: 610px;
}

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

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.26);
  background: rgba(15, 23, 42, 0.54);
  color: white;
  font-weight: 700;
  backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ghost-button:hover {
  border-color: var(--accent);
  background: rgba(16, 185, 129, 0.14);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 20;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.48);
  color: white;
  font-size: 34px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-1px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.quick-panel {
  position: relative;
  z-index: 3;
  margin-top: -42px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.quick-panel h2 {
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 850;
}

.quick-panel p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.75;
}

.quick-search input {
  width: min(360px, 45vw);
}

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

.section-heading {
  margin-bottom: 24px;
}

.section-kicker,
.page-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.section-heading h2,
.page-hero h1,
.player-section h2,
.story-card h2,
.side-panel h2,
.footer-grid h2 {
  font-weight: 850;
  color: white;
}

.section-heading h2 {
  font-size: clamp(26px, 4vw, 42px);
}

.section-heading p,
.page-hero p,
.side-panel p,
.footer-grid p,
.story-card p {
  color: var(--muted);
  line-height: 1.8;
}

.section-heading p {
  margin-top: 6px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.52);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.28);
}

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

.poster-link img {
  width: 100%;
  height: 100%;
  transition: transform 0.35s ease;
}

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

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

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.92);
  color: white;
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.poster-year {
  position: absolute;
  right: 10px;
  top: 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.78);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 8px;
}

.card-body {
  padding: 14px;
}

.card-body h2 {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  min-height: 43px;
}

.card-body h2 a:hover,
.rank-copy h2 a:hover,
.overview-card a:hover {
  color: var(--accent-2);
}

.card-body p {
  margin-top: 8px;
  min-height: 43px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: 10px;
}

.tag-row {
  margin-top: 10px;
}

.movie-card-small .card-body h2 {
  font-size: 15px;
}

.movie-card-small .tag-row span:nth-child(n + 3) {
  display: none;
}

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

.category-card,
.overview-card,
.side-panel,
.story-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.88), rgba(17, 24, 39, 0.76));
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
}

.category-card {
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -34px;
  top: -34px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.18);
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.56);
}

.category-card span {
  position: relative;
  font-size: 22px;
  font-weight: 850;
}

.category-card strong {
  position: relative;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 74px 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
  padding: 12px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  border-color: rgba(16, 185, 129, 0.52);
  transform: translateX(3px);
}

.rank-num {
  font-size: 24px;
  font-weight: 900;
  color: var(--accent-2);
  text-align: center;
}

.rank-cover {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
}

.rank-cover img {
  width: 100%;
  height: 100%;
}

.rank-copy h2 {
  font-size: 18px;
  font-weight: 850;
}

.rank-copy p {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-meta {
  margin-top: 8px;
}

.full-rank .rank-num {
  font-size: 20px;
}

.side-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.side-panel h2,
.footer-grid h2 {
  font-size: 18px;
}

.side-panel p {
  margin: 10px 0 18px;
}

.side-links a,
.footer-links a {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: #cbd5e1;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.side-links a:hover,
.footer-links a:hover {
  color: white;
  border-color: var(--accent);
  background: rgba(16, 185, 129, 0.12);
}

.more-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--accent-2);
  font-weight: 800;
}

.page-main {
  padding-top: 38px;
}

.page-hero,
.detail-hero {
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.16), transparent 36%),
    rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.small-hero,
.category-hero {
  margin-top: 22px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #94a3b8;
  font-size: 14px;
}

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

.breadcrumbs em {
  color: #e2e8f0;
  font-style: normal;
}

.page-hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
}

.page-hero p {
  margin-top: 12px;
  max-width: 820px;
}

.category-tools {
  margin-top: 22px;
  display: grid;
  gap: 14px;
}

.category-tools input {
  width: min(520px, 100%);
}

.filter-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
  padding: 8px 13px;
  background: rgba(15, 23, 42, 0.58);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.filter-button:hover,
.filter-button.is-active {
  color: white;
  border-color: var(--accent);
  background: rgba(16, 185, 129, 0.18);
}

.overview-card {
  padding: 22px;
}

.overview-card h2 {
  font-size: 24px;
  font-weight: 850;
}

.overview-card p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.72;
}

.overview-card ul {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  color: #cbd5e1;
}

.overview-card li a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.detail-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #0f172a;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
}

.detail-poster img {
  width: 100%;
  height: 100%;
}

.detail-copy h1 {
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-line {
  max-width: 820px;
  margin-top: 16px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta,
.detail-tags {
  margin-top: 16px;
}

.detail-copy .primary-button {
  margin-top: 24px;
}

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

.player-section h2 {
  margin-bottom: 16px;
  font-size: 28px;
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(16, 185, 129, 0.26);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.72));
}

.play-layer span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.34);
  font-size: 24px;
}

.play-layer strong {
  font-size: 20px;
}

.player-box.is-playing .play-layer {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-top: 34px;
}

.story-card {
  padding: 24px;
}

.story-card h2 {
  margin-bottom: 12px;
  font-size: 24px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 42px 0;
}

.footer-brand {
  margin-bottom: 16px;
}

.footer-brand span {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.footer-grid p {
  max-width: 470px;
}

.footer-links {
  margin-top: 14px;
}

.copyright {
  border-top: 1px solid var(--line);
  color: #64748b;
  text-align: center;
  padding: 18px;
}

[data-card].is-hidden {
  display: none;
}

@media (max-width: 1180px) {
  .desktop-nav {
    gap: 13px;
  }

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

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

  .menu-button {
    display: block;
  }

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

  .quick-panel,
  .split-section,
  .detail-layout,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .quick-search input {
    width: 100%;
  }

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

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

  .side-panel {
    position: static;
  }

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

@media (max-width: 640px) {
  .site-container {
    width: min(100% - 22px, 1200px);
  }

  .header-inner {
    height: 66px;
  }

  .brand-copy strong {
    font-size: 18px;
  }

  .hero-slider {
    height: 76vh;
    min-height: 560px;
  }

  .hero-overlay {
    background:
      linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.86) 56%, rgba(2, 6, 23, 0.34) 100%),
      linear-gradient(90deg, rgba(2, 6, 23, 0.84), transparent);
  }

  .hero-copy {
    padding-top: 80px;
  }

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

  .hero-copy p {
    font-size: 16px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-panel,
  .page-hero,
  .detail-hero {
    padding: 20px;
    border-radius: 22px;
  }

  .quick-search,
  .mobile-search,
  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .rank-item {
    grid-template-columns: 42px 58px 1fr;
  }

  .rank-action {
    grid-column: 2 / -1;
    width: fit-content;
  }

  .rank-copy p,
  .rank-meta span:nth-child(n + 3) {
    display: none;
  }

  .card-body {
    padding: 12px;
  }

  .card-body h2 {
    min-height: auto;
    font-size: 15px;
  }

  .card-body p {
    display: none;
  }
}
