<template>
    <div class="center">
        <h1>RunForge</h1>
        <h2>—— 智能自助校园乐跑平台</h2>
        <div class="animated-button" @click="$router.push('/lepao')">
            <span>立即体验</span>
        </div>
    </div>
</template>

<style scoped>
.center {
    margin-top: -200px;
}

.center h1,
.center h2 {
    background: linear-gradient(270deg,
        #a8cfff,
        #d0e7ff,
        #ffffff,
        #a8cfff);
    background-size: 500% 500%;
    animation: gradientMove 6s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* h1 特别设置字号和字体 */
.center h1 {
    font-size: 10em;
    line-height: 1.3em;
    font-family: AlibabaSans, -apple-system, BlinkMacSystemFont;
}

/* h2 特别设置字号和字体 */
.center h2 {
    font-size: 2.5em;
    margin-top: -50px;
    font-family: Alimama ShuHeiTi, -apple-system, BlinkMacSystemFont;
}

/* 动态渐变动画 */
@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

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

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


.animated-button {
    user-select: none;
    cursor: pointer;
    position: absolute;
    left: 50%;
    margin-top: -50px;
    transform: translateX(-50%);
    background-color: rgba(22, 93, 255, 0.8);
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 30px;
    overflow: hidden;
    font-size: 20px;
    position: relative;
    transition: color 0.4s;
    margin-top: 160px;
    width: 100px;
    font-family: Alimama ShuHeiTi, -apple-system, BlinkMacSystemFont;
}

.animated-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    color: rgba(22, 93, 255, 0.8);
    transform: translateX(-100%);
    transition: transform 0.4s;
}

.animated-button:hover::before {
    transform: translateX(0);
}

.animated-button:hover {
    color: rgb(22, 93, 255);
}

.animated-button span {
    position: relative;
    transition: color 0.1s;
}
</style>