html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans', sans-serif;
  color: #1f2937;
  background: #ffffff;
}

a {
  color: hsl(204, 86%, 53%);
}

a:hover {
  text-decoration: underline;
}

pre {
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  font-size: 0.9rem;
  overflow-x: auto;
}

.dnerf {
  font-variant: small-caps;
}


.project-navbar {
  border-bottom: 1px solid #eef2f7;
  background: rgba(255, 255, 255, 0.96);
}

.project-home {
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
}

.footer .icon-link {
  margin: 0 0.5rem;
  color: #000;
  font-size: 25px;
}

.link-block a {
  margin-top: 5px;
  margin-bottom: 5px;
}


.project-hero .hero-body {
  padding-top: 3.75rem;
  padding-bottom: 1.25rem;
}

.publication-title,
.publication-authors,
.teaser,
.stat-number,
.metric-number,
.step-index {
  font-family: 'Google Sans', sans-serif;
}

.publication-title {
  line-height: 1.1;
}

.publication-authors a {
  color: hsl(204, 86%, 53%) !important;
}

.author-block {
  display: inline-block;
}

.publication-venue,
.publication-awards {
  width: fit-content;
  font-weight: bold;
}

.publication-venue {
  color: #555;
}

.publication-awards {
  color: #ff3860;
  font-weight: bolder;
}

.publication-links {
  margin-top: 1.35rem;
  margin-bottom: 1.75rem;
}

.button.coming-soon,
.button.coming-soon:hover {
  opacity: 0.58;
  pointer-events: none;
  cursor: not-allowed;
  text-decoration: none;
}

.publication-video {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
  border-radius: 10px !important;
}

.publication-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}


