:root {
  --sky: #0ea5e9;
  --sky-deep: #0369a1;
  --amber: #f59e0b;
  --amber-soft: #fef3c7;
  --ink: #172033;
  --muted: #64748b;
  --line: rgba(14, 165, 233, 0.16);
  --paper: #ffffff;
  --soft: #f8fbff;
  --shadow: 0 18px 50px rgba(2, 8, 23, 0.11);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.20), transparent 34%);
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(14, 165, 233, 0.16);
  background: linear-gradient(90deg, rgba(240, 249, 255, 0.96), rgba(255, 251, 235, 0.96));
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 35px rgba(2, 8, 23, 0.08);
}

.nav-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--sky), var(--amber));
  box-shadow: 0 14px 28px rgba(14, 165, 233, 0.25);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-text strong {
  font-size: 24px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--sky-deep), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.main-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 15px;
  border-radius: 14px;
  color: #475569;
  font-weight: 700;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--sky-deep);
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.14), rgba(245, 158, 11, 0.14));
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(330px, 100%);
  padding: 6px;
  border: 1px solid rgba(14, 165, 233, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
}

.top-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 10px;
  color: var(--ink);
}

.top-search button,
.btn,
.filter-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(90deg, var(--sky), var(--amber));
  box-shadow: 0 13px 30px rgba(14, 165, 233, 0.22);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.top-search button:hover,
.btn:hover,
.filter-button:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.25);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(14, 165, 233, 0.12);
  padding: 11px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 99px;
  background: var(--sky-deep);
}

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

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  opacity: 0.82;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.58) 45%, rgba(2, 6, 23, 0.10) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 600px;
}

.hero-copy {
  width: min(680px, 92vw);
  color: #fff;
  animation: fadeIn 0.8s ease both;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 9px 16px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.88), rgba(245, 158, 11, 0.88));
  box-shadow: 0 18px 36px rgba(2, 8, 23, 0.18);
}

.hero h1,
.hero h2 {
  margin: 22px 0 14px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  font-weight: 950;
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

.hero p {
  width: min(620px, 100%);
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 22px);
  text-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

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

.hero-actions .ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  box-shadow: none;
}

.hero-search {
  display: flex;
  width: min(580px, 100%);
  padding: 8px;
  margin-top: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(14px);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 12px 16px;
  color: #fff;
  background: transparent;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: 0.2s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.30);
  transform: translateY(-50%) scale(1.06);
}

.hero-control.prev {
  left: max(20px, calc((100% - 1180px) / 2));
  transform: translateY(-50%);
}

.hero-control.next {
  right: max(20px, calc((100% - 1180px) / 2));
  transform: translateY(-50%);
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: 0.25s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: #fff;
}

.main-section {
  padding: 70px 0;
}

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

.section-head span {
  color: var(--sky-deep);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head h2,
.page-title h1 {
  margin: 6px 0 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.14;
  font-weight: 950;
}

.section-head p,
.page-title p {
  color: var(--muted);
  max-width: 560px;
}

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

.movie-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(14, 165, 233, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 45px rgba(2, 8, 23, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.24), rgba(245, 158, 11, 0.24));
}

.poster-link img {
  transition: transform 0.45s ease, opacity 0.2s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(2, 8, 23, 0.22);
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sky), var(--amber));
  font-size: 13px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 18px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.card-body h2 {
  margin: 8px 0;
  font-size: 19px;
  line-height: 1.32;
  font-weight: 950;
}

.card-body h2 a:hover {
  color: var(--sky-deep);
}

.card-body p {
  display: -webkit-box;
  min-height: 50px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span,
.info-pill,
.breadcrumb a,
.breadcrumb span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.12), rgba(245, 158, 11, 0.12));
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  padding: 24px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(135deg, rgba(3, 105, 161, 0.95), rgba(245, 158, 11, 0.88));
  box-shadow: var(--shadow);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -42px;
  bottom: -42px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.category-card h2 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 950;
}

.category-card p {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.86);
}

.category-card strong {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-top: 18px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.rank-row {
  display: grid;
  grid-template-columns: 64px 100px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(14, 165, 233, 0.13);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 36px rgba(2, 8, 23, 0.07);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: #fff;
  font-size: 22px;
  font-weight: 950;
  background: linear-gradient(135deg, var(--sky), var(--amber));
}

.rank-thumb {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(245, 158, 11, 0.18));
}

.rank-row h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 950;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
}

.heat {
  color: var(--amber);
  font-weight: 950;
}

.page-hero {
  padding: 58px 0 42px;
}

.page-title {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(14, 165, 233, 0.14);
  box-shadow: 0 10px 28px rgba(2, 8, 23, 0.06);
}

.filter-panel input,
.filter-panel select,
.search-box input {
  width: 100%;
  border: 1px solid rgba(14, 165, 233, 0.15);
  border-radius: 999px;
  outline: 0;
  padding: 12px 16px;
  color: var(--ink);
  background: #fff;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
  gap: 30px;
  align-items: start;
}

.player-card,
.detail-card,
.side-card,
.search-box {
  border: 1px solid rgba(14, 165, 233, 0.13);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #020617;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.20));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  color: #fff;
  font-size: 36px;
  background: linear-gradient(135deg, var(--sky), var(--amber));
  box-shadow: 0 22px 44px rgba(2, 8, 23, 0.35);
}

.player-info,
.detail-card,
.side-card {
  padding: 24px;
}

.info-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 950;
}

.detail-card p {
  color: #334155;
  margin: 0 0 18px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(14, 165, 233, 0.06);
}

.related-item img {
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(245, 158, 11, 0.18));
}

.related-item h3 {
  margin: 0 0 5px;
  font-size: 16px;
  font-weight: 900;
}

.related-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.search-box {
  padding: 22px;
  margin-bottom: 28px;
}

.search-form-wide {
  display: flex;
  gap: 12px;
}

.search-form-wide button {
  min-width: 110px;
}

.site-footer {
  margin-top: 70px;
  padding: 48px 0 26px;
  border-top: 1px solid rgba(14, 165, 233, 0.13);
  background: rgba(255, 255, 255, 0.72);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 32px;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: var(--muted);
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 18px;
}

.footer-grid li {
  margin: 8px 0;
}

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

.footer-bottom {
  margin-top: 30px;
  font-size: 14px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .nav-wrap {
    grid-template-columns: auto auto;
  }

  .mobile-toggle {
    display: block;
    justify-self: end;
  }

  .main-nav,
  .top-search {
    grid-column: 1 / -1;
    display: none;
    width: 100%;
  }

  .main-nav.is-open,
  .top-search.is-open {
    display: flex;
  }

  .main-nav {
    justify-self: stretch;
    flex-wrap: wrap;
  }

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

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

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

  .rank-row {
    grid-template-columns: 48px 84px 1fr;
  }

  .rank-row .btn {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

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

  .hero,
  .hero-content {
    min-height: 620px;
    height: 620px;
  }

  .hero-control {
    display: none;
  }

  .hero-search,
  .search-form-wide {
    border-radius: 22px;
    flex-direction: column;
  }

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

  .section-head {
    display: block;
  }

  .rank-row {
    grid-template-columns: 42px 72px 1fr;
    gap: 12px;
  }

  .rank-num {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .brand-text strong {
    font-size: 20px;
  }
}
