:root {
  --cyan: #06b6d4;
  --blue: #2563eb;
  --deep: #0f172a;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 18px 55px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 43%, #ecfeff 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
  backdrop-filter: blur(18px);
}

.nav-bar {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.site-logo {
  font-size: 24px;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 25px rgba(6, 182, 212, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  font-size: 15px;
  color: #374151;
}

.nav-links a {
  padding: 8px 0;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--cyan);
}

.global-search {
  position: relative;
  width: 260px;
}

.global-search input,
.filter-row input,
.filter-row select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  outline: 0;
  padding: 11px 16px;
  color: var(--text);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.global-search input:focus,
.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

.search-results {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(420px, 92vw);
  max-height: 430px;
  overflow: auto;
  display: none;
  padding: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

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

.search-results a,
.search-empty {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
}

.search-results a:hover {
  background: #f8fafc;
}

.search-results img {
  width: 70px;
  height: 44px;
  object-fit: cover;
  border-radius: 10px;
}

.search-results strong {
  display: block;
  color: var(--text);
  margin-bottom: 3px;
}

.search-results span {
  color: var(--muted);
  font-size: 13px;
}

.search-empty {
  display: block;
  color: var(--muted);
  text-align: center;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #334155;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 8px 0 16px;
  border-top: 1px solid var(--line);
}

.mobile-panel.open {
  display: grid;
  gap: 10px;
}

.mobile-panel a {
  padding: 10px 2px;
  color: #334155;
  font-weight: 700;
}

.hero-carousel {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.86) 0%, rgba(15, 23, 42, 0.66) 42%, rgba(15, 23, 42, 0.12) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-text {
  width: min(680px, 100%);
  color: white;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 10px 16px;
  border: 1px solid rgba(103, 232, 249, 0.32);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(6, 182, 212, 0.18);
  backdrop-filter: blur(10px);
}

.hero-text h1 {
  margin: 0 0 20px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-text p {
  margin: 0 0 22px;
  max-width: 620px;
  color: #e2e8f0;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.75;
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span,
.detail-tags span {
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: white;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.ghost-btn {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.ghost-btn.light {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.84);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 18px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 40px;
  background: white;
}

.page-stack {
  padding: 68px 0;
  display: grid;
  gap: 80px;
}

.home-section {
  min-width: 0;
}

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

.section-head h2,
.text-section h2,
.player-section h2,
.info-card h2,
.library-group h2,
.category-panel h2 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.section-head p,
.category-panel p,
.library-group p {
  margin: 0;
  color: var(--muted);
}

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--cyan);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: 20px;
  background: white;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e2e8f0;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.05));
  transition: opacity 0.25s ease;
}

.play-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, 0.2);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  backdrop-filter: blur(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-shade,
.movie-card:hover .play-mark {
  opacity: 1;
}

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 12px 25px rgba(249, 115, 22, 0.35);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 20px;
  line-height: 1.25;
}

.movie-card h3 a:hover {
  color: var(--cyan);
}

.movie-card p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: #5f6b7a;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 280px 1fr;
}

.movie-card-horizontal .poster-link {
  height: 100%;
  aspect-ratio: auto;
}

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

.ranking-list .movie-card-horizontal:nth-child(-n + 20) {
  grid-column: span 2;
}

.sub-hero,
.detail-hero {
  color: white;
  background: radial-gradient(circle at top left, rgba(103, 232, 249, 0.35), transparent 30%), linear-gradient(120deg, #0891b2, #2563eb 55%, #0f172a);
}

.sub-hero {
  padding: 72px 0 64px;
}

.sub-hero h1,
.detail-intro h1 {
  margin: 10px 0 16px;
  font-size: clamp(38px, 5vw, 62px);
  letter-spacing: -0.04em;
}

.sub-hero p,
.detail-intro p {
  max-width: 780px;
  margin: 0;
  color: #e0f2fe;
  font-size: 20px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: white;
}

.filter-panel {
  display: grid;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(12px);
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 14px;
}

.category-chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.category-chip-row.small {
  justify-content: flex-start;
}

.category-chip-row a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  color: #0e7490;
  background: #ecfeff;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease;
}

.category-chip-row a:hover,
.category-chip-row a.active {
  color: white;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  transform: translateY(-2px);
}

.category-cta {
  padding: 54px 28px;
  border-radius: 28px;
  color: white;
  text-align: center;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: var(--shadow);
}