.project-tldr-card {
  max-width: 980px;
  margin: 2.1rem auto 2.25rem;
  padding: 1.15rem 1.6rem;
  border: 1.5px solid transparent;
  border-radius: 18px;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(90deg, rgba(56, 189, 248, 0.55), rgba(239, 68, 68, 0.55)) border-box;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.project-tldr {
  max-width: 920px;
  margin: 0;
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 650;
  line-height: 1.45;
}

.brand-name,
.spectrum-text,
.highlight-text {
  font-weight: 800;
}

.brand-name {
  color: #0f172a;
}

.spectrum-text {
  background: linear-gradient(90deg, #0ea5e9 0%, #38bdf8 35%, #ef4444 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.highlight-text {
  color: #1d4ed8;
}

.teaser .hero-body {
  padding-top: 0;
  padding-bottom: 1.4rem;
}

.teaser-card {
  max-width: 980px;
  margin: 0 auto;
  padding: 0.7rem;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

.teaser-image {
  width: 100%;
  display: block;
  border-radius: 16px;
  box-shadow: none;
}

.rounded-media {
  width: 100%;
  display: block;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.teaser-caption {
  max-width: 920px;
  margin: 1.25rem auto 0;
  color: #334155;
  font-size: 1.08rem;
  line-height: 1.55;
  text-align: center;
}

.caption-main,
.caption-secondary {
  display: block;
}


.section-band {
  position: relative;
  margin: 0 auto;
  padding-top: 3.2rem;
  padding-bottom: 3.2rem;
  border-top: 1px solid rgba(148, 136, 96, 0.14);
}

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

.section-band > .container > .title,
.section-band h2.title {
  color: #1f2937;
}

.section-abstract {
  background: rgba(255, 253, 247, 0.1);
}

.section-overview {
  background: rgba(252, 251, 242, 0.1);
}

.section-dataset {
  background: rgba(255, 250, 240, 0.1);
}

.section-method {
  background: rgba(251, 250, 240, 0.1);
}

.section-results,
.results-section {
  background: rgba(249, 251, 241, 0.1);
}

.section-resources {
  background: rgba(255, 251, 244, 0.1);
}

.section-bibtex {
  background: rgba(250, 247, 239, 0.1);
}

.section-lead {
  max-width: 860px;
  margin: 0 auto;
  color: #334155;
  font-size: 1.15rem;
  line-height: 1.6;
}

.figure-caption {
  margin-top: 0.75rem;
  color: #475569;
  font-size: 0.98rem;
}

.info-card,
.media-card,
.resource-card,
.method-step,
.metric-card,
.stat-card {
  height: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(2px);
}

.alpha-panel {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(2px);
}


.info-card {
  padding: 1.5rem;
  text-align: center;
}

.info-card p,
.method-step p,
.media-card p {
  color: #475569;
  line-height: 1.5;
}

.info-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  color: #ffffff;
  font-size: 1.25rem;
}

.soft-icon {
  background: linear-gradient(135deg, #38bdf8, #ef4444);
}

.dataset-icon {
  background: linear-gradient(135deg, #2563eb, #14b8a6);
}

.solver-icon {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
}


.stat-card {
  padding: 1.15rem 0.75rem;
  box-shadow: none;
}

.stat-number,
.metric-number {
  color: #0f172a;
  font-weight: 800;
  line-height: 1.1;
}

.stat-number {
  font-size: 1.85rem;
}

.stat-label,
.metric-label,
.metric-note {
  margin-top: 0.35rem;
}

.stat-label {
  color: #475569;
  font-size: 0.95rem;
}

.metric-card {
  padding: 1.35rem 1rem;
}

.metric-number {
  font-size: 2.15rem;
}

.metric-label {
  color: #334155;
  font-weight: 700;
}

.metric-note {
  color: #64748b;
  font-size: 0.9rem;
}


.method-step {
  position: relative;
  padding: 1.4rem 1.25rem 1.25rem;
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  font-weight: 700;
}

.alpha-panel {
  padding: 1.25rem 1.5rem;
}

.alpha-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  color: #334155;
  font-size: 0.95rem;
  font-weight: 700;
}

.alpha-gradient {
  height: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8 0%, #f8fafc 48%, #ef4444 100%);
}

.alpha-formula {
  margin-top: 1.1rem;
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 600;
  text-align: center;
}

.alpha-formula mjx-container {
  margin: 0 !important;
}

.alpha-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.9rem;
  height: 1.55rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #ef4444);
  color: #ffffff;
  font-weight: 800;
}

.solver-badge {
  display: inline-block;
  margin: 0 0.12rem;
  padding: 0.12rem 0.48rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 750;
}

.mpm-badge {
  color: #0369a1;
  background: #e0f2fe;
  border-color: #bae6fd;
}

.lbs-badge {
  color: #92400e;
  background: #fef3c7;
  border-color: #fde68a;
}

.sm-badge {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fecaca;
}


.media-card {
  padding: 1rem;
}

.media-card video,
.media-card img {
  display: block;
  width: 100%;
  border-radius: 12px;
  background: #e5e7eb;
}

.results-carousel {
  overflow: hidden;
}

.results-carousel .item {
  margin: 5px;
  overflow: hidden;
  border: 1px solid #bbb;
  border-radius: 10px;
  padding: 0;
  font-size: 0;
}

.results-carousel video {
  margin: 0;
}

.result-block {
  padding: 1.4rem 1.5rem 1.55rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.055);
}

.result-block h3 {
  margin-bottom: 1rem;
}

.table-image-wrapper {
  width: 100%;
  overflow-x: auto;
  padding: 0.65rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.result-table-image {
  display: block;
  width: 100%;
  min-width: 760px;
  border-radius: 8px;
}

.result-insight {
  margin-top: 0.9rem;
  padding: 0.85rem 1rem;
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
  background: #fffaf0;
  color: #334155;
  line-height: 1.55;
}

.result-video-card {
  height: 100%;
}

.result-video-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  background: #e5e7eb;
}

.result-video-card h4 {
  line-height: 1.25;
}

.result-video-card p {
  color: #475569;
  line-height: 1.55;
}


.resource-card {
  padding: 1.5rem;
  text-align: center;
}

.resource-card .icon {
  margin-bottom: 0.75rem;
  color: #0f172a;
}

.resource-card p {
  color: #64748b;
}

.interpolation-panel {
  border-radius: 10px;
  background: #f5f5f5;
}

.interpolation-panel .interpolation-image,
#interpolation-image-wrapper {
  width: 100%;
}

.interpolation-panel .interpolation-image,
#interpolation-image-wrapper img {
  border-radius: 5px;
}

