:root {
    --primary-color: #409EFF;
    --hover-color: #66b1ff;
    --transition-speed: 0.3s;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    width: 400px;
    padding: 40px;
    /* 移除初始位移 */
    /* transform: translateY(-10%); */
    /* 添加最小高度避免跳动 */
    min-height: 470px;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    animation: containerEnter 0.6s ease forwards;
}

@keyframes containerEnter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-title {
    font-size: 24px;
    color: #303133;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 500;
    position: relative;
}

.login-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    margin: 12px auto 0;
    border-radius: 2px;
}

.tab-switch {
    position: relative;
    background: #f5f7fa;
    border-radius: 8px;
    height: 44px;
    margin-bottom: 32px;
}

.tab-slider {
    position: absolute;
    width: 50%;
    height: 40px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all var(--transition-speed) ease;
    top: 2px;
    left: 2px;
}

.tab-buttons {
    display: flex;
    height: 100%;
    position: relative;
    z-index: 1;
}

.tab-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #606266;
    font-size: 14px;
    cursor: pointer;
    transition: color var(--transition-speed);
}

.tab-button.active {
    color: var(--primary-color);
}

.layui-input-wrap {
    margin-bottom: 24px;
}

.layui-input-prefix {
    color: #c0c4cc;
    transition: color var(--transition-speed);
}

.layui-input:focus + .layui-input-prefix {
    color: var(--primary-color);
}

.login-footer {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #909399;
}

.login-footer a {
    color: #606266;
    transition: color var(--transition-speed);
}

.login-footer a:hover {
    color: var(--primary-color);
}

.layui-input:focus, .layui-textarea:focus {
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 3px rgba(13,110,253,.08) !important;
}

.layui-layer-btn .layui-layer-btn0 {
    background-color: #0d6efd;
}

.layui-btn {
    background: var(--primary-color) !important;
    transition: all var(--transition-speed) ease !important;
}

.layui-btn:hover {
    background: var(--hover-color);
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .login-container {
        width: 90%;
        padding: 24px;
    }
}
