:root {
  --bg: #07111f;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.84);
  --panel-solid: #111c2f;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --blue: #2563eb;
  --blue-light: #38bdf8;
  --cyan: #22d3ee;
  --green: #22c55e;
  --orange: #f97316;
  --pink: #ec4899;
  --shadow: 0 18px 45px rgba(2, 6, 23, 0.36);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(37, 99, 235, 0.24), transparent 34rem),
    radial-gradient(circle at 92% 18%, rgba(34, 211, 238, 0.14), transparent 28rem),
    linear-gradient(180deg, #081221 0%, #0f172a 42%, #07111f 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.96), rgba(15, 23, 42, 0.98));
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 16px 35px rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(18px);
}

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

.navbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue-light), var(--blue));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.38);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #dbeafe, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  margin-top: 4px;
  color: #bfdbfe;
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a,
.mobile-nav a {
  padding: 10px 15px;
  color: #dbeafe;
  border-radius: 12px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-links a:hover,
.mobile-nav a:hover,
.nav-links a.is-active,
.mobile-nav a.is-active {
  color: #fff;
  background: rgba(37, 99, 235, 0.72);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(59, 130, 246, 0.2);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  padding: 0 0 18px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 17, 31, 0.98) 0%, rgba(15, 23, 42, 0.82) 44%, rgba(7, 17, 31, 0.45) 100%),
    radial-gradient(circle at 70% 30%, rgba(34, 211, 238, 0.16), transparent 26rem);
  z-index: 2;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.08) contrast(1.05);
}

.hero-content {
  position: relative;
  z-index: 3;
  min-height: 650px;
  display: grid;
  align-items: center;
  padding: 58px 0 44px;
}

.hero-panel {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.05);
}

.hero h1 {
  margin: 22px 0 14px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.hero-lead {
  max-width: 640px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: rgba(30, 41, 59, 0.72);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.22);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(2, 6, 23, 0.34);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), #06b6d4);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.btn-soft {
  color: #e0f2fe;
  background: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.28);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}

.hero-meta span,
.meta-pill,
.tag,
.rank-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.64);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.hero-thumbs {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin: -124px auto 44px;
}

.hero-thumb {
  min-height: 96px;
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.hero-thumb:hover,
.hero-thumb.is-active {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.64);
  background: rgba(30, 64, 175, 0.56);
}

.hero-thumb img {
  width: 62px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
}

.hero-thumb strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
  line-height: 1.35;
}

.hero-thumb small {
  display: block;
  margin-top: 6px;
  color: #bfdbfe;
}

.main {
  padding: 40px 0 70px;
}

.section {
  margin-top: 48px;
}

.section:first-child {
  margin-top: 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(25px, 4vw, 38px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-title span {
  display: inline-block;
  padding-bottom: 9px;
  border-bottom: 3px solid var(--blue-light);
}

.section-desc {
  margin: 10px 0 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.8;
}

.grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card,
.category-card,
.info-card,
.rank-card,
.related-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.72));
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.22);
}

.movie-card,
.category-card,
.rank-card,
.related-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-card:hover,
.related-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.34);
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.35);
}

.poster-link,
.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.42), rgba(15, 23, 42, 0.8));
}

.poster-link img,
.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-link img,
.related-card:hover .poster-link img {
  transform: scale(1.06);
  filter: saturate(1.12);
}

.movie-card-body,
.category-card-body,
.related-card-body {
  padding: 16px;
}

.movie-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #bae6fd;
  font-size: 13px;
}

.movie-card h3,
.related-card h3,
.rank-card h3 {
  margin: 11px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h3 a,
.related-card h3 a,
.rank-card h3 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card p,
.related-card p,
.rank-card p,
.category-card p,
.info-card p {
  color: var(--muted);
  line-height: 1.65;
}

.movie-card p,
.related-card p,
.rank-card p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 3.25em;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0;
  font-size: 14px;
}

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

.tag {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
  color: #c4b5fd;
  border-color: rgba(167, 139, 250, 0.24);
  background: rgba(88, 28, 135, 0.18);
}

.category-card {
  min-height: 188px;
}

.category-card-body {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.category-card .btn {
  width: fit-content;
  margin-top: 16px;
}

.search-panel,
.detail-hero,
.content-panel {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 16px;
}

.search-input,
.select-input {
  min-height: 48px;
  width: 100%;
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  outline: none;
  background: rgba(2, 6, 23, 0.5);
  padding: 0 14px;
}

.search-input:focus,
.select-input:focus {
  border-color: rgba(56, 189, 248, 0.72);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 24px;
  color: #bfdbfe;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 28px;
  padding: 28px;
}

.detail-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-summary {
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 17px;
}

.player-section {
  margin-top: 34px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.42);
  aspect-ratio: 16 / 9;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #fff;
  border: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(37, 99, 235, 0.22), transparent 18rem),
    rgba(2, 6, 23, 0.46);
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-overlay span:last-child {
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.45);
}

.play-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 7px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 23px solid #fff;
}

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

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 27px;
}

.content-panel p {
  color: #cbd5e1;
  line-height: 1.95;
  font-size: 16px;
}

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

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rank-card {
  display: grid;
  grid-template-columns: 72px 92px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
}

.rank-number {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), var(--pink));
}

.rank-card img {
  width: 92px;
  height: 118px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-card h3 {
  margin-top: 0;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.44);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
  padding: 44px 0;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
}

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

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

.copyright {
  padding: 18px 0 28px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

.empty-state {
  display: none;
  padding: 28px;
  color: #cbd5e1;
  text-align: center;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.empty-state.is-visible {
  display: block;
}

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

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

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

  .hero-thumbs {
    grid-template-columns: repeat(3, 1fr);
    margin-top: -80px;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .navbar {
    min-height: 68px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

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

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

  .hero-thumbs {
    grid-template-columns: 1fr 1fr;
    margin-top: -48px;
  }

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

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

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

  .detail-hero .poster-frame {
    max-width: 360px;
  }

  .rank-list {
    grid-template-columns: 1fr;
  }

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

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

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

  .hero-panel {
    padding-top: 18px;
  }

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

  .btn {
    width: 100%;
  }

  .hero-thumbs {
    display: none;
  }

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

  .movie-card-body,
  .category-card-body,
  .related-card-body {
    padding: 13px;
  }

  .section-head {
    display: block;
  }

  .detail-hero,
  .content-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .player-box {
    border-radius: 20px;
  }

  .play-icon {
    width: 68px;
    height: 68px;
  }

  .rank-card {
    grid-template-columns: 46px 76px 1fr;
    gap: 10px;
  }

  .rank-number {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 16px;
  }

  .rank-card img {
    width: 76px;
    height: 100px;
  }
}