.interpolation-panel .slider {
  margin: 0 !important;
}


.side-dot-nav {
  position: fixed;
  right: 26px;
  top: 50%;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 12px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.50);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(8px);
  transform: translateY(-50%);
}

.dot-link {
  position: relative;
  width: 13px;
  height: 13px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: #c7c7c7;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.dot-link:hover {
  background: #9ca3af;
  transform: scale(1.22);
}

.dot-link.active {
  background: #f472b6;
  box-shadow: 0 0 0 5px rgba(244, 114, 182, 0.18);
  transform: scale(1.28);
}

.dot-link::before {
  content: attr(data-label);
  position: absolute;
  right: 23px;
  top: 50%;
  padding: 0.22rem 0.58rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  color: #334155;
  font-size: 0.78rem;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transform: translateY(-50%);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.dot-link:hover::before {
  opacity: 1;
  transform: translateY(-50%) translateX(-2px);
}


@media screen and (max-width: 1024px) {
  .side-dot-nav {
    display: none;
  }
}

@media screen and (max-width: 768px) {
  .publication-title {
    font-size: 2rem !important;
  }

  .project-tldr-card {
    margin: 1.5rem auto 1.75rem;
    padding: 1rem 1.1rem;
  }

  .project-tldr {
    font-size: 1.05rem;
  }

  .teaser .hero-body {
    padding-bottom: 1rem;
  }

  .teaser-card {
    padding: 0.45rem;
    border-radius: 16px;
  }

  .teaser-image {
    border-radius: 12px;
  }

  .teaser-caption {
    font-size: 0.96rem;
  }

  .section-band {
    padding-top: 2.4rem;
    padding-bottom: 2.4rem;
  }

  .section-compact-top {
    padding-top: 1.6rem;
  }

  .alpha-labels {
    font-size: 0.8rem;
  }

  .metric-number {
    font-size: 1.7rem;
  }

  .stat-number {
    font-size: 1.55rem;
  }

  .result-block {
    padding: 1rem;
  }

  .result-table-image {
    min-width: 680px;
  }
}

/* ---------- Typography strength override ---------- */

:root {
  --font-sans: 'Noto Sans', sans-serif;
  --weight-title-main: 900;
  --weight-title-section: 850;
  --weight-title-card: 800;
  --weight-emphasis: 800;
}

/* Use one reliable font family with loaded bold weights */
body,
.title,
.publication-title,
.publication-authors,
.project-home,
.teaser,
.stat-number,
.metric-number {
  font-family: var(--font-sans);
}

/* Main paper title */
.publication-title {
  font-weight: var(--weight-title-main);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: #0f172a;
}

/* Section titles: Abstract, Overview, Method, Results, Resources, BibTeX */
.section-band h2.title,
.section-band > .container > .title {
  font-weight: var(--weight-title-section);
  letter-spacing: -0.018em;
  color: #0f172a;
}

/* Card / subsection titles */
.info-card h3.title,
.method-step h3.title,
.resource-card h3.title,
.result-block h3.title,
.result-video-card h4.title {
  font-weight: var(--weight-title-card);
  letter-spacing: -0.01em;
  color: #0f172a;
}

/* Bold text inside paragraphs */
.content b,
.content strong,
.result-insight b,
.section-lead b,
.teaser-caption b {
  font-weight: var(--weight-emphasis);
}

.alpha-labels {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: 'Noto Sans', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  color: #334155;
  margin-bottom: 0.65rem;
  letter-spacing: 0.01em;
}

.alpha-labels mjx-container {
  margin: 0 0 0 0.12rem !important;
  font-size: 1.05em !important;
  vertical-align: -0.05em;
}

.side-dot-nav {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-50%) translateX(12px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0.22s ease;
}

.side-dot-nav.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

@media screen and (max-width: 1024px) {
  .side-dot-nav,
  .side-dot-nav.is-visible {
    display: none;
  }
}

/* ---------- Top navigation refinement ---------- */

.project-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 4.1rem;
  padding: 0.35rem 1.25rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.055);
}

