html {
  scroll-behavior: auto;
}

/* 隐藏滚动条但保持滚动功能 */
body {
  overflow-x: hidden;
  scroll-behavior: auto;
}

.fullscreen-container {
  height: 100vh;
  position: relative;
}

/* 仅在 PC 端启用 overflow: hidden */
@media screen and (min-width: 768px) {
  .fullscreen-container {
    overflow: hidden;
  }
}
/* 版面容器 */
.section-container {
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 每个版面 */
.section {
  height: 100vh;
  width: 100vw;
  overflow-y: hidden;
}

/* 导航点样式 */
.nav-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-dot.active {
  background: #8b5cf6;
  transform: scale(1.2);
}

/* 防止选中文本 */
.no-select {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* 彩色渐变边框按钮 */
.rainbow-button {
  background: linear-gradient(
    45deg,
    #ff6b6b,
    #ffd93d,
    #6bcf7f,
    #4ecdc4,
    #45b7d1,
    #96ceb4,
    #feca57,
    #ff9ff3,
    #54a0ff
  );
  background-size: 300% 300%;
  animation: gradientShift 2s ease infinite;
  padding: 6px;
  border-radius: 50px;
  display: inline-block;
  box-shadow: 0 0 20px rgba(75, 232, 27, 0.6), 0 0 40px rgba(75, 232, 27, 0.4);
}

.rainbow-button-inner {
  background: #8b5cf6;
  border-radius: 44px;
  padding: 24px 80px;
  color: white;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.6s ease;
  min-width: 300px;
}

.rainbow-button:hover .rainbow-button-inner {
  background: #7c3aed;
  transform: translateY(-2px);
}

.rainbow-button:hover {
  box-shadow: 0 0 30px rgba(134, 239, 172, 0.8),
    0 0 60px rgba(134, 239, 172, 0.6);
  animation: gradientShift 1s ease infinite,
    glow 3s ease-in-out infinite alternate;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes glow {
  0% {
    box-shadow: 0 0 20px rgba(134, 239, 172, 0.6),
      0 0 40px rgba(134, 239, 172, 0.4);
  }
  100% {
    box-shadow: 0 0 40px rgba(134, 239, 172, 0.9),
      0 0 80px rgba(134, 239, 172, 0.7);
  }
}

/* 打字机效果样式 */
.typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background-color: #8b5cf6;
  margin-left: 2px;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

/* 打字机文本容器 */
.typewriter-text {
  display: inline-block;
  min-height: 1em;
}

/* 环绕文字旋转动画 */
@keyframes rotateText {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-rotate-text {
  animation: rotateText 6s linear infinite;
  transform-origin: 50% 50%;
}

/* 视频模态框过渡效果 */
#video-modal {
  transition: opacity 0.3s ease;
}

#video-modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#video-modal:not(.hidden) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* 视频元素样式优化 */
#agnes-video {
  object-fit: contain;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .section {
    height: 110vh;
    padding: 2rem 1rem;
  }
}

/* 页脚不在全屏滚动容器内时的处理 */
body.show-footer {
  overflow-y: auto;
}

body.show-footer .fullscreen-container {
  transform: translateY(-100vh);
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 页脚初始状态和显示动画 */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  transform: translateY(100%);
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 30;
}

body.show-footer footer {
  transform: translateY(0);
}

.editor-text.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Section 5 图片轮播样式 */
.image-slideshow-stack {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  height: 60vh;
  max-width: 1000px;
  max-height: 700px;
}

.slideshow-image {
  position: absolute;
  width: 100%;
  /* height: 100%; */
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25), 0 10px 20px rgba(0, 0, 0, 0.15);
  /* object-fit: contain; */
  background: transparent !important;
  background-color: transparent !important;
}

.slideshow-image:first-child {
  opacity: 1;
}

@keyframes glow {
  0% {
    box-shadow: 0 0 20px rgba(134, 239, 172, 0.6),
      0 0 40px rgba(134, 239, 172, 0.4);
  }
  100% {
    box-shadow: 0 0 40px rgba(134, 239, 172, 0.9),
      0 0 80px rgba(134, 239, 172, 0.7);
  }
}

/* 分词汇聚动画样式 */
.word-converge-container {
  position: relative;
  display: inline-block;
  width: 100%;
  text-align: center;
}

.word-converge {
  display: inline-block;
  opacity: 0;
  position: relative;
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.word-converge.animate {
  opacity: 1;
  transform: translate(0, 0) !important;
}

/* 初始位置 */
.word-think {
  transform: translateX(-200px);
}

.word-ampersand {
  transform: translateY(-50px) rotate(180deg);
}

.word-create {
  transform: translateX(200px);
}

.word-as-one {
  transform: translateY(80px);
}

/* 最终位置（完成后的布局） */
.word-converge-final .word-think {
  transform: none;
}

.word-converge-final .word-ampersand {
  transform: none;
}

.word-converge-final .word-create {
  transform: none;
}

.word-converge-final .word-as-one {
  transform: none;
}

/* 第三个section卡片动画 */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.card-left {
  animation: slideInLeft 0.8s ease-out forwards;
  animation-delay: 0.3s;
  opacity: 0;
  animation-fill-mode: both;
}

.card-right {
  animation: slideInRight 0.8s ease-out forwards;
  animation-delay: 0.5s;
  opacity: 0;
  animation-fill-mode: both;
}

.card-animated {
  transition: all 0.3s ease;
}

.card-animated:hover {
  transform: perspective(1000px) rotateY(-5deg) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.card-right.card-animated:hover {
  transform: perspective(1000px) rotateY(5deg) scale(1.02);
}

.float-animation {
  animation: float 4s ease-in-out infinite;
  animation-delay: 1s;
}

/* 确保卡片在页面加载时可见 */
.cards-visible .card-left,
.cards-visible .card-right {
  opacity: 1;
  animation-play-state: running;
}

/* Section 4 新动画样式 */
.reviewer-workflow-container {
  transition: all 1s ease-out;
  text-align: center;
  max-width: 35%;
  margin-left: 0;
}

.reviewer-workflow-container.slide-left {
  text-align: left;
  transform: translateX(-30%);
  /* margin-left: 2.5rem; */
}

.workflow-title {
  opacity: 0;
  font-size: 2.8rem;
}

.workflow-title.typing {
  opacity: 1;
}

.workflow-text {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease-out;
  font-size: 0.95rem;
  line-height: 1.5;
}

.workflow-text.visible {
  opacity: 1;
  transform: translateY(0);
}

.highlight-text {
  background-color: #8b5cf6;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 400;
  font-family: Georgia, "Times New Roman", Times, serif;
}

.image-stack {
  position: absolute;
  right: 3%;
  top: 60%;
  transform: translateY(-50%);
  width: 60vw;
  height: 40vw;
}

.stack-image {
  position: absolute;
  width: 100%;
  /* height: 100%; */
  opacity: 0;
  transform: translateY(100px);
  transition: opacity 0.6s ease-in;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25), 0 10px 20px rgba(0, 0, 0, 0.15);
  /* object-fit: contain; */
  background: transparent !important;
  background-color: transparent !important;
}

.stack-image.visible {
  opacity: 1;
  transform: translateY(0);
  transition: all 1s ease-out;
}

.stack-image:nth-child(1) {
  z-index: 1;
}

.stack-image:nth-child(2) {
  z-index: 2;
  transform: translateY(100px) translateX(-20px) translateZ(10px);
  backdrop-filter: blur(1px);
}

.stack-image:nth-child(2).visible {
  transform: translateX(-20px) translateY(-10px);
}

.stack-image:nth-child(3) {
  z-index: 3;
  transform: translateY(100px) translateX(-40px) translateZ(20px);
  backdrop-filter: blur(2px);
}

.stack-image:nth-child(3).visible {
  transform: translateX(-40px) translateY(-20px);
}

.stack-image:nth-child(4) {
  z-index: 4;
  transform: translateY(100px) translateX(-60px) translateZ(30px);
  backdrop-filter: blur(3px);
}

.stack-image:nth-child(4).visible {
  transform: translateX(-60px) translateY(-30px);
}

/* 打字机光标 */
.workflow-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background-color: #8b5cf6;
  margin-left: 2px;
  animation: blink 1s infinite;
}

@media (max-width: 1180px) {
  .reviewer-workflow-container.slide-left {
    transform: translateX(0%);
  }
}

@media (max-width: 768px) {
  .workflow-title {
    font-size: 2rem;
  }

  .workflow-text {
    font-size: 0.75rem;
  }

  .image-stack {
    width: 400px;
    height: 300px;
    right: 5%;
  }
}

/* Section 6 页脚显示动画 */
.section-6-footer {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease-out;
  pointer-events: none;
}

.section-6-footer.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* 打字机完成后的文字显示 */
.editor-text.instant-show {
  opacity: 1 !important;
  transform: translateY(0) !important;
}
/* 手机端竖屏专用样式 */
@media (max-width: 768px) and (orientation: portrait) {
  /* Center logo in nav */
  nav .container {
    justify-content: center;
    position: relative;
  }
  nav .container > div:first-child {
    margin-left: auto;
    margin-right: auto;
  }

  /* 1. 头部隐藏（除了第一个section） */
  nav {
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  body.hide-nav nav {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
  }

  /* 2. 移动端使用汉堡包菜单 */
  nav .hidden {
    display: none !important;
  }

  /* Mobile menu button */
  #mobile-menu-btn {
    display: none;
  }

  @media (max-width: 768px) {
    #mobile-menu-btn {
      display: block;
    }
  }

  /* 导航栏容器调整 */
  nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* flex-wrap: wrap; */
  }

  /* 调整logo大小 */
  nav img {
    height: 1.5rem !important;
  }

  .section:first-child {
    height: 60vh;
  }

  /* 1. 第一个section - Agnes AI字体变小，保持一行 */
  .section:first-child h1 {
    margin-top: 2rem;
    font-size: 2.5rem !important;
    line-height: 1.1 !important;
  }

  .section:first-child h2 {
    margin-top: -1rem;
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
  }

  .section:first-child p {
    margin-top: -1rem;
    font-size: 1.25rem !important;
    color: black;
  }

  /* 2. 第二个section调整 */
  .section:nth-child(2) {
    padding: 2rem 1rem;
    height: 30vh;
  }

  /* 3. 第三个section隐藏，但在第二个section中显示其内容 */
  .section:nth-child(3) {
    display: block;
    height: 96vh;
    background-color: rgb(249, 250, 251);
  }
  .section:nth-child(4) {
    height: 145vh;
  }

  /* 3. 播放按钮和环绕文字向下移动 */
  .section:nth-child(2) .container > div:first-child {
    margin-top: -1.5rem;
    /* margin-bottom: 0rem; */
  }

  /* 显示移动端第三个section内容 */
  .mobile-section-3-content {
    display: block !important;
    margin-top: -5rem;
  }

  /* 4. 蓝色卡片向上移动 */
  .mobile-section-3-content .card-right {
    margin-top: -1.2rem;
  }

  /* 第二个section视频部分保持在上方 */
  .section:nth-child(2) .container {
    flex-direction: column;
    gap: 2rem;
  }

  /* 4. 第四个section保持显示，改为上下布局，不显示页脚 */
  .section:nth-child(4) {
    padding: 0rem 1rem;
    display: flex !important; /* 确保显示 */
    flex-direction: column;
  }

  .section:nth-child(4) .container {
    flex-direction: column;
    max-width: 100%;
    flex: 1;
  }

  .reviewer-workflow-container {
    max-width: 100% !important;
    margin: 0 auto !important;
    text-align: center !important;
    order: 1;
  }

  .reviewer-workflow-container.slide-left {
    transform: none !important;
    text-align: center !important;
  }

  .workflow-title {
    font-size: 1.75rem !important;
    margin-bottom: 1.5rem !important;
  }

  .workflow-text {
    font-size: 1rem !important;
    text-align: left !important;
    margin-bottom: -1rem !important;
  }

  /* 第四个section图片去除白框 */
  .image-stack {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    right: auto !important;
    top: 1rem !important;
    transform: none !important;
    margin-top: 1rem !important;
    order: 2;
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .stack-image {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    margin-bottom: -1rem;
    opacity: 0;
    transition: opacity 0.6s ease-in !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .stack-image.visible {
    opacity: 1 !important;
    transform: none !important;
  }

  .stack-image:nth-child(2),
  .stack-image:nth-child(3) {
    transform: none !important;
    backdrop-filter: none !important;
    background: transparent !important;
  }

  .stack-image:nth-child(2).visible,
  .stack-image:nth-child(3).visible {
    transform: none !important;
  }

  /* 第四个section隐藏移动端页脚内容 */
  .section:nth-child(4) .mobile-footer-content {
    display: none !important;
  }

  /* 5. 第五个section显示，包含轮播和第六个section内容 */
  .section:nth-child(5) {
    padding: 2rem 1rem;
    display: flex !important;
    flex-direction: column;
  }

  .section:nth-child(5) .container {
    flex-direction: column;
    gap: 2rem;
    flex: 1;
  }

  .image-slideshow-stack {
    position: relative !important;
    left: auto !important;
    top: 3vh;
    transform: none !important;
    width: 100% !important;
    /* height: 250px !important; */
    max-width: none !important;
    max-height: 30vh !important;
    order: 1;
  }

  /* 显示移动端第六个section内容 */
  .mobile-section-6-content {
    display: block !important;
    order: 2;
    height: 100vh;
  }

  /* 6. 第六个section隐藏 */
  .section:nth-child(6) {
    display: none;
  }

  /* 7. 页脚显示在第五个section底部 */
  .section:nth-child(5) .mobile-footer-content {
    display: block !important;
    background: #f9fafb;
    padding: 1rem 0rem;
    border-top: 1px solid #e5e7eb;
    margin-top: -1rem;
    order: 3;
  }

  /* 隐藏原始页脚 */
  footer {
    display: none !important;
  }

  .mobile-footer-content {
    margin-left: -2rem;
    width: calc(100% + 4rem);
  }

  /* 页脚内容样式 */
  .mobile-footer-content .grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0rem !important;
    text-align: center !important;
    /* margin-top: 2rem; */
    margin-left: 2rem;
  }

  /* 隐藏Agnes AI Logo部分 */
  .mobile-footer-content .grid > div:first-child {
    display: none !important;
  }

  .mobile-footer-content .text-center {
    text-align: left !important;
  }

  .mobile-footer-content h3 {
    margin-bottom: 0.75rem !important;
    font-size: 0.875rem !important;
    /* font-size: 0.8125rem !important; */
  }

  .mobile-footer-content .text-xl {
    font-size: 1rem !important;
    margin-bottom: 0.5rem !important;
  }

  .mobile-footer-content .space-y-2 > * {
    margin-bottom: 0.25rem !important;
  }

  /* 移动端卡片样式调整 */
  .card-left,
  .card-right {
    height: 14rem !important;
    padding: 1rem !important;
    margin-bottom: 1rem;
  }

  .card-left h4,
  .card-right h4 {
    font-size: 1rem !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.2;
  }

  .card-left p,
  .card-right p {
    font-size: 0.9rem !important;
    line-height: 1.3 !important;
  }

  /* 按钮调整 */
  .rainbow-button-inner {
    padding: 16px 40px !important;
    font-size: 1rem !important;
    min-width: 200px !important;
  }

  /* 导航点在移动端的调整 - 显示4个点对应4个section */
  .nav-dot {
    width: 8px !important;
    height: 8px !important;
  }

  /* 隐藏第5、6个导航点，只显示前4个 */
  .nav-dot:nth-child(n + 5) {
    display: none;
  }

  .fixed.right-6 {
    right: 1rem !important;
    gap: 0.75rem !important;
  }

  /* ===== Liquid Glass Nav Effect ===== */
  nav {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    background: rgba(255, 255, 255, 0.25) !important; /* base translucency */
    backdrop-filter: blur(12px) saturate(180%) contrast(120%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(180%) contrast(120%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    overflow: hidden; /* make sure pseudo stays clipped */
  }

  /* gradient sheen overlay */
  nav::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.6) 0%,
      rgba(255, 255, 255, 0.15) 100%
    );
    pointer-events: none;
    mix-blend-mode: overlay;
  }
  /* slight inner shadow to enhance glass depth */
  nav::after {
    content: "";
    position: absolute;
    inset: 0;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.05);
    pointer-events: none;
  }

  /* elevate hamburger button visibility */
  #mobile-menu-btn svg {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  }
}

@media (max-width: 768px) {
  #mobile-menu-btn {
    display: block;
  }
  nav .container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  /* Ensure nav logo stays small */
  nav img {
    text-align: left;
    width: auto !important;
    height: 2rem !important;
  }
}

#mobile-menu-btn {
  margin-left: auto;
}

/* 移动端卡片进入动画 */
@keyframes mobileSlideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes mobileSlideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mobile-section-3-content .card-left {
  opacity: 0;
  transform: translateX(-100px);
}

.mobile-section-3-content .card-right {
  opacity: 0;
  transform: translateX(100px);
}

.mobile-section-3-content.animate-cards .card-left {
  animation: mobileSlideInLeft 0.8s ease-out forwards;
}

.mobile-section-3-content.animate-cards .card-right {
  animation: mobileSlideInRight 0.8s ease-out forwards;
  animation-delay: 0.2s;
}

#mobileMenu {
  background: rgba(255, 255, 255, 0.25) !important; /* base translucency */
  backdrop-filter: blur(12px) saturate(180%) contrast(120%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(180%) contrast(120%) !important;
}

#mobileMenu a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: #374151;
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 500;
}

#mobileMenu a:first-child {
  color: #8b5cf6;
  font-weight: 600;
}
