* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #020617;
  color: #f1f5f9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 15% 10%, rgba(14, 165, 233, 0.18), transparent 32rem),
    radial-gradient(circle at 85% 5%, rgba(37, 99, 235, 0.16), transparent 30rem),
    #020617;
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(51, 65, 85, 0.7);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #22d3ee, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 40px rgba(6, 182, 212, 0.22);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

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

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

.menu-button {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 0.9rem;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.92);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(51, 65, 85, 0.7);
  padding: 0.75rem 1.25rem 1rem;
  background: rgba(2, 6, 23, 0.95);
}

.mobile-nav.open {
  display: grid;
  gap: 0.75rem;
}

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

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

.hero-slide {
  display: flex;
  align-items: flex-end;
  opacity: 0;
  background-position: center;
  background-size: cover;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  padding: 5rem min(8vw, 6rem);
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #22d3ee;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.eyebrow span,
.card-tags span,
.rank-tags span,
.tag-chip {
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.12);
  color: #67e8f9;
}

.eyebrow span {
  padding: 0.35rem 0.7rem;
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-info h1 {
  margin: 1rem 0;
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-line {
  max-width: 760px;
  margin: 0 0 1.5rem;
  color: #cbd5e1;
  font-size: 1.1rem;
  line-height: 1.75;
}

.hero-tags,
.tag-list,
.rank-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-tags span,
.tag-chip {
  padding: 0.42rem 0.72rem;
  font-size: 0.84rem;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.7rem;
}

.primary-button,
.ghost-button,
.rank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.24);
}

.ghost-button {
  color: #dbeafe;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.rank-action:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 24px 54px rgba(6, 182, 212, 0.22);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
  cursor: pointer;
}

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

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

.hero-dots button {
  width: 0.55rem;
  height: 0.55rem;
  border: 0;
  border-radius: 999px;
  background: #475569;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 2.2rem;
  background: #06b6d4;
}

.section-block,
.search-panel,
.rank-list,
.content-layout,
.player-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

.search-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.home-search {
  margin-top: -2.6rem;
  position: relative;
  z-index: 8;
}

.search-panel,
.page-hero > div,
.content-main,
.content-side,
.player-shell,
.category-tile {
  border: 1px solid rgba(51, 65, 85, 0.78);
  border-radius: 1.5rem;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: min(100%, 520px);
  padding: 0.85rem 1rem;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #67e8f9;
  font-weight: 800;
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.search-box input::placeholder {
  color: #64748b;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.filter-pills button {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.74);
  cursor: pointer;
}

.filter-pills button.active {
  border-color: rgba(34, 211, 238, 0.55);
  color: #67e8f9;
  background: rgba(8, 145, 178, 0.2);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-head h2,
.content-main h2,
.content-side h2,
.search-panel h2 {
  margin: 0.3rem 0 0;
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  letter-spacing: -0.03em;
}

.section-head a {
  color: #22d3ee;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.78);
  border-radius: 1rem;
  background: rgba(30, 41, 59, 0.78);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px) scale(1.015);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 26px 70px rgba(6, 182, 212, 0.16);
}

.card-cover,
.compact-cover,
.rank-cover,
.detail-poster {
  background-color: #0f172a;
  background-position: center;
  background-size: cover;
}

.card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.22), transparent 42%);
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.card-year,
.card-play {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(10px);
}

.card-year {
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.38rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.card-play {
  right: 0.75rem;
  bottom: 0.75rem;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(6, 182, 212, 0.88);
}

.card-body {
  padding: 1rem;
}

.card-tags span,
.rank-tags span {
  padding: 0.24rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.card-body h3 {
  min-height: 2.7rem;
  margin: 0.7rem 0 0.5rem;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.35;
}

.card-body p,
.rank-content p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #94a3b8;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.9rem;
  color: #64748b;
  font-size: 0.85rem;
}

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

.category-tile {
  min-height: 10rem;
  padding: 1.25rem;
  background-position: center;
  background-size: cover;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-tile span {
  display: block;
  margin-bottom: 0.7rem;
  color: #67e8f9;
  font-weight: 900;
}

.category-tile strong {
  display: block;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.45;
}

.page-hero {
  padding: 3.5rem 1.25rem 0;
}

.page-hero > div {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(34, 211, 238, 0.14), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.86));
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
  color: #94a3b8;
  font-size: 0.92rem;
}

.breadcrumb a {
  color: #67e8f9;
}

.rank-list {
  display: grid;
  gap: 1rem;
}

.rank-row {
  display: grid;
  grid-template-columns: 4rem 10rem 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem;
  border: 1px solid rgba(51, 65, 85, 0.78);
  border-radius: 1.25rem;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.42);
}

.rank-number {
  color: #64748b;
  font-size: 1.45rem;
  font-weight: 900;
}

.top-rank .rank-number {
  color: #22d3ee;
}

.rank-cover {
  aspect-ratio: 16 / 9;
  border-radius: 0.9rem;
}

.rank-content h3 {
  margin: 0 0 0.35rem;
  color: #fff;
  font-size: 1.15rem;
}

.rank-action {
  color: #e0f2fe;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(8, 145, 178, 0.14);
}

.detail-hero {
  position: relative;
  background-position: center;
  background-size: cover;
}

.detail-wrap {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 5rem 1.25rem 3rem;
}

.detail-poster {
  min-height: 410px;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 1.5rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

.detail-info {
  align-self: center;
}

.detail-info h1 {
  margin-top: 0;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1rem 0;
}

.detail-meta span {
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
}

.player-section {
  padding-top: 2rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.14), transparent 36%),
    #020617;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.85rem;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.62));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.big-play {
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 24px 64px rgba(6, 182, 212, 0.28);
  font-size: 2rem;
}

.player-message {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  min-height: 1.5rem;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1.5rem;
}

.content-main,
.content-side {
  padding: 1.5rem;
}

.content-main h2,
.content-side h2 {
  margin: 0 0 1rem;
  font-size: 1.45rem;
}

.content-main p {
  margin: 0 0 1.4rem;
  color: #cbd5e1;
  line-height: 1.9;
}

.info-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.68);
}

.info-list dt {
  color: #64748b;
}

.info-list dd {
  margin: 0;
  color: #e2e8f0;
}

.side-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.compact-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 0.75rem;
  align-items: center;
}

.compact-cover {
  aspect-ratio: 16 / 9;
  border-radius: 0.8rem;
}

.compact-card strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #fff;
}

.compact-card span {
  color: #94a3b8;
  font-size: 0.84rem;
}

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid rgba(51, 65, 85, 0.78);
  background: rgba(2, 6, 23, 0.92);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}

.footer-inner p {
  max-width: 560px;
  color: #94a3b8;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.85rem 1.2rem;
  justify-content: flex-end;
}

.footer-links a {
  color: #cbd5e1;
}

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

.footer-copy {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
  color: #64748b;
}

.is-hidden {
  display: none !important;
}

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

  .content-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-wrap {
    grid-template-columns: 220px 1fr;
  }
}

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

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .hero {
    min-height: 76vh;
  }

  .hero-content {
    padding: 4.5rem 1.25rem;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .page-hero > div {
    padding: 2rem 1.25rem;
  }

  .rank-row {
    grid-template-columns: 3rem 1fr;
  }

  .rank-cover,
  .rank-action {
    display: none;
  }

  .detail-wrap {
    grid-template-columns: 1fr;
    padding-top: 2rem;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}
