/* 瑞华博客网 - 登录样式 */
/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "Hiragino Sans GB", "WenQuanYi Micro Hei", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    background-image: linear-gradient(135deg, #f5f7fa 0%, #e6d5f5 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: gradientBG 15s ease infinite;
    background-size: 400% 400%;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 左右布局容器 */
.split-container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    margin: 20px auto;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-radius: 15px;
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.split-left {
    flex: 1;
    background-color: #8e44ad;
    background-image: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    padding: 40px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 550px;
}

.split-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/ruihua.png') center center;
    background-size: cover;
    opacity: 0.08;
    z-index: 0;
    animation: pulse 10s infinite alternate;
}

@keyframes pulse {
    0% { opacity: 0.05; }
    100% { opacity: 0.12; }
}

.split-left-content {
    position: relative;
    z-index: 1;
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from { transform: translateX(-30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.split-left h1 {
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.split-left p {
    font-size: 16px;
    margin-bottom: 30px;
    opacity: 0.9;
    line-height: 1.8;
}

.split-left .features {
    margin-top: 40px;
}

.split-left .feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.split-left .feature-item:hover {
    transform: translateX(5px);
}

.split-left .feature-icon {
    margin-right: 15px;
    font-size: 24px;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.split-left .feature-item:hover .feature-icon {
    background-color: rgba(255,255,255,0.25);
    transform: scale(1.1);
}

.split-right {
    flex: 1;
    background-color: #fff;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* 登录容器 */
.login-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 40px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
}

.split-container .login-container {
    box-shadow: none;
    padding: 0;
    max-width: 100%;
}

.login-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.split-container .login-container:hover {
    transform: none;
    box-shadow: none;
}

/* 登录标题 */
.login-title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
}

.login-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #9b59b6, #8e44ad);
    border-radius: 3px;
}

/* 登录表单 */
.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
    transition: color 0.3s;
}

.login-form .input-group {
    position: relative;
    margin-bottom: 25px;
}

.login-form input[type="text"],
.login-form input[type="password"],
.login-form input[type="email"] {
    width: 100%;
    padding: 14px 18px;
    padding-right: 45px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    background-color: #f9f9f9;
}

.login-form input:focus {
    border-color: #8e44ad;
    box-shadow: 0 0 0 3px rgba(142, 68, 173, 0.2);
    outline: none;
    background-color: #fff;
}

.login-form .input-group:focus-within label {
    color: #8e44ad;
}

.login-form .input-icon {
    position: absolute;
    top: 38px;
    right: 15px;
    height: auto;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 18px;
    z-index: 2;
    pointer-events: none;
    margin: auto 0;
    transition: color 0.3s;
}

.login-form .input-group:focus-within .input-icon {
    color: #8e44ad;
}

/* 记住我和忘记密码区域 */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    user-select: none;
}

/* 记住我选项 */
.remember-me {
    display: flex;
    align-items: center;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #8e44ad;
}

.remember-me label {
    margin-bottom: 0;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

/* 忘记密码链接 */
.forgot-password a {
    color: #8e44ad;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.forgot-password a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #8e44ad;
    transition: width 0.3s;
}

.forgot-password a:hover::after {
    width: 100%;
}

.forgot-password a:hover {
    color: #7d3c98;
}

/* 登录按钮 */
.login-form button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(to right, #9b59b6, #8e44ad);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(142, 68, 173, 0.3);
}

.login-form button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.6s;
}

.login-form button:hover {
    background: linear-gradient(to right, #8e44ad, #9b59b6);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(142, 68, 173, 0.4);
}

.login-form button:hover::before {
    left: 100%;
}

.login-form button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(142, 68, 173, 0.3);
}

/* 错误消息 */
.error-message {
    color: #e74c3c;
    margin-bottom: 25px;
    padding: 12px 15px;
    background-color: #fdecea;
    border-radius: 8px;
    font-size: 14px;
    border-left: 4px solid #e74c3c;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* 成功消息 */
.success-message {
    color: #27ae60;
    margin-bottom: 25px;
    padding: 12px 15px;
    background-color: #e8f8f5;
    border-radius: 8px;
    font-size: 14px;
    border-left: 4px solid #27ae60;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 注册链接 */
.register-link {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.register-link p {
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.register-link a {
    color: #8e44ad;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.register-link a:hover {
    color: #7d3c98;
    text-decoration: underline;
}

/* 切换按钮 */
.switch-form {
    display: inline-block;
    margin-top: 30px;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.switch-form:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.switch-form:active {
    transform: translateY(-1px);
}

/* 登录按钮容器 */
.login-button-container {
    margin-bottom: 20px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .split-container {
        flex-direction: column;
        margin: 10px;
        max-width: 100%;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    }
    
    .split-left, .split-right {
        width: 100%;
    }
    
    .split-left {
        min-height: auto;
        padding: 30px 20px;
        border-radius: 12px 12px 0 0;
        display: block; /* 确保显示 */
    }
    
    .split-right {
        padding: 25px 20px;
        border-radius: 0 0 12px 12px;
    }
    
    .login-title {
        font-size: 22px;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    
    .split-left h1 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .split-left p {
        font-size: 15px;
        margin-bottom: 20px;
    }
    
    .split-left .features {
        margin-top: 25px;
    }
    
    .login-form .input-group {
        margin-bottom: 20px;
    }
    
    .login-form input[type="text"],
    .login-form input[type="password"],
    .login-form input[type="email"] {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .switch-form {
        margin-top: 20px;
        padding: 10px 20px;
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
    }
    
    .split-container {
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        height: auto; /* 从100vh改为auto */
        overflow-y: visible; /* 从auto改为visible */
    }
    
    .split-left, .split-right {
        border-radius: 0;
        display: block; /* 确保显示 */
    }
    
    .split-left {
        padding: 25px 15px;
        min-height: auto; /* 确保高度自适应内容 */
    }
    
    .split-right {
        padding: 20px 15px;
    }
    
    .login-container {
        padding: 0;
    }
    
    .login-title {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .login-form input {
        padding: 12px;
    }
    
    .login-form button {
        padding: 12px;
        font-size: 15px;
    }
    
    .remember-forgot {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .forgot-password {
        margin-top: 10px;
    }
    
    .split-left .feature-item {
        margin-bottom: 12px;
    }
    
    .split-left .feature-icon {
        width: 32px;
        height: 32px;
        font-size: 18px;
        margin-right: 10px;
    }
    
    .register-link {
        margin-top: 20px;
    }
} 