* {
  box-sizing: border-box;
}

:root {
  --bg: #0f172a;
  --bg-deep: #020617;
  --bg-soft: #1e293b;
  --bg-card: #111827;
  --border: #1e293b;
  --border-soft: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --emerald: #10b981;
  --emerald-dark: #059669;
  --teal: #0d9488;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.38);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.14), transparent 32rem),
    linear-gradient(135deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(100% - 32px, 1280px);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(30, 41, 59, 0.95);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(14px);
}

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

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

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.28);
}

.logo-text {
  white-space: nowrap;
  font-size: 20px;
}

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

.desktop-nav a,
.mobile-nav a,
.site-footer a {
  color: var(--muted-strong);
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.site-footer a:hover {
  color: #34d399;
}

.category-nav {
  gap: 14px;
  font-size: 14px;
}

.category-nav a {
  padding: 6px 10px;
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.07);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  color: var(--text);
  background: rgba(30, 41, 59, 0.72);
}

.mobile-nav {
  display: none;
  padding: 0 24px 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

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

.hero-slider,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #111827, #0f172a);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.35), rgba(2, 6, 23, 0.72)),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.1) 46%, rgba(15, 23, 42, 0.32) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  height: 100%;
  padding-bottom: 76px;
}

.hero-copy {
  width: min(100%, 720px);
}

.hero-kicker,
.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: #a7f3d0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-kicker {
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(16, 185, 129, 0.92);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 8vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  text-shadow: 0 16px 44px rgba(0, 0, 0, 0.36);
}

.hero p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: 19px;
  line-height: 1.75;
}

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

.hero-tags span,
.tag-list span,
.detail-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(15, 23, 42, 0.62);
}

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

.primary-button,
.ghost-button,
.quick-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  background: var(--emerald);
  box-shadow: 0 16px 34px rgba(16, 185, 129, 0.28);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button:hover,
.quick-search button:hover {
  transform: translateY(-2px) scale(1.02);
  background: var(--emerald-dark);
  box-shadow: 0 20px 40px rgba(16, 185, 129, 0.35);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.55);
  box-shadow: none;
}

.ghost-button:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.75);
}

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

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.hero-dot.is-active {
  background: var(--emerald);
}

.content-section {
  padding-block: 64px;
}

.section-head,
.category-overview-head,
.search-panel {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-head h2,
.search-panel h2,
.page-hero h1,
.category-overview-head h2,
.article-panel h2,
.side-panel h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-more {
  color: #34d399;
  font-weight: 800;
  white-space: nowrap;
}

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

.small-grid,
.rank-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.movie-card {
  min-width: 0;
}

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.18);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card-link:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(16, 185, 129, 0.44);
  box-shadow: 0 26px 60px rgba(2, 6, 23, 0.34);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #0f172a);
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease, opacity 0.2s ease;
}

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

.poster-wrap::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(15, 23, 42, 0.92), transparent 58%);
}

.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.92);
}

.rank-badge {
  right: 10px;
  left: auto;
  background: rgba(245, 158, 11, 0.96);
}

.poster-shine {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 35%, rgba(255, 255, 255, 0.18), transparent 64%);
  transform: translateX(-110%);
  transition: transform 0.7s ease;
}

.movie-card-link:hover .poster-shine {
  transform: translateX(110%);
}

.movie-card-body {
  padding: 13px 13px 15px;
}

.movie-card h3 {
  display: -webkit-box;
  min-height: 42px;
  margin: 0 0 8px;
  overflow: hidden;
  color: #fff;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 800;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card-link:hover h3 {
  color: #34d399;
}

.movie-meta,
.movie-line {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-line {
  display: -webkit-box;
  min-height: 38px;
  margin-top: 8px;
  overflow: hidden;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.compact .movie-line {
  display: none;
}

.category-band {
  border-block: 1px solid rgba(16, 185, 129, 0.12);
  background: linear-gradient(90deg, rgba(6, 78, 59, 0.18), rgba(15, 23, 42, 0.84), rgba(13, 148, 136, 0.12));
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #111827, #0f172a);
  transition: transform 0.5s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.22));
}

.category-tile strong,
.category-tile small,
.category-tile p {
  position: relative;
  z-index: 2;
  display: block;
}

.category-tile strong {
  margin-top: 72px;
  font-size: 25px;
}

.category-tile small {
  margin-top: 8px;
  color: #a7f3d0;
  font-weight: 800;
}

.category-tile p {
  margin: 12px 0 0;
  color: #cbd5e1;
  line-height: 1.65;
}

.search-strip {
  padding-bottom: 0;
}