.project-navbar .navbar-brand {
  align-items: center;
}

.project-home {
  border-radius: 999px;
  font-family: 'Noto Sans', sans-serif;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.015em;
  transition:
    background 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.project-home:hover {
  background: rgba(248, 250, 252, 0.95);
  color: #0ea5e9;
  transform: translateY(-1px);
}

.project-navbar .navbar-menu {
  background: transparent;
}

.project-navbar .navbar-end {
  align-items: center;
  gap: 0.25rem;
}

.project-navbar .navbar-end > .navbar-item {
  position: relative;
  margin: 0 0.08rem;
  padding: 0.48rem 0.85rem;
  border-radius: 999px;
  font-family: 'Noto Sans', sans-serif;
  font-size: 1rem;
  font-weight: 750;
  color: #334155;
  letter-spacing: -0.01em;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.project-navbar .navbar-end > .navbar-item:hover {
  color: #0f172a;
  background: rgba(241, 245, 249, 0.9);
  transform: translateY(-1px);
}

.project-navbar .navbar-end > .navbar-item.is-current-section {
  color: #0f172a;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(90deg, rgba(56, 189, 248, 0.75), rgba(239, 68, 68, 0.75)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.project-navbar .navbar-end > .navbar-item.is-current-section::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.28rem;
  width: 18px;
  height: 3px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #38bdf8, #ef4444);
}

/* Mobile navbar */
@media screen and (max-width: 1023px) {
  .project-navbar {
    padding: 0.25rem 0.85rem;
  }

  .project-navbar .navbar-menu {
    margin-top: 0.35rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  }

  .project-navbar .navbar-end {
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.6rem;
  }

  .project-navbar .navbar-end > .navbar-item {
    margin: 0;
    padding: 0.72rem 0.9rem;
  }

  .project-navbar .navbar-end > .navbar-item.is-current-section::after {
    display: none;
  }
}
/* ---------- Smooth top navbar active transition ---------- */

.project-navbar .navbar-end > .navbar-item {
  position: relative;
  z-index: 0;
  overflow: hidden;
  margin: 0 0.08rem;
  padding: 0.48rem 0.85rem;
  border-radius: 999px;
  font-family: 'Noto Sans', sans-serif;
  font-size: 1rem;
  font-weight: 750;
  color: #334155;
  letter-spacing: -0.01em;
  background: transparent;
  transition:
    color 0.32s ease,
    transform 0.28s ease;
}

/* 背景高亮层：默认透明 */
.project-navbar .navbar-end > .navbar-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 999px;
  opacity: 0;
  transform: scale(0.92);
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(90deg, rgba(56, 189, 248, 0.75), rgba(239, 68, 68, 0.75)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transition:
    opacity 0.36s ease,
    transform 0.36s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* 底部短线：默认透明 */
.project-navbar .navbar-end > .navbar-item::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.28rem;
  width: 18px;
  height: 3px;
  border-radius: 999px;
  opacity: 0;
  transform: translateX(-50%) scaleX(0.45);
  background: linear-gradient(90deg, #38bdf8, #ef4444);
  transition:
    opacity 0.28s ease,
    transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.project-navbar .navbar-end > .navbar-item:hover {
  color: #0f172a;
  transform: translateY(-1px);
}

.project-navbar .navbar-end > .navbar-item:hover::before {
  opacity: 0.55;
  transform: scale(1);
}

/* 当前 section 高亮 */
.project-navbar .navbar-end > .navbar-item.is-current-section {
  color: #0f172a;
}

.project-navbar .navbar-end > .navbar-item.is-current-section::before {
  opacity: 1;
  transform: scale(1);
}

.project-navbar .navbar-end > .navbar-item.is-current-section::after {
  opacity: 1;
  transform: translateX(-50%) scaleX(1);
}

@media screen and (max-width: 1023px) {
  .project-navbar .navbar-end > .navbar-item::after {
    display: none;
  }
}

/* ---------- Thin statistic labels ---------- */

.stat-label {
  margin-top: 0.45rem;
  font-family: 'Noto Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 300;
  line-height: 1.35;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #64748b;
  opacity: 0.82;
}

/* ---------- Iridescent khaki statistic number ---------- */

.stat-number-khaki-glow {
  position: relative;
  display: inline-block;
  font-weight: 900;
  letter-spacing: -0.02em;

  background: linear-gradient(
    110deg,
    #8a6f2d 0%,
    #c7ad61 18%,
    #fff0b8 34%,
    #d8bc72 48%,
    #f3d7a1 62%,
    #bfa46a 78%,
    #fff7d6 100%
  );
  background-size: 260% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;

  filter: drop-shadow(0 4px 12px rgba(191, 164, 106, 0.28));
  animation: khaki-shimmer 5.5s ease-in-out infinite;
}

.stat-number-khaki-glow::after {
  content: attr(data-value);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: rgba(106, 151, 191, 0.5);
  filter: blur(10px);
  transform: scale(1.08);
  pointer-events: none;
}

@keyframes khaki-shimmer {
  0% {
    background-position: 0% center;
  }

  50% {
    background-position: 100% center;
  }

  100% {
    background-position: 0% center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stat-number-khaki-glow {
    animation: none;
    background-position: 20% center;
  }
}

/* ---------- Larger section body copy only ---------- */

:root {
  --section-copy-width: 920px;
  --section-copy-size: 1.2rem;
}

/* Only widen section-copy itself, not the whole section container */
.section-copy {
  width: min(var(--section-copy-width), calc(100vw - 2rem));
  max-width: none;

  margin-left: 50%;
  margin-right: 0;
  transform: translateX(-50%);

  font-size: var(--section-copy-size);
  line-height: 1.72;
  color: #334155;
  font-weight: 400;
}

.section-copy p {
  font-size: inherit;
  line-height: inherit;
  margin-bottom: 1.15em;
}

.section-copy b,
.section-copy strong {
  font-weight: 850;
  color: #0f172a;
}

@media screen and (max-width: 768px) {
  .section-copy {
    width: 100%;
    margin-left: 0;
    transform: none;

    font-size: 1.08rem;
    line-height: 1.65;
  }
}

/* ---------- Video switcher ---------- */

.video-switcher {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.video-switcher-viewport {
  flex: 1;
  overflow: hidden;
  border-radius: 20px;
}

.video-switcher-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.video-switcher-slide {
  flex: 0 0 100%;
  min-width: 100%;
}

.video-switcher-slide .result-video-card {
  max-width: 920px;
  margin: 0 auto;
}

.video-switcher-arrow {
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
  flex-shrink: 0;
}

.video-switcher-arrow:hover {
  transform: translateY(-1px) scale(1.04);
  background: #ffffff;
  color: #0f172a;
}

.video-switcher-arrow:active {
  transform: scale(0.97);
}

.video-switcher-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.55rem;
}

.video-dot {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.video-dot:hover {
  background: #94a3b8;
}

.video-dot.is-active {
  background: #f472b6;
  transform: scale(1.2);
  box-shadow: 0 0 0 5px rgba(244, 114, 182, 0.16);
}

/* Make the card visually centered and stronger */
.result-video-card {
  height: 100%;
  padding: 1.1rem;
  border-radius: 22px;
}

/* optional: slightly larger video area in single-card mode */
.result-video-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  background: #e5e7eb;
}

@media screen and (max-width: 768px) {
  .video-switcher {
    gap: 0.55rem;
  }

  .video-switcher-arrow {
    width: 38px;
    height: 38px;
  }

  .result-video-card {
    padding: 0.85rem;
  }
}

/* ---------- Adaptive video card ---------- */

.video-switcher-viewport {
  overflow: hidden;
  transition: height 0.36s ease;
}

.video-switcher-slide {
  flex: 0 0 100%;
  min-width: 100%;
  display: flex;
  justify-content: center;
}

.video-switcher-slide .result-video-card {
  width: min(100%, 980px);
  max-width: 100%;
  margin: 0 auto;
  height: auto;
  padding: 1.15rem;
  transition: width 0.32s ease, height 0.32s ease;
}

.video-switcher-slide .result-video-card.video-card-ultrawide {
  width: min(100%, 1120px);
}

.video-switcher-slide .result-video-card.video-card-portrait {
  width: min(100%, 720px);
}

.video-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.result-video-card .video-frame video {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  max-height: min(72vh, 680px);
  aspect-ratio: auto !important;
  object-fit: contain !important;
  border-radius: 0;
  background: #f8fafc;
}

.result-video-card h4,
.result-video-card p {
  max-width: 100%;
}

@media screen and (max-width: 768px) {
  .video-switcher-slide .result-video-card,
  .video-switcher-slide .result-video-card.video-card-ultrawide,
  .video-switcher-slide .result-video-card.video-card-portrait {
    width: 100%;
    padding: 0.85rem;
  }

  .result-video-card .video-frame video {
    max-height: 62vh;
  }
}

/* ---------- Compact adaptive video switcher ---------- */

.video-switcher-viewport {
  overflow: hidden;
  height: auto;
  transition: height 0.35s ease;
}

.video-switcher-track {
  display: flex;
  align-items: flex-start;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.video-switcher-slide {
  flex: 0 0 100%;
  min-width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: auto;
}

.video-switcher-slide .result-video-card,
.result-video-card {
  height: auto !important;
  min-height: 0 !important;
}

.video-switcher-slide .result-video-card {
  width: fit-content;
  max-width: min(100%, 1080px);
  margin: 0 auto;
  padding: 1.15rem;
}

/* 视频外框跟随视频内容，不再强制撑高 */
.video-frame {
  display: flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.result-video-card .video-frame video {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: min(100%, 1080px);
  max-height: min(64vh, 560px);
  aspect-ratio: auto !important;
  object-fit: contain !important;
  border-radius: 0;
}

/* 文字宽度跟随卡片，但不要超过视频宽度太多 */
.result-video-card h4,
.result-video-card p {
  max-width: min(100%, 1080px);
}

/* 超宽视频：卡片更宽但高度自然收缩 */
.result-video-card.video-card-ultrawide {
  max-width: min(100%, 1180px);
}

.result-video-card.video-card-ultrawide .video-frame video,
.result-video-card.video-card-ultrawide h4,
.result-video-card.video-card-ultrawide p {
  max-width: min(100%, 1180px);
}

/* 竖向视频：卡片变窄 */
.result-video-card.video-card-portrait {
  max-width: min(100%, 620px);
}

.result-video-card.video-card-portrait .video-frame video,
.result-video-card.video-card-portrait h4,
.result-video-card.video-card-portrait p {
  max-width: min(100%, 620px);
}

@media screen and (max-width: 768px) {
  .video-switcher-slide .result-video-card {
    width: 100%;
    max-width: 100%;
    padding: 0.85rem;
  }

  .result-video-card .video-frame,
  .result-video-card .video-frame video {
    width: 100% !important;
    max-width: 100%;
  }

  .result-video-card .video-frame video {
    max-height: 58vh;
  }
}

/* ---------- Display-only demo video ---------- */

.display-only-video {
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.video-frame,
.result-video-card {
  user-select: none;
  -webkit-user-select: none;
}