/* 自定义登录插件 - 主样式文件 */

/* 认证容器 */
.clp-auth-container {
    max-width: 500px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 标签页样式 */
.clp-auth-tabs {
    display: flex;
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.clp-tab-button {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
}

.clp-tab-button.active {
    color: #0073aa;
    background-color: #fff;
}

.clp-tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: #0073aa;
}

.clp-tab-button:hover:not(.active) {
    color: #0073aa;
    background-color: rgba(0, 115, 170, 0.05);
}

/* 表单容器 */
.clp-form-container {
    padding: 30px;
    display: none;
}

.clp-form-container.active {
    display: block;
}

/* 登录表单容器 - 保持兼容 */
.clp-login-form-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.clp-login-form-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.clp-login-form-container h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 600;
}

/* 表单样式 */
.clp-form {
    width: 100%;
}

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

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

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #4a6cf7;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

/* 验证码容器 */
.verification-code-container {
    display: flex;
    gap: 10px;
}

.verification-code-container .form-control {
    flex: 1;
}

.send-code-button {
    padding: 12px 20px;
    background: #4a6cf7;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.send-code-button:hover:not(:disabled) {
    background: #3a5ce9;
}

.send-code-button:disabled {
    background: #a0b3f0;
    cursor: not-allowed;
}

/* 提交按钮 */
.submit-group {
    margin-top: 30px;
}

.submit-button {
    width: 100%;
    padding: 14px;
    background: #4a6cf7;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.submit-button:hover:not(:disabled) {
    background: #3a5ce9;
}

.submit-button:active:not(:disabled) {
    transform: scale(0.98);
}

.submit-button:disabled {
    background: #a0b3f0;
    cursor: not-allowed;
}

/* 消息提示 */
.clp-message {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

.clp-message .success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.clp-message .error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

/* 已登录提示 - 显示用户头像 */
.clp-logged-in-message {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background: #e8f5e9;
    border-radius: 10px;
    color: #2e7d32;
    text-align: center;
}

.clp-user-profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.clp-user-profile-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    margin-bottom: 15px;
}

.clp-user-avatar {
    margin-bottom: 15px;
}

.clp-user-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.clp-user-info {
    text-align: center;
}

.clp-welcome-text {
    margin: 0;
    font-weight: 600;
    font-size: 18px;
}

.clp-logout-button {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.clp-logout-button:hover {
    background: #d32f2f;
}

/* 保持兼容 */
.clp-logged-in-message a.button {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #4caf50;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.clp-logged-in-message a.button:hover {
    background: #45a049;
}

/* 表单消息提示 */
.message {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

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

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

/* 未登录提示 */
.clp-not-logged-in {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background: #fff3cd;
    border-radius: 10px;
    text-align: center;
    color: #856404;
    font-weight: 500;
}

/* 用户后台样式 */
.clp-user-dashboard {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0;
}

.dashboard-header {
    background: linear-gradient(135deg, #4a6cf7, #6c8eff);
    color: white;
    padding: 30px;
    border-radius: 10px 10px 0 0;
}

.dashboard-header h2 {
    margin: 0 0 20px 0;
    font-size: 32px;
    font-weight: 700;
}

.user-welcome h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
}

.user-email {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

.dashboard-content {
    background: white;
    padding: 20px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

/* 安全状态样式 */
.security-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.security-item {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4a6cf7;
}

.security-item h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.security-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-indicator.safe {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.text-button {
    display: inline-block;
    margin-top: 10px;
    color: #4a6cf7;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.text-button:hover {
    color: #3a5ce7;
    text-decoration: underline;
}

.dashboard-section {
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4a6cf7;
}

.dashboard-section:last-child {
    margin-bottom: 0;
}

.dashboard-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

/* 用户信息列表 */
.user-info-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
    text-align: center;
}

.user-avatar-container {
    margin-bottom: 15px;
    flex-shrink: 0;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #f0f0f0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.user-details {
    flex: 1;
}

.user-details p {
    margin-bottom: 12px;
    line-height: 1.6;
}

.user-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-info-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e1e5e9;
    color: #555;
}

.user-info-list li:last-child {
    border-bottom: none;
}

.user-info-list strong {
    color: #333;
    margin-right: 10px;
}

/* 快速操作按钮 */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.action-button {
    display: inline-block;
    padding: 12px 24px;
    background: #4a6cf7;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.action-button:hover {
    background: #3a5ce9;
    color: white;
}

.action-button:active {
    transform: scale(0.98);
}

.action-button.logout-button {
    background: #f44336;
}

.action-button.logout-button:hover {
    background: #d32f2f;
}

/* 最近活动 */
.recent-activity {
    color: #666;
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .clp-login-form-container,
    .clp-user-dashboard,
    .clp-auth-container,
    .clp-logged-in-message {
        margin: 20px;
        padding: 20px;
    }
    
    .dashboard-header {
        padding: 30px 20px;
    }
    
    .dashboard-header h2 {
        font-size: 28px;
    }
    
    .user-welcome h3 {
        font-size: 20px;
    }
    
    .dashboard-content {
        padding: 20px;
    }
    
    .dashboard-section {
        padding: 20px;
    }
    
    .verification-code-container {
        flex-direction: column;
    }
    
    .send-code-button {
        width: 100%;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .action-button {
        width: 100%;
        text-align: center;
    }
    
    .clp-tab-button {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .clp-logged-in-message {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .clp-login-form-container,
    .clp-user-dashboard {
        margin: 10px;
        padding: 15px;
    }
    
    .form-control {
        padding: 10px;
        font-size: 14px;
    }
    
    .submit-button {
        padding: 12px;
        font-size: 14px;
    }
}