/* Reset margin and padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    height: 100%;
    position: relative;
}
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* background-color: rgba(0, 0, 0, 0.7); */
    padding: 20px;
    z-index: 1000;
}

nav ul {
    list-style-type: none;
    text-align: right;
}

nav ul li {
    display: inline-block;
    margin-right: 30px;
}

nav ul li a {
    color: #3d3d3d;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
}

nav ul li a:hover {
    text-decoration: underline;
}

.section {
    position: relative;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    /* font-size: 3em; */
    height: 100vh;
    /* Make each section full height of the viewport */
}

.section1 {
    width: 100vw;
    height: 100vh;
    background: url('../img/bg.png') top left no-repeat;
    background-size: cover;
}



.section1 .flexBox {
    /* width: 38vw; */
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 40px;
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}



.gradient-border {
    display: flex;
    min-width: 33%;
    width: 33%;
    flex: 1;
    align-items: center;
    justify-content: center;
    border: 2px solid #3d3d3d;
    color: #3d3d3d;
    /* border-radius: 12px; */
    font-size: 1em;
    padding: 12px;
    font-weight: bold;
    /* overflow: hidden; */
    position: relative;
    white-space: nowrap;

}

.iphone,
.android,
.applet,
.tiktok,
.redBook,
.official {
    margin-right: 8px;
    width: 33px;
    height: 33px;
    /* background-size: cover; */
}

.iphone {
    background: url(../img/iphone1.svg) left top no-repeat;
}

.android {
    background: url(../img/android1.svg) left top no-repeat;
}

.applet {
    background: url(../img/applet1.svg) left top no-repeat;
}


.tiktok {
    background: url(../img/Tiktok.svg) left top no-repeat;
}

.redBook {
    background: url(../img/redBook.svg) left top no-repeat;
}

.official {
    background: url(../img/official.svg) left top no-repeat;
}

.iphoneBox:hover .iphone {
    background: url(../img/iphone2.svg) left top no-repeat;
}

.androidBox:hover .android {
    background: url(../img/android2.svg) left top no-repeat;
}

.appletBox:hover .applet {
    background: url(../img/applet2.svg) left top no-repeat;
}

.gradient-border:hover {
    border: 2px solid transparent;
    border-radius: 12px;
    border-image: linear-gradient(to right, #4DDAC8, #82EF26) 1;
    border-color: linear-gradient(to right, #4DDAC8, #82EF26);
}

.gradient-border:hover span {
    overflow: hidden;
    color: transparent;
    background-image: linear-gradient(to right, #4DDAC8, #82EF26);
    -webkit-background-clip: text;
}

.codeBox {
    width: 120px;
    height: 120px;
    background: #f2f2f2;
    border-radius: 12px;
    padding: 4px;
    position: absolute;
    bottom: -130px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.iphoneBox:hover .iphoneCode {
    z-index: 2;
    opacity: 1;
    pointer-events: auto;
}

.androidBox:hover .androidCode {
    z-index: 2;
    opacity: 1;
    pointer-events: auto;
}

.appletBox:hover .appletCode {
    z-index: 2;
    opacity: 1;
    pointer-events: auto;
}

.tiktokBox:hover .tiktokCode {
    z-index: 2;
    opacity: 1;
    pointer-events: auto;
}

.redBookBox:hover .redBookCode {
    z-index: 2;
    opacity: 1;
    pointer-events: auto;
}

.officialBox:hover .officialCode {
    z-index: 2;
    opacity: 1;
    pointer-events: auto;
}

.section2 .flexBox {
    margin: 0 auto;
    width: 50vw;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 50px;
}

.textFlex {
    width: 100vw;
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 2%;
    margin-bottom: 3%;
    overflow: hidden;

    >div {
        display: flex;
        width: 40%;
        height: auto;
        font-size: 64px;
        font-weight: bold;

        >img {
            display: inline-block;
            width: 80px;
        }
    }
}



.title {
    color: #3d3d3d;
    font-size: 30px;
    font-weight: bold;
    margin: 9% 0 5%;
}

.bottomBox {
    margin-top: 8%;
}

.bottomFlex {
    margin: 0 auto;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin-bottom: 4px;

    >div {
        /* width: 33%; */
        text-align: left;
        /* white-space: nowrap; */
        font-weight: 600;
        font-size: 12px;

        >span {
            color: #7DE56F;

            a {
                text-decoration: underline;
                color: #7DE56F;
            }

            /* 访问过的链接样式 */
            a:visited {
                color: #7DE56F;
                /* 已访问链接颜色 */
            }

            /* 悬停状态 */
            a:hover {
                color: #7DE56F;
                /* 悬停时链接颜色 */
                text-decoration: underline;
                /* 悬停时显示下划线 */
                background-color: rgba(0, 123, 255, 0.1);
                /* 悬停时背景色 */
            }

            /* 激活状态（点击时） */
            a:active {
                color: #7DE56F;
                /* 激活时链接颜色 */
                text-decoration: underline;
            }

        }

    }
}


.textFlex1 {
    animation: slide1 8s linear infinite;
}

.textFlex2 {
    animation: slide2 10s linear infinite;
}

/* 使用 CSS 动画来自动轮播 */
@keyframes slide1 {
    0% {
        transform: translateX(80%);
    }

    100% {
        transform: translateX(-100%);
    }
}

@keyframes slide2 {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}



/* 在较小的设备上，使用 contain 以保证图片完整显示 */
/* @media (max-width: 1024px) {

    .section1 {
        background-size: contain;
    }
  } */

/* 屏幕宽度小于等于 1024px 时应用 */
@media (max-width: 1024px) {
    .section1 {
        background-size: contain;
    }

    .section1 .flexBox {
        width: 100%;
        flex-direction: column;
        gap: 20px;
        bottom: -18px;
        right: 0%;
    }


    /* .iphoneBox:hover .iphoneCode {
        opacity: 1;
        pointer-events: auto;
    }

    .androidBox:hover .androidCode {
        opacity: 1;
        pointer-events: auto;
    }

    .appletBox:hover .appletCode {
        opacity: 1;
        pointer-events: auto;
    }

    .tiktokBox:hover .tiktokCode {
        opacity: 1;
        pointer-events: auto;
    }

    .redBookBox:hover .redBookCode {
        opacity: 1;
        pointer-events: auto;
    }

    .officialBox:hover .officialCode {
        opacity: 1;
        pointer-events: auto;
    } */



    .section2 .flexBox {
        flex-direction: column;
        gap: 20px;
    }

    .title {
        margin: 1% 0 1%;
    }

    .bottomBox {
        margin-top: 1%;
    }


    .textFlex {
        width: 150%;

        >div {
            width: 100%;
            font-size: 54px;
            white-space: nowrap;

            >img {
                width: 60px;
            }
        }
    }


    .bottomFlex {
        width: 100vw;
        justify-content: flex-start;
        flex-direction: column;

        >div {
            width: 100%;
            padding-left: 20px;
            white-space: wrap;

        }
    }

}

@media (max-width: 800px){
    .section1 {
        background: url('../img/mobileBG.png') top center no-repeat;
        background-size: contain;
    }
}