.category-cta h2 {
  margin: 10px 0 12px;
  font-size: clamp(32px, 5vw, 48px);
}

.category-cta p {
  margin: 0 0 26px;
  color: #cffafe;
  font-size: 18px;
}

.category-cta .category-chip-row a {
  color: #0e7490;
  background: white;
}

.cta-icon {
  width: 70px;
  height: 70px;
  display: inline-grid;
  place-items: center;
  border-radius: 24px;
  color: var(--cyan);
  background: white;
  font-size: 34px;
  font-weight: 900;
}

.category-overview {
  padding: 68px 0;
  display: grid;
  gap: 30px;
}

.category-panel {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 26px;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: white;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.category-cover {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 22px;
  background: #0f172a;
}

.category-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1);
}

.category-cover span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 13px;
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.category-panel-body {
  display: grid;
  align-content: start;
  gap: 16px;
}

.mini-card-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.mini-card-row .movie-card p,
.mini-card-row .tag-row,
.mini-card-row .movie-meta-line {
  display: none;
}

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

.mini-card-row .movie-card h3 {
  margin: 0;
  font-size: 16px;
}

.detail-hero {
  padding: 58px 0;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: 0 28px 68px rgba(2, 6, 23, 0.42);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  padding: 58px 0 78px;
}

.detail-main {
  display: grid;
  gap: 34px;
}

.player-section,
.text-section,
.info-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #020617;
}

.video-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.12));
  cursor: pointer;
}

.video-start span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 34px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.45);
}

.video-shell.is-playing .video-start {
  display: none;
}

.text-section p,
.info-card p {
  margin: 0;
  color: #475569;
  font-size: 17px;
  line-height: 1.9;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 22px;
}

.info-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.info-card li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid #eef2f7;
}

.info-card li:last-child {
  border-bottom: 0;
}

.info-card span {
  color: var(--muted);
}

.info-card strong {
  color: #0f172a;
  text-align: right;
}

.info-card.accent {
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
}

.library-layout {
  padding: 68px 0;
  columns: 2 420px;
  column-gap: 28px;
}

.library-group {
  display: inline-block;
  width: 100%;
  margin: 0 0 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.library-group ul {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.library-group li + li {
  border-top: 1px solid #eef2f7;
}

.library-group li a {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 0;
  color: #0f172a;
  font-weight: 800;
}

.library-group li a:hover {
  color: var(--cyan);
}

.library-group li span {
  flex: 0 0 auto;
  max-width: 50%;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 34px;
  padding: 48px 0 36px;
}

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

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.site-footer p {
  margin: 0;
  color: #64748b;
  line-height: 1.8;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 9px;
}

.site-footer a:hover {
  color: var(--cyan);
}

.footer-bottom {
  padding: 22px 16px;
  border-top: 1px solid #dbe4ef;
  color: #64748b;
  text-align: center;
}

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

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

  .mobile-toggle {
    display: block;
  }

  .global-search {
    margin-left: auto;
  }

  .five-cols,
  .four-cols,
  .ranking-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

  .nav-bar {
    min-height: 66px;
    gap: 12px;
  }

  .site-logo {
    font-size: 20px;
  }

  .global-search {
    width: min(46vw, 240px);
  }

  .hero-carousel {
    height: 570px;
  }

  .hero-content {
    align-items: end;
    padding-bottom: 84px;
  }

  .section-head,
  .filter-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .five-cols,
  .four-cols,
  .three-cols,
  .ranking-list,
  .mini-card-row {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal,
  .ranking-list .movie-card-horizontal:nth-child(-n + 20),
  .category-panel,
  .detail-hero-grid,
  .detail-layout {
    display: grid;
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal .poster-link {
    aspect-ratio: 16 / 9;
  }

  .category-cover {
    min-height: 220px;
  }

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

  .library-layout {
    columns: 1;
  }

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

@media (max-width: 520px) {
  .global-search {
    display: none;
  }

  .hero-text h1,
  .sub-hero h1,
  .detail-intro h1 {
    font-size: 36px;
  }

  .hero-text p,
  .sub-hero p,
  .detail-intro p {
    font-size: 16px;
  }

  .page-stack,
  .category-overview,
  .library-layout {
    padding: 42px 0;
  }

  .player-section,
  .text-section,
  .info-card,
  .filter-panel {
    padding: 18px;
  }

  .library-group li a {
    display: grid;
  }

  .library-group li span {
    max-width: none;
  }
}
