/**
 * 登录页面样式
 * 设计简洁现代的登录界面
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #118888 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.login-form h2 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 600;
}

/* 登录方式切换样式 */
.login-tabs {
    display: flex;
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #118888 100%);
    color: white;
}

.tab-btn:hover:not(.active) {
    background: #e9ecef;
}

/* 登录面板样式 */
.login-panel {
    display: none;
}

.login-panel.active {
    display: block;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

/* 验证码输入组样式 */
.code-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.code-input-group input {
    flex: 1;
    border-radius: 8px 0 0 8px;
}

.btn-send-code {
    padding: 12px 20px;
    background: #118888;
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-send-code:hover:not(:disabled) {
    background: #0e7777;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(17, 136, 136, 0.3);
}

.btn-send-code:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 输入框错误状态样式 */
.form-group input.error {
    border-color: #ff0000;
    background-color: #fff5f5;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.form-group input.error:focus {
    border-color: #ff0000;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.2);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #118888 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    display: none;
    transition: opacity 0.3s ease;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 微信快捷登录样式 */
.wechat-login-section {
    margin-top: 25px;
    text-align: center;
}

.divider {
    position: relative;
    margin: 20px 0;
    text-align: center;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
    z-index: 1;
}

.divider span {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 15px;
    color: #666;
    font-size: 14px;
    position: relative;
    z-index: 2;
}

.btn-wechat-login {
    width: 100%;
    padding: 12px;
    background: #ffffff;
    color: #07C160;
    border: 2px solid #07C160;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-wechat-login:hover {
    background: #07C160;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(7, 193, 96, 0.3);
}

.btn-wechat-login:active {
    transform: translateY(0);
}

.wechat-icon {
    flex-shrink: 0;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-form {
        padding: 30px 20px;
    }
    
    .btn-wechat-login {
        font-size: 14px;
        padding: 10px;
    }
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }
    
    .login-form {
        padding: 30px 20px;
    }
    
    .login-form h2 {
        font-size: 24px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 输入框验证样式 */
.form-group input:invalid {
    border-color: #858585;
}

.form-group input:valid {
    border-color: #118888;
}