* {
    /* 去除浏览器默认内外边距 */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 去除input的轮廓 */
input {
    outline: none;
}

html,
body {
    height: 100%;
    width: 100%;
}

body {
    /* 溢出隐藏 */
    overflow-x: hidden;
    display: flex;
    /* 渐变方向从左到右 */
    background: linear-gradient(to right, rgb(247, 209, 215), rgb(122, 199, 225));

}

@keyframes pageLoad {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

span {
    position: absolute;
    z-index: 0;
    bottom: 0;
    border-radius: 50%;
    /* 径向渐变 */
    background: radial-gradient(circle at 72% 28%, #fff 3px, #ff7edf 8%, #5b5b5b, #aad7f9 100%);
    /* 泡泡内阴影 */
    box-shadow: inset 0 0 6px #fff,
        inset 3px 0 6px #eaf5fc,
        inset 2px -2px 10px #efcde6,
        inset 0 0 60px #f9f6de,
        0 0 20px #fff;
    /* 动画 */
    animation: myMove 4s linear infinite;
}
@keyframes myMove {
    0% {
        transform: translateY(0%);
        opacity: 1;
    }
    50% {
        transform: translate(10%, -1000%);
    }
    75% {
        transform: translate(-20%, -1200%);
    }
    99% {
        opacity: .9;
    }
    100% {
        transform: translateY(-1800%) scale(1.0);
        opacity: 0;
    }
}


/* 最外层的大盒子 - 固定大小 */
.box {
    backdrop-filter: blur(15px);
    width: 1050px; /* 固定宽度 */
    height: 600px; /* 固定高度 */
    display: flex;
    position: relative;
    z-index: 2;
    margin: 10% auto; /* 固定边距 */
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, .6);
    box-shadow: 4px 2px 38px rgba(0, 0, 0, .1);
    /* 移除transform和opacity动画 */
}

/* 删除boxScale动画 */
@keyframes boxScale {
    /* 完全移除此动画 */
}

/* 滑动的盒子 - 修改为完全居中 */
.pre-box {
    /* 宽度为大盒子的一半 */
    width: 50%;
    height: 100%;
    /* 绝对定位 */
    position: absolute;
    /* 距离大盒子左侧为0 */
    left: 0;
    /* 距离大盒子顶部为0 */
    top: 0;
    z-index: 99;
    border-radius: 4px;
    background-color: #4090eb;
    box-shadow: 2px 1px 19px rgba(0, 0, 0, .1);
    /* 动画过渡，先加速再减速 */
    transition: 0.5s ease-in-out;
    /* 添加flex布局使内容居中 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* 滑动盒子的标题 - 增大一倍字体 */
.pre-box h1 {
    margin-top: 0; /* 移除原来的上边距 */
    text-align: center;
    /* 文字间距 */
    letter-spacing: 10px;
    color: #f6f6f6;
    /* 禁止选中 */
    user-select: none;
    /* 文字阴影 */
    text-shadow: 4px 4px 3px rgba(0, 0, 0, .1);
    font-size: clamp(1.5rem, 4vw, 5rem); /* 使用clamp实现响应式字体 */
    margin-bottom: 20px;
}

/* 滑动盒子的文字 - 增大一倍字体 */
.pre-box p {
    height: 40px;
    line-height: 40px;
    text-align: center;
    margin: 20px 0;
    /* 禁止选中 */
    user-select: none;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 4px 4px 3px rgba(0, 0, 0, .1);
    font-size: clamp(1rem, 2.3vw, 3rem); /* 使用clamp实现响应式字体 */
}

/* 图片盒子 */
.img-box {
    width: 40%; /* 改为百分比 */
    aspect-ratio: 1/1; /* 保持正方形 */
    max-width: 250px;
    margin: 5% auto; /* 改为百分比 */
    /* 设置为圆形 */
    border-radius: 50%;
    /* 设置用户禁止选中 */
    user-select: none;
    overflow: hidden;
    box-shadow: 4px 4px 3px rgba(0, 0, 0, .1);
}

/* 图片 */
.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

/* 登录和注册盒子 */
.login-form,
.register-form {
    flex: 1;
    height: 100%;
}

/* 标题盒子 */
.title-box {
    height: 25%; /* 改为百分比 */
    line-height: 1.2; /* 调整行高 */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 标题 - 增大字体 */
.title-box h1 {
    text-align: center;
    color: white;
    /* 禁止选中 */
    user-select: none;
    letter-spacing: 10px;
    text-shadow: 5px 5px 4px rgba(0, 0, 0, .1);
    font-size: clamp(2.5rem, 7.5vw, 5rem);
    padding: 0 5px; /* 添加内边距防止文字溢出 */
}

/* 输入框盒子 */
.input-box {
    display: flex;
    /* 纵向布局 */
    flex-direction: column;
    /* 水平居中 */
    align-items: center;
    margin-top: 5%; /* 改为百分比 */
    width: 100%;

}

/* 输入框 - 增大尺寸 */
input {
    line-height:1.2;
    width: 70%;
    height: 7%; /* 改为百分比 */
    min-height: 40px; /* 设置最小高度 */
    margin-bottom: 4%; /* 改为百分比 */
    text-indent: 17px;
    border: 1px solid #fff;
    background-color: #b0cfe9;
    border-radius: 120px;
    /* 增加磨砂质感 */
    backdrop-filter: blur(10px);
    font-size: clamp(0.9rem, 1.5vw, 1.1rem); /* 使用clamp实现响应式字体 */
}

/* 输入框有内容时的样式 - 保持浅蓝色 */
input:not(:placeholder-shown),
select:not(:placeholder-shown) {
    background-color: #e1f0fa !important; /* 强制保持浅蓝色 */
}

/* 焦点状态 - 轻微加深边框 */
input:focus, select:focus {
    border-color: #70b4f0;
    outline: none;
    box-shadow: 0 0 0 2px rgb(240, 242, 246);
}

/* 处理自动填充 */
input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #e1f0fa inset !important;
    -webkit-text-fill-color: #000000 !important;
}

/* 聚焦时隐藏文字 */
input:focus::placeholder {
    opacity: 0;
}

/* 按钮盒子 */
.btn-box {
    display: flex;
    justify-content: center;
    margin-top: 5%; /* 改为百分比 */
    flex-wrap: wrap; /* 允许换行 */
}

/* 按钮 - 增大尺寸 */
button {
    width: 150px;
    height: 55px;
    margin: -10px 10px;
    line-height: 40px;
    border: none;
    border-radius: 6px;
    background-color: #d6d6db;
    color: #157df8;
    font-size: clamp(1.2rem, 1.9vw, 1.5rem); /* 使用clamp实现响应式字体 */
}

/* 按钮悬停时 */
button:hover {
    /* 鼠标小手 */
    cursor: pointer;
    /* 透明度 */
    opacity: .8;
}

/* 按钮文字 - 增大字体 */
.btn-box p {
    height: 40px;
    line-height: 40px;
    /* 禁止选中 */
    user-select: none;
    font-size: clamp(1.2rem, 1.9vw, 1.5rem); /* 使用clamp实现响应式字体 */
    color:#157df8;
    margin: 0 10px;
}

.btn-box p:hover {
       background-color: #d6d6db;
    cursor: pointer;
    border-bottom: 1px solid #157df8;
}

/* 美化角色选择下拉框 - 增大尺寸 */
select {
    width: 70%;
    height: 7%; /* 改为百分比 */
    min-height: 40px; /* 设置最小高度 */
    margin-bottom: 4%; /* 改为百分比 */
    text-indent: 15px;
    border: 1px solid #b0cfe9;
    background-color: #b0cfe9;
    border-radius: 120px;
    backdrop-filter: blur(10px);
    color: #2e2e2e;
    padding: 0 15px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 15px;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem); /* 使用clamp实现响应式字体 */
}

select:focus {
    outline: none;
    color: #000000;
}

select option {
    background-color: rgba(151, 179, 241, 0.8);
    color: #0b0101;
    font-size: 1rem;
}


