:root {
    --background-color: #f0f0f0;
    --white: #ffffff;
    --black: #000000;
}

body {
    padding: 0;
    margin: 0;
    /* overflow: hidden; */
    height: 100%;
    /* min-height: 100vh; */
    background-color: var(--background-color);
}

/* 鼠标 */

.custom-cursor-container {
    position: fixed;
    pointer-events: none;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9; 
  }

  .custom-cursor-trail {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    position: absolute;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference; /* 混合模式，增强光标的可见性 */
    transition: opacity 0.2s ease-out; /* 添加透明度的过渡效果 */
    background-color: var(--black); /* 设置拖尾元素的颜色 */
    opacity: 0.6; /* 控制拖尾效果的透明度 */
  }

.floating-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* click按钮 */

.click-trigger-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.click-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--white);
    z-index: 2;
}

/* 半圆 */

.half-circle-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.half-circle {
    width: 150px;
    height: 75px;
    border-radius: 100px 100px 0 0;
    position: absolute;
    bottom: -37.5px;
    left: 50%;
    transform-origin: bottom center;
    transition: transform 0.5s ease-in-out, opacity 1s ease-in-out;
    overflow: hidden;
}

.half-circle img {
    width: 100%;
    height: auto;
    clip-path: polygon(0 0, 100% 0, 100% 50%, 0% 50%);
}

.half-circle1 {
    transform: translateX(-50%) translateY(-50%) rotate(30deg);
}

.half-circle2 {
    transform: translateX(-50%) translateY(-50%) rotate(210deg);
}

/* 导航栏 */

#custom-navbar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: var(--black);
    display: none;
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    animation: slideIn 1s ease-in-out forwards;
    z-index: 10;
}


.custom-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 20px 0 0;
}

.logo, .logo img {
    height: 70px;
    width: auto;
    overflow: hidden;
    background-color: var(--white);
}


.custom-nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    height: 100%;
}

.custom-nav-link {
    /* width: 100px; */
    margin: 0 0px;
    padding: 0;
    font-size: 20px;
}

.custom-link {
    padding: 20px 20px;

    position: relative;
    
    display: flex;
    justify-content: center;
    text-decoration: none;
    background-color: black;
    white-space: nowrap;
}
.up,.down{
    line-height: 70px;
    position: absolute;
    color: white;
    top: 0;
    transition: 0.3s;
}
.down{

    clip-path: inset(49% 0 0 0);
}
.up{
    clip-path: inset(1% 0 50% 0);
}
.custom-link:hover {
    text-decoration: none;
}
.custom-link:hover .up,.custom-link:hover .down{
    top: calc(var(--i)*1px);
}  
.custom-link:hover .split{
    opacity: 1;
}
.split {
    text-decoration: none;
    color: transparent;
    opacity: 0;
    transition: 0.1s;
}

.custom-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://static.igem.wiki/teams/4980/wiki/image/small-sword.png'); 
    background-size: 100% 50%;
    background-repeat: no-repeat;
    background-position: right;
    opacity: 0;
    transition: opacity 0.3s;
    /* z-index: 0; */
    overflow: visible;
}
.custom-link:hover::before {
    opacity: 1;
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(-100%);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 导航下拉菜单 */

.custom-dropdown {
    position: relative;
    display: inline-block;
}

.custom-dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--black);
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 10;
    left: 50%;
    top: 100%;  /* 使下拉菜单的上边缘与其父元素的下边缘对齐 */
    transform: translateX(-50%);
}

.custom-dropdown-content a {
    color: var(--white);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: center;
    white-space: nowrap;
}

.custom-dropdown-content.left {
    left: -10%;
}

.custom-nav-link:hover .custom-dropdown-content {
    display: block;
}

.custom-dropdown-content a:hover {
    color: black;
    text-decoration: none;
    background-color: var(--white);
}