.search-panel,
.filter-panel,
.article-panel,
.side-panel,
.poster-card,
.detail-info-panel,
.player-card,
.category-overview-block {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.search-panel {
  align-items: center;
  padding: 28px;
}

.quick-search {
  display: flex;
  gap: 12px;
  width: min(100%, 520px);
}

.quick-search input,
.filter-panel input,
.filter-panel select {
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #fff;
  background: rgba(30, 41, 59, 0.74);
  outline: none;
}

.quick-search input {
  flex: 1;
  padding: 0 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
  padding: 18px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 0 16px;
}

.filter-result {
  min-height: 26px;
  margin: 0 0 24px;
  color: #a7f3d0;
  font-weight: 800;
}

.page-shell {
  min-height: 70vh;
  padding-bottom: 70px;
}

.page-hero {
  padding: 70px 0 34px;
}

.compact-hero {
  max-width: 980px;
}

.page-hero h1 {
  margin-bottom: 16px;
  font-size: clamp(38px, 6vw, 64px);
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.75;
}

.category-overview {
  display: grid;
  gap: 28px;
}

.category-overview-block {
  padding: 24px;
}

.category-overview-head p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.rank-page-grid .movie-card:nth-child(-n + 3) .rank-badge {
  background: #f59e0b;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 28px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #34d399;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.82fr);
  gap: 30px;
  padding-top: 28px;
}

.detail-main,
.detail-side {
  display: grid;
  gap: 24px;
  align-content: start;
}

.player-card {
  position: relative;
  overflow: hidden;
  background: #000;
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.18), rgba(2, 6, 23, 0.56));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 20px 44px rgba(16, 185, 129, 0.35);
}

.player-card.is-playing .play-overlay {
  visibility: hidden;
  opacity: 0;
}

.player-message {
  position: absolute;
  left: 18px;
  bottom: 14px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  color: #d1fae5;
  font-size: 13px;
  background: rgba(2, 6, 23, 0.7);
}

.detail-info-panel,
.article-panel,
.side-panel {
  padding: 26px;
}

.detail-info-panel h1 {
  margin: 18px 0 14px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-one-line {
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.7;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.detail-meta-grid div {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.54);
}

.detail-meta-grid strong,
.detail-meta-grid span,
.detail-meta-grid a {
  display: block;
}

.detail-meta-grid strong {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 13px;
}

.detail-meta-grid a {
  color: #34d399;
}

.genre-list {
  margin-top: 10px;
}

.article-panel {
  color: var(--muted-strong);
  line-height: 1.88;
}

.article-panel h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 28px;
}

.article-panel h2:not(:first-child) {
  margin-top: 30px;
}

.article-panel p {
  margin: 0;
}

.article-panel details {
  margin-top: 16px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.56);
}

.article-panel summary {
  cursor: pointer;
  color: #fff;
  font-weight: 800;
}

.poster-card {
  overflow: hidden;
  padding: 16px;
}

.poster-card img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: linear-gradient(135deg, #111827, #0f172a);
}

.full-button {
  width: 100%;
  margin-top: 16px;
}

.side-panel {
  position: sticky;
  top: 88px;
}

.side-panel h2 {
  margin-bottom: 18px;
  font-size: 26px;
}

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

.side-related .movie-card-link {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: stretch;
}

.side-related .poster-wrap {
  aspect-ratio: 2 / 3;
}

.side-related .movie-card-body {
  padding: 12px;
}

.side-related .movie-card h3 {
  min-height: auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0 28px;
}

.feature-grid div {
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.54);
}

.feature-grid strong {
  color: #34d399;
  font-size: 18px;
}

.site-footer {
  border-top: 1px solid rgba(30, 41, 59, 0.95);
  background: #020617;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 32px;
  padding-block: 48px;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

.site-footer p,
.site-footer li {
  color: var(--muted);
  line-height: 1.75;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-logo {
  margin-bottom: 16px;
  font-size: 20px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(100% - 32px, 1280px);
  margin-inline: auto;
  padding: 20px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: #64748b;
  font-size: 14px;
}

.is-hidden-by-filter {
  display: none;
}

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

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

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

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

  .mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .hero {
    height: 560px;
  }

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

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

  .section-head,
  .category-overview-head,
  .search-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-search {
    width: 100%;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .side-panel {
    position: static;
  }

  .footer-grid,
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .logo-text {
    font-size: 17px;
  }

  .hero {
    height: 520px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-actions,
  .quick-search {
    flex-direction: column;
  }

  .primary-button,
  .ghost-button,
  .quick-search button {
    width: 100%;
  }

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

  .category-grid,
  .footer-grid,
  .feature-grid,
  .detail-meta-grid {
    grid-template-columns: 1fr;
  }

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

  .movie-line {
    display: none;
  }

  .content-section {
    padding-block: 46px;
  }

  .detail-info-panel,
  .article-panel,
  .side-panel {
    padding: 20px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
