/* 
 * assets/css/auth.css
 * 登录认证页面样式
 */

/* 基础重置和字体 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* 登录容器 */
.login-container {
    display: flex;
    max-width: 1200px;
    width: 100%;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    min-height: 700px;
}

/* 登录表单区域 */
.login-form {
    flex: 1;
    padding: 60px 50px;
    max-width: 500px;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Logo区域 */
.logo-section {
    text-align: center;
    margin-bottom: 50px;
}

.logo-section img {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #667eea;
    padding: 5px;
}

.logo-section h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.logo-section p {
    color: #666;
    font-size: 16px;
}

/* 表单组 */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

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

.form-group label i {
    margin-right: 8px;
    color: #667eea;
}

/* 输入框样式 */
.form-group input {
    width: 100%;
    padding: 14px 15px;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

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

.form-group input::placeholder {
    color: #999;
    font-size: 14px;
}

/* 密码显示/隐藏按钮 */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 40px;
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
}

.toggle-password:hover {
    color: #764ba2;
}

/* 角色选择 */
.role-select {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e1e5eb;
    margin-top: 20px;
}

.role-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.role-option {
    text-align: center;
    padding: 10px;
    border: 2px solid #e1e5eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.role-option:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.role-option.selected {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.role-option i {
    font-size: 24px;
    color: #667eea;
    margin-bottom: 5px;
    display: block;
}

.role-option span {
    font-size: 12px;
    color: #666;
}

/* 验证码区域 */
.captcha-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-container input {
    flex: 1;
}

.captcha-img {
    height: 50px;
    border-radius: 6px;
    border: 1px solid #e1e5eb;
    cursor: pointer;
    transition: opacity 0.3s;
}

.captcha-img:hover {
    opacity: 0.8;
}

/* 记住我和忘记密码 */
.remember {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox input {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.checkbox span {
    color: #666;
    font-size: 14px;
}

.forgot-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.forgot-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* 错误信息 */
.error-message {
    background: #fee;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.error-message.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

/* 登录按钮 */
.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

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

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

/* 社交登录 */
.social-login {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e1e5eb;
    text-align: center;
}

.social-login p {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
}

.social-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-wechat, .btn-alipay {
    flex: 1;
    padding: 12px;
    border: 1px solid #e1e5eb;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-wechat:hover {
    background: #07c160;
    color: white;
    border-color: #07c160;
}

.btn-alipay:hover {
    background: #1677ff;
    color: white;
    border-color: #1677ff;
}

.btn-wechat i {
    color: #07c160;
}

.btn-alipay i {
    color: #1677ff;
}

.btn-wechat:hover i,
.btn-alipay:hover i {
    color: white;
}

/* 登录页脚 */
.login-footer {
    margin-top: 30px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.login-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.login-footer .links {
    margin-top: 15px;
    font-size: 13px;
}

.login-footer .links a {
    margin: 0 5px;
}

/* 右侧信息区域 */
.login-info {
    flex: 1;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    color: white;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-content h3 {
    font-size: 32px;
    margin-bottom: 30px;
    font-weight: 600;
}

.info-content ul {
    list-style: none;
    margin-bottom: 40px;
}

.info-content ul li {
    margin-bottom: 15px;
    font-size: 16px;
    display: flex;
    align-items: center;
}

.info-content ul li i {
    margin-right: 10px;
    font-size: 18px;
    color: #ffd700;
}

.current-events {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.current-events h4 {
    font-size: 20px;
    margin-bottom: 15px;
    font-weight: 500;
}

.current-events ul {
    list-style: none;
}

.current-events ul li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 14px;
}

.current-events ul li:last-child {
    border-bottom: none;
}

/* 加载动画 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* 成功/失败提示 */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

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

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

/* 密码强度指示器 */
.password-strength {
    margin-top: 5px;
    height: 4px;
    background: #e1e5eb;
    border-radius: 2px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    transition: width 0.3s, background 0.3s;
}

.strength-weak {
    background: #ff4757;
    width: 33%;
}

.strength-medium {
    background: #ffa502;
    width: 66%;
}

.strength-strong {
    background: #2ed573;
    width: 100%;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
        max-width: 500px;
        min-height: auto;
    }
    
    .login-form {
        padding: 40px 30px;
    }
    
    .login-info {
        padding: 40px 30px;
    }
}

@media (max-width: 768px) {
    .login-container {
        margin: 20px;
    }
    
    .login-form {
        padding: 30px 20px;
    }
    
    .logo-section h2 {
        font-size: 24px;
    }
    
    .info-content h3 {
        font-size: 24px;
    }
    
    .social-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .login-container {
        border-radius: 10px;
    }
    
    .login-form {
        padding: 25px 15px;
    }
    
    .form-group input {
        padding: 12px 15px;
    }
    
    .btn-login {
        padding: 14px;
    }
    
    .role-options {
        grid-template-columns: 1fr;
    }
}