* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #020617;
  color: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 10%, rgba(6, 182, 212, 0.20), transparent 30%),
    radial-gradient(circle at 84% 14%, rgba(37, 99, 235, 0.18), transparent 28%),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: -1;
}

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

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

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

.nav-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 14px 30px rgba(6, 182, 212, 0.20);
}

.brand-text, .footer-brand span:last-child {
  font-size: 20px;
  background: linear-gradient(90deg, #67e8f9, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: #cbd5e1;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: #22d3ee;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.70);
  padding: 10px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #e2e8f0;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 22px 18px;
  border-top: 1px solid rgba(30, 41, 59, 0.8);
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.mobile-nav-link {
  padding: 10px 0;
  color: #cbd5e1;
  font-weight: 700;
}

main {
  min-height: 70vh;
}

.hero {
  position: relative;
  min-height: 74vh;
  overflow: hidden;
  border-bottom: 1px solid rgba(30, 41, 59, 0.9);
}

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

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

.hero-backdrop {
  position: absolute;
  inset: 0;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.1);
}

.hero-backdrop::after {
  content: "";
  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.26) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.35) 42%, rgba(2, 6, 23, 0.10) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 74vh;
  margin: 0 auto;
  padding: 112px 22px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: 42px;
}

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

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

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.hero p {
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: 18px;
  max-width: 680px;
}

.hero-meta, .detail-meta, .card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-meta span, .detail-meta span, .card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(6, 182, 212, 0.26);
  border-radius: 999px;
  padding: 4px 12px;
  color: #bae6fd;
  background: rgba(6, 182, 212, 0.10);
  font-size: 13px;
  font-weight: 750;
}

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

.primary-button, .ghost-button, .section-link, .search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 14px;
  padding: 0 18px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button, .search-button {
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 14px 36px rgba(6, 182, 212, 0.22);
}

.ghost-button, .section-link {
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.65);
}

.primary-button:hover, .ghost-button:hover, .section-link:hover, .search-button:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(6, 182, 212, 0.24);
  background: rgba(15, 23, 42, 0.70);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.44);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.poster-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(12px);
}

.poster-caption strong {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

.poster-caption span {
  color: #94a3b8;
  font-size: 13px;
}

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

.hero-dot {
  width: 42px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.38);
  cursor: pointer;
}

.hero-dot.active {
  background: #22d3ee;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 22px;
}

.container.tight {
  padding-top: 38px;
}

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

.section-head h2, .page-title h1, .detail-title h1 {
  margin: 6px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.page-title {
  max-width: 900px;
  margin-bottom: 28px;
}

.page-title p, .detail-title p {
  color: #cbd5e1;
  font-size: 17px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin: 28px 0 30px;
  border: 1px solid rgba(6, 182, 212, 0.18);
  border-radius: 22px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.70);
}

.search-panel input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 15px;
  outline: none;
  padding: 0 16px;
  color: #f8fafc;
  background: rgba(2, 6, 23, 0.72);
}

.search-panel input:focus {
  border-color: rgba(34, 211, 238, 0.7);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 30px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 0 15px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.58);
  font-weight: 750;
}

.chip:hover, .chip.active {
  color: #ffffff;
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(6, 182, 212, 0.16);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: 0 24px 48px rgba(6, 182, 212, 0.12);
}

.card-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #0f172a;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.movie-card:hover .card-thumb img {
  transform: scale(1.09);
  opacity: 0.82;
}

.card-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86) 0%, rgba(2, 6, 23, 0.10) 58%);
}

.year-pill, .type-pill, .rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 850;
}

.year-pill {
  left: 12px;
  color: #fff7ed;
  background: rgba(245, 158, 11, 0.88);
}

.type-pill {
  right: 12px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.80);
}

.rank-badge {
  left: 12px;
  bottom: 12px;
  top: auto;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
}

.play-hover {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(6, 182, 212, 0.86);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.card-body {
  padding: 16px;
}

.card-body.compact {
  padding: 13px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body p {
  min-height: 45px;
  margin: 0 0 12px;
  color: #94a3b8;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  border-radius: 999px;
  padding: 3px 8px;
  color: #67e8f9;
  background: rgba(6, 182, 212, 0.10);
  font-size: 12px;
  font-weight: 750;
}

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

.category-card {
  position: relative;
  min-height: 184px;
  overflow: hidden;
  border: 1px solid rgba(6, 182, 212, 0.18);
  border-radius: 24px;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(6, 182, 212, 0.14), rgba(37, 99, 235, 0.10)),
    rgba(15, 23, 42, 0.78);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.46);
}

.category-card h2, .category-card h3 {
  margin: 0 0 10px;
}

.category-card p {
  color: #94a3b8;
  margin: 0 0 20px;
}

.category-card span {
  color: #67e8f9;
  font-weight: 850;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
}

.rank-item h3 {
  margin: 0;
  font-size: 16px;
}

.rank-item p {
  margin: 2px 0 0;
  color: #94a3b8;
  font-size: 13px;
}

.rank-item > span:last-child {
  color: #fbbf24;
  font-weight: 850;
}

.detail-hero {
  border-bottom: 1px solid rgba(30, 41, 59, 0.9);
  background:
    radial-gradient(circle at 20% 0%, rgba(6, 182, 212, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.92));
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 34px;
  align-items: start;
}

.player-card, .detail-panel, .text-panel {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.player-card {
  overflow: hidden;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.34);
  cursor: pointer;
}

.player-overlay.hidden {
  display: none;
}

.player-play {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 44px rgba(6, 182, 212, 0.36);
  font-size: 30px;
  padding-left: 4px;
}

.detail-title {
  padding: 24px;
}

.detail-panel {
  overflow: hidden;
}

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

.detail-info {
  padding: 20px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
  color: #cbd5e1;
}

.info-row strong {
  color: #f8fafc;
}

.text-panel {
  padding: 26px;
  margin-top: 28px;
}

.text-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.text-panel p {
  margin: 0 0 18px;
  color: #cbd5e1;
}

.breadcrumb {
  color: #94a3b8;
  font-size: 14px;
  margin-bottom: 18px;
}

.breadcrumb a {
  color: #67e8f9;
}

.site-footer {
  border-top: 1px solid rgba(30, 41, 59, 0.95);
  background: rgba(2, 6, 23, 0.92);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 22px;
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr;
  gap: 34px;
}

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

.site-footer h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

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

.site-footer a {
  color: #94a3b8;
}

.site-footer a:hover {
  color: #22d3ee;
}

.site-footer small {
  color: #64748b;
}

.no-results {
  display: none;
  border: 1px dashed rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  padding: 24px;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.58);
}

.no-results.show {
  display: block;
}

@media (max-width: 1080px) {
  .movie-grid, .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .hero-poster {
    max-width: 460px;
  }
}

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

  .menu-button {
    display: block;
  }

  .nav-shell {
    min-height: 64px;
  }

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

  .hero, .hero-content {
    min-height: auto;
  }

  .hero-content {
    padding: 82px 18px 62px;
    gap: 28px;
  }

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

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

  .hero-poster {
    display: none;
  }

  .container {
    padding: 46px 18px;
  }

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

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

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

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 16px;
  }

  .card-body p {
    font-size: 13px;
  }

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

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

  .rank-item > span:last-child {
    grid-column: 2;
  }
}

@media (max-width: 460px) {
  .movie-grid, .movie-grid.small, .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

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