/* 移动端按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    margin-left: 40px;
    overflow: hidden;
}

.menu-toggle span {
    background-color: var(--white);
    height: 3px;
    width: 25px;
    margin-bottom: 4px;
    border-radius: 2px;
}

/* 媒体查询：小于768px的屏幕尺寸 */
@media screen and (max-width: 900px) {
    .menu-toggle {
        display: flex;
    }
    .custom-navbar{
        width: 100%;
    }
    .custom-nav-links {
        position: absolute;
        top: 243px;
        right: 0;
        background-color: var(--black);
        flex-direction: column;
        width: 50%;  /* 主导航的宽度 */
        display: none;
        align-items: center;
    }

    .custom-nav-link {
        width: 100%;
        text-align: center;
        position: relative;
    }

    .custom-link {
        width: 100%;
        display: block;
        text-align: center;
    }

    .up, .down{
        display: none;
    }
    .split {
        font-size: 13px;
        
        color: white;
        opacity: 1;
    }
    .custom-link::before{
        display: none;
    }

    .custom-dropdown-content {
        position: fixed; 
        top: 66px; 
        left: 25%; 
        width: 50%;     
        height: 600%;
        background-color: var(--black);
        display: none;    /* 默认隐藏 */
        flex-direction: column;
    }

    .custom-dropdown-content.left {
        left: 25%;
    }

    .custom-dropdown-content a{
        font-size: 13px;
        padding: 20px 0;
    }
    
    /* 当主导航项被悬停时，显示子菜单 */
    .custom-nav-link:hover .custom-dropdown-content {
        display: flex;
    }
}


/* 页面容器 */

.page-container {
    position: relative;
    width: 100%;
    background-color: var(--background-color);

    /* overflow-x: hidden;  */
    /* overflow-y: scroll; */
    display: none;

}

/* 背景图 */

.image-container {
    width: 100%;
    min-height: 110vh;
    background-image: url(https://static.igem.wiki/teams/4980/wiki/image/background1.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-color: var(--background-color);
    opacity: 0;
    animation: fadeIn 2s ease-in-out forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}


/* 内容容器 */

.content-container {
    width: 100%;
    min-height: 100vh;
    position: relative;
    /* background-image: url('./image/background2.png');  
    background-size: 145%;  
    background-repeat: no-repeat;  
    background-attachment: scroll;  */
}

/* svg背景 */

.svg-container {
    width: 100%;
    height: 600vh;
    position: absolute;
    /* background-color: plum; */
}

.svg-container img{
    width: 100%;
    margin-top: 4%;
    /* background-color: lightblue; */
}

svg {
    height: 100%;
    width: 100%;
    /* background-color: pink; */
}



/* 内容盒子 */

.box {
    width: 100%;
    margin: 0 0;
    /* background: rebeccapurple; */
    text-align: center;
}

.box img {
    width: 70%;
    height: auto;
    /* background-color: pink; */
}

.box-text {
    display: flex;
    align-items: center;
    flex-direction: column;
    /* font-family: Agency FB; */
    width: 110vh; 
    height: auto;
    margin: 0 30px;
  
    font-size: 1.5em;
    color: white;
}
.box-text p{
    margin-top: 0;
    position: relative;
    top: 11px;
    text-shadow:1px 1px #000;
}
#ink-drop {
    display: flex; 
    align-items: center; 
    justify-content: center; 

    position: absolute;
    height: 100vh; 
    background-image: url(https://static.igem.wiki/teams/4980/wiki/image/ink-drop.png);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    margin-top: -148vh;
    transform: translateY(-150vh);
    /* background-color: pink; */
}

#box1 {
    height: 140vh;
    margin-top: 73vh;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    background-image: url(https://static.igem.wiki/teams/4980/wiki/image/picture1.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: right center;
    /* background-color: pink; */
}

#box2 {
    height: 140vh;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    background-image: url(https://static.igem.wiki/teams/4980/wiki/image/picture2.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
    /* background-color: pink; */
}

#box3 {
    height: 140vh;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    background-image: url(https://static.igem.wiki/teams/4980/wiki/image/picture3.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: right center;
    /* background-color: pink; */
}

#box4 {
    height: 140vh;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    background-image: url(https://static.igem.wiki/teams/4980/wiki/image/picture4.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left center;
    /* background-color: pink; */
}

/* 卡片 */

.card-container{
    display: none;
    flex-direction: column;
    align-items: center;
    min-height: 20vw;
    padding-top: 50px;
    background-color: var(--background-color);
}

.card-content {
    display: flex;
    flex-direction: row; /* 横向排列 */
    justify-content: center;
    align-items: center;
    /* 100%视口高度，一屏高 */
    background-color: var(--background-color);
}


.custom-card {
    width: 16vw;
    height: 25vw;
    margin: 0 0 45px 0;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* 用于裁剪伪元素 */
    font-size: 18px;
    text-decoration: none;
    color: white;
    
    background-color: transparent;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.5s; /* 添加过渡效果 */
}

.custom-card:nth-child(1){
    background-image: url(https://static.igem.wiki/teams/4980/wiki/image/home/f-design.png);
}
.custom-card:nth-child(2){
    background-image: url(https://static.igem.wiki/teams/4980/wiki/image/home/f-results.png);
}
.custom-card:nth-child(3){
    background-image: url(https://static.igem.wiki/teams/4980/wiki/image/home/f-hp.png);
}
.custom-card:nth-child(4){
    background-image: url(https://static.igem.wiki/teams/4980/wiki/image/home/f-i.png);
}
.custom-card:nth-child(5){
    background-image: url(https://static.igem.wiki/teams/4980/wiki/image/home/f-c.png);
}

.custom-card::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    color: white;
    background-color: transparent; /* 半透明背景 */
    width: 50%;
    height: 50%;
    font-size: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}


.custom-card:hover {
    transform: scale(1.1); /* 悬停时放大1.1倍 */
    color: transparent;
}

.custom-card:hover::before {
    opacity: 1;
}


/* 底栏 */

#bottom-container {

    width: 100%;
    min-height: 75vh;
    position: relative;
    display: none;
    background-image: url(https://static.igem.wiki/teams/4980/wiki/image/bottom-picture.png);
    background-color: var(--background-color);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    overflow: hidden;
}


.flex {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}


.bottom-content1 {
    display: flex;
    padding: 10px;
    min-height: 45vh;
    align-items: flex-end;
    justify-content: center;
}

.bottom-content2 {
    min-height: 20vh;
    text-align: center;
    margin: 40px 0;
}

.item1, .item2, .item3{
    text-align: center;
}

.item1 img {
    height: 85px;
    width: auto;
    margin: 12px;
}
.item2 img {
    height: 60px;
    width: auto;
    margin: 5px;
}

.item3 img {
    height: 40px;
    width: auto;
    padding: 0 20px;
}


.bottom-content1 h2{
    font-size: 27px;
    line-height: 30px;
    text-align: center;
    color: white;
    margin-top: 20px;
}
.bottom-content1 p{
    font-size: small;
    line-height: 22px;
    white-space: nowrap;
    color: white;
    text-align: center;
    margin: 0;
}

.bottom-content2 p{
    line-height: 20px;
    color: white;
    margin: 0;
}

.bottom-link{
    text-decoration: none;
    font-weight: bold;
    color: white;
}
.bottom-link:hover{
    text-decoration: underline;
    font-weight: bold;
    color: white;
}


@media (max-width: 900px) {

.custom-cursor-container {
    display: none;
}

.floating-container {
    display: none;
}

#custom-navbar-container{
    display: flex;
}

.page-container{
    display: block;
}

.image-container {
    min-height: 80vh;
}

.svg-container {
    display: none;
}

#ink-drop {
    transform: none;
    height: 60vh;
    margin-top: -80vh;
}

.box-text {
    font-size: 1.3em;
    margin: 0;
}

#box1, #box2, #box3, #box4{
    background-size: cover;
    background-position: center;
}

#box1 {
    margin-top: 40vh;
}
.card-container {
    display: flex;
}

.card-content {
    display: none;
    flex-direction: column;
    padding-bottom: 20px;
}

.card-container h1{
    display: none;
}

.custom-card {
    width: 80vw;
    height: 50px;
    color: black;
}

.custom-card:nth-child(1){
    background-image: none;
}
.custom-card:nth-child(2){
    background-image: none;
}
.custom-card:nth-child(3){
    background-image: none;
}

.custom-card::before {
    width: 80vw;
    height: 50px;
    color: white;
    background-color: black;
}

.custom-card:nth-child(1)::before{
    content: "Integrated Human Practices";
}

.custom-card:nth-child(2)::before{
    content: "New Composite Part";
}

.custom-card:nth-child(3)::before{
    content: "New Improved Part";
}

#bottom-container{
    display: block;
    background-image: none;
    background-color: rgba(0, 0, 0, 0.867);
}

.item3 img {
    height: 55px;
    width: auto;
    padding: 0 20px;
}

}
