/* Fonts */
@font-face {
    font-family: 'LeagueSpartan';
    src: url(https://static.igem.wiki/teams/5087/fonts/leaguespartan-variablefont-wght.ttf);
  }
  
  /* 全局平滑滚动 */
  html {
    scroll-behavior: smooth;
  }
  
  body,
  html {
    margin: 0;
    padding: 0;
    background-color: #f3fff8;
    overflow-x: hidden;
  }
  
  /* 为所有图片添加平滑过渡 */
  img {
    transition: transform 0.4s ease, filter 0.3s ease;
  }
  
  /* 仅为第一个section的图片添加悬停效果 */
  .section-1 img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
  }
  
  .bolded-text {
    font-size: 3rem;
    color: #714CB9;
    text-align: center;
    font-weight: bold;
    animation: fadeInUp 1s ease-out;
    margin: auto;
  }
  
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
  
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .full-width-image {
    width: 100vw;
    height: auto;
    display: block;
    animation: fadeIn 1.2s ease-in;
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
    }
  
    to {
      opacity: 1;
    }
  }
  
  .half-width-image {
    width: 50%;
    height: auto;
    margin-left: 20px;
  }
  
  .full-width-rectangle-yellow {
    width: 100%;
    background-color: #cdbef5;
    border-radius: 25px;
    padding: 20px;
    box-sizing: border-box;
    transition: background-color 0.5s ease;
  }
  
  .section-1 {
    width: 100%;
    background-color: #f0f3ff9b;
    padding-bottom: 15%;
    padding-top: 80px;
    box-sizing: border-box;
    height: auto;
    position: relative;
    display: block;
    animation: sectionFadeIn 1s ease-out;
  }
  
  @keyframes sectionFadeIn {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
  
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .section-2 {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background-color: #ace8f1;
    margin: 0;
    padding: 0;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden;
    animation: backgroundSlide 1.5s ease-in-out;
  
  }
  
  @keyframes backgroundSlide {
    from {
      opacity: 0.7;
      transform: translateX(-50px);
    }
  
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  .section-3 {
    width: 100%;
    background-color: #ffcd4e;
    padding-top: 0;
    box-sizing: border-box;
    height: auto;
    margin-top: 0;
    position: relative;
    overflow: hidden;
    padding-bottom: 10%;
  }
  
  .section-4 {
    width: 100%;
    background-color: #f3fff8;
    padding: 20px;
    box-sizing: border-box;
    height: auto;
    margin-top: 0;
    position: relative;
    display: block;
    padding-bottom: 0;
  }
  
  .section-5 {
    width: 100%;
    background-color: #9ce195ff;
    padding: 20px;
    box-sizing: border-box;
    height: 500px;
    position: relative;
    display: block;
    margin-top: 0;
  }
  
  /* 波浪动画增强 */
  .ocean {
    height: 15%;
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    background: #ace8f1ff;
    margin: 0;
    padding: 0;
  }
  
  .wave {
    background: url("https://static.igem.wiki/teams/5087/pics/homepage/fala-1.svg") repeat-x;
    position: absolute;
    width: 100%;
    top: -198px;
    left: 0;
    height: 198px;
    transform: translate(0, 0, 0);
    animation: wave 7s cubic-bezier(0.36, 0.45, 0.63, 0.53) infinite;
    will-change: transform;
  }
  
  .wave:nth-of-type(2) {
    top: -168px;
    animation: swell 5s cubic-bezier(0.36, 0.45, 0.63, 0.53) infinite;
    opacity: 1;
  }
  
  .wave:nth-of-type(3) {
    top: -138px;
    animation: roll 8s cubic-bezier(0.36, 0.45, 0.63, 0.53) infinite;
    opacity: 0.7;
  }
  
  @keyframes wave {
  
    0%,
    100% {
      background-position: 0 0;
      transform: translateY(0);
    }
  
    50% {
      background-position: 100% 0;
      transform: translateY(-10px);
    }
  }
  
  @keyframes swell {
  
    0%,
    100% {
      transform: translate(0, -30px) scale(1);
    }
  
    50% {
      transform: translate(0, 5px) scale(1.02);
    }
  }
  
  @keyframes roll {
  
    0%,
    100% {
      transform: translate(0, -20px) rotate(0deg);
    }
  
    50% {
      transform: translate(0, 10px) rotate(0.5deg);
    }
  }
  
  .contain {
    justify-content: space-between;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 0px;
    box-sizing: border-box;
    height: auto;
    margin-bottom: 0;
  }
  
  .contain-2 {
    justify-content: space-between;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 0px;
    box-sizing: border-box;
    height: auto;
  }
  
  /* Box样式优化 */
  .box-1 {
    width: 33%;
    height: auto;
  }
  
  .box-3 {
    width: 33%;
    height: 100%;
    margin-top: 18%;
    transform: translateX(-20%);
    margin-right: 30px;
  }
  
  .box-5 {
    width: 30%;
    height: auto;
    position: absolute;
    margin-top: 50%;
    margin-left: 85%;
  }
  
  .box-4 {
    width: 35%;
    position: absolute;
    height: auto;
    margin-left: 30px;
    margin-top: 55%;
  
  }
  
  .box-5 img {
    margin-left: -97%;
  }
  
  .box-1 img {
    margin-top: 85px;
  }
  
  .box-2 {
    width: 30%;
    height: 100%;
  }
  
  .box-6 {
    width: 100%;
    height: 20%;
  }
  
  .box-10 {
    width: 45%;
    height: 85%;
    margin-top: 20px;
    padding-top: 5%;
    padding-bottom: 0;
  }
  
  .box-8 {
    width: 40%;
    margin-top: 100px;
    /* 上下外边距 */
  
    margin-right: 0;
    padding: 24px 32px;
    background: linear-gradient(135deg, #e0d3f3 0%, #d4c2f7 100%);
    border-radius: 16px;
    border: 1px solid rgba(112, 76, 185, 0.2);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    color: #0e0116;
    line-height: 1.6;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    max-height: 400px;
    max-width: 600px;
  }
  
  .box-8 p,
  .box-8 ul,
  .box-8 li {
    font-size: 1.35rem;
    /* 统一字号 */
    line-height: 1.6;
    margin: 0;
    /* 去掉默认外边距 */
    padding: 0;
    /* 去掉默认内边距 */
  }
  
  .box-8 ul {
    list-style-type: disc;
    /* 需要小圆点就加，不要就写 none */
    padding-left: 1.5rem;
    /* 给列表加点缩进 */
  }
  
  .box-8::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
  }
  
  .box-8:hover::before {
    left: 100%;
  }
  
  .box-8:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(112, 76, 185, 0.3);
  }
  
  
  .box-8-1 {
    width: 40%;
    margin-top: 15%;
    margin-bottom: 20px;
    /* 上下外边距 */
  
    margin-right: 0;
    padding: 24px 32px;
    background: linear-gradient(135deg, #ffea82 0%, #ffd966 100%);
    border-radius: 16px;
    border: 1px solid rgba(112, 76, 185, 0.2);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    color: #0e0116;
    line-height: 1.6;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    /* max-height: 400px;
    max-width: 600px; */
  }
  
  /* 悬停效果：稍微抬起 */
  .box-8-1:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  }
  
  /* 悬停效果：稍微抬起 */
  .box-8-1:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  }
  
  .box-8-1 p {
    margin: 0;
    /* 去掉段落默认的外边距 */
    font-size: 1.3rem;
    /* 控制字号 */
  }
  
  .box-8-1::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
  }
  
  .box-8-1:hover::before {
    left: 100%;
  }
  
  .box-8-1:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(255, 205, 78, 0.4);
  }
  
  .box-9 {
    width: 45%;
    height: 85%;
    margin-top: 20px;
    padding-bottom: 0;
    bottom: 0;
  }
  
  .box-7 {
    width: 50%;
    height: 85%;
    margin-top: 10%;
    margin-bottom: 20px;
    padding-bottom: 0;
    bottom: 0px;
  }
  
  .box-11 {
    width: 40%;
    height: auto;
    margin-bottom: 10%;
  }
  
  .box-11-2 {
    width: 100%;
    height: auto;
    margin-left: 0px;
    display: block;
    margin: 0 auto;
  }
  
  .box-14 {
    width: 35%;
    height: 60%;
    margin-top: 100px;
    margin-left: 80px;
  }
  
  .box-15 {
    width: 50%;
    height: auto;
    margin-bottom: 5%;
  }
  
  .box-12 {
    width: 40%;
    height: 45%;
    padding-top: 10%;
    align-items: center;
  }
  
  .box-12-2 {
    width: 40%;
    height: 45%;
    padding-top: 10%;
    align-items: center;
  }
  
  .box-13 {
    width: 10%;
    height: 45%;
    padding-top: 10%;
  }
  
  .box-16 {
    width: 100%;
    height: 100%;
    margin-bottom: 70px;
  }
  
  .box-17 {
    width: 50%;
    height: 100%;
    padding-right: 10%;
    margin-top: 18%;
  }
  
  /* 视频框增强 */
  .video-frame {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 20px solid #fff4c4;
    border-radius: 15px;
    width: 840px;
    height: 500px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
  }
  
  .video-frame:hover {
    transform: translate(-50%, -50%) scale(1.02);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  }
  
  iframe {
    width: 100%;
    height: 100%;
    display: block;
  }
  
  .image-iframe-container {
    position: relative;
    width: 100%;
    box-sizing: border-box;
  }
  
  .image-container {
    position: relative;
    width: 100%;
  }
  
  /* 浮动动画增强 */
  .floating {
    animation: floating 4s ease-in-out infinite;
    will-change: transform;
  }
  
  @keyframes floating {
  
    0%,
    100% {
      transform: translate(0, 0px);
    }
  
    25% {
      transform: translate(5px, -15px);
    }
  
    50% {
      transform: translate(0, -25px);
    }
  
    75% {
      transform: translate(-5px, -15px);
    }
  }
  
  /* 滑入动画优化 - 简洁淡入 */
  @keyframes slide-in-left {
    0% {
      transform: translateX(-30px);
      opacity: 0;
    }
  
    100% {
      transform: translateX(0);
      opacity: 1;
    }
  }
  
  .slide-left-hidden {
    transform: translateX(-30px);
    opacity: 0;
    visibility: hidden;
  }
  
  .slide-left-in-view {
    animation: slide-in-left 0.8s ease-out forwards;
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
  }
  
  @keyframes slide-in-right {
    0% {
      transform: translateX(30px);
      opacity: 0;
    }
  
    100% {
      transform: translateX(0);
      opacity: 1;
    }
  }
  
  .slide-right-hidden {
    transform: translateX(30px);
    opacity: 0;
    visibility: hidden;
  }
  
  .slide-right-in-view {
    animation: slide-in-right 0.8s ease-out forwards;
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
  }
  
  @keyframes slide-up {
    0% {
      transform: translateY(30px);
      opacity: 0;
    }
  
    100% {
      transform: translateY(0);
      opacity: 1;
    }
  }
  
  .slide-up-hidden {
    transform: translateY(30px);
    opacity: 0;
    visibility: hidden;
  }
  
  .slide-up-in-view {
    animation: slide-up 0.8s ease-out forwards;
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }
  
  /* 计数器增强 */
  .counter {
    font-size: 50px;
    font-weight: bold;
    color: #714CB9;
    text-align: center;
    margin-top: 25px;
    margin-bottom: 25px;
    animation: pulse 2s ease-in-out infinite;
  }
  
  @keyframes pulse {
  
    0%,
    100% {
      transform: scale(1);
    }
  
    50% {
      transform: scale(1.05);
    }
  }
  
  .overlay {
    width: 100%;
    height: 20%;
    position: absolute;
    text-align: center;
    display: flex;
    z-index: 1;
    top: 10%;
    color: #343a40;
    font-size: 40px;
    font-weight: bold;
    justify-content: center;
  }
  
  .overlay-box {
    width: 50%;
    animation: fadeInScale 1.5s ease-out;
  }
  
  @keyframes fadeInScale {
    from {
      opacity: 0;
      transform: scale(0.8);
    }
  
    to {
      opacity: 1;
      transform: scale(1);
    }
  }
  
  /* 标题动画增强 */
  .header_text {
    margin: 0;
    padding-bottom: 6rem;
    min-width: 500px;
    grid-column: 1;
    grid-row: 1;
    z-index: 1;
    text-align: center;
    animation: titleEntrance 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  
  @keyframes titleEntrance {
    0% {
      opacity: 0;
      transform: translateY(-50px) scale(0.9);
    }
  
    50% {
      transform: translateY(10px) scale(1.05);
    }
  
    100% {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
  
  .title-logo {
    width: 40%;
    max-width: 600px;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 10px 20px rgba(113, 76, 185, 0.3));
    transition: all 0.4s ease;
  }
  
  .title-logo:hover {
    transform: scale(1.05) rotate(2deg);
    filter: drop-shadow(0 15px 30px rgba(113, 76, 185, 0.5));
  }
  
  .header_text span {
    display: inline-block;
    margin-right: -0.2em;
  }
  
  @keyframes glow {
    from {
      text-shadow: 0 0 40px #ffd414;
    }
  
    to {
      text-shadow: 0 0 40px #f9e27b, 0 0 10px #fbf7d6;
    }
  }
  
  /* 段落文字淡入 */
  p {
    animation: textFadeIn 1s ease-out;
  }
  
  @keyframes textFadeIn {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
  
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* 列表项动画 */
  ul li {
    animation: listItemSlide 0.6s ease-out backwards;
  }
  
  ul li:nth-child(1) {
    animation-delay: 0.1s;
  }
  
  ul li:nth-child(2) {
    animation-delay: 0.2s;
  }
  
  ul li:nth-child(3) {
    animation-delay: 0.3s;
  }
  
  @keyframes listItemSlide {
    from {
      opacity: 0;
      transform: translateX(-20px);
    }
  
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  /* 行容器淡入 */
  .row {
    animation: rowFadeIn 1s ease-out;
  }
  
  @keyframes rowFadeIn {
    from {
      opacity: 0;
    }
  
    to {
      opacity: 1;
    }
  }
  
  /* 移动端优化 */
  @media screen and (max-width: 768px) {
  
    .box-1,
    .box-2,
    .box-3,
    .box-4,
    .box-5,
    .box-6,
    .box-7,
    .box-8,
    .box-9,
    .box-10,
    .box-11,
    .box-12,
    .box-13,
    .box-14,
    .box-15,
    .box-17 {
      flex: 1 1 95%;
    }
  
    .box-16 {
      flex: 1 1 110%;
      margin-bottom: 0;
    }
  
    .box-2,
    .box-5,
    .box-13,
    .box-10 {
      display: none;
    }
  
    .box-4 {
      width: 100%;
      margin-top: 0;
      position: relative;
    }
  
    .box-8 img,
    .box-5 img,
    .box-16 {
      width: 100%;
    }
  
    .header_text {
      font-size: 5.2rem;
      padding-right: 40%;
      padding-left: 10%;
    }
  
    .overlay-box {
      font-size: 20px;
      width: 100%;
    }
  
    .video-frame {
      width: 100%;
      height: auto;
    }
  
    .section-5 {
      height: 300px;
    }
  }
  
  /* 导航与下拉里的任何动画全部禁用 */
  .navbar *,
  .dropdown-menu * {
    animation: none !important;
  }