/**
 * 用户中心插件样式
 */

/* 基础样式 */
.uc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 消息提示 */
.uc-message {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
}

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

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

.uc-message.uc-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 认证页面样式 */
.uc-auth-wrapper {
    max-width: 400px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.uc-auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

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

.uc-tab-btn:hover {
    color: #007cba;
}

.uc-tab-btn.active {
    color: #007cba;
    border-bottom-color: #007cba;
}

.uc-tab-content {
    display: none;
}

.uc-tab-content.active {
    display: block;
}

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

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

.uc-form-row {
    display: flex;
    gap: 15px;
}

.uc-form-row .uc-form-group {
    flex: 1;
}

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

.uc-form-group input[type="text"],
.uc-form-group input[type="email"],
.uc-form-group input[type="password"],
.uc-form-group input[type="url"],
.uc-form-group textarea,
.uc-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.uc-form-group input:focus,
.uc-form-group textarea:focus,
.uc-form-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.uc-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.uc-help-text {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #666;
}

.uc-checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.uc-checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* 按钮样式 */
.uc-btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.uc-btn-primary {
    background-color: #007cba;
    color: #fff;
}

.uc-btn-primary:hover {
    background-color: #005a87;
    color: #fff;
}

.uc-btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.uc-btn-secondary:hover {
    background-color: #545b62;
    color: #fff;
}

.uc-btn-danger {
    background-color: #dc3545;
    color: #fff;
}

.uc-btn-danger:hover {
    background-color: #c82333;
    color: #fff;
}

.uc-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* 仪表板样式 */
.uc-dashboard {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.uc-user-header {
    display: flex;
    align-items: center;
    padding: 30px;
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: #fff;
}

.uc-avatar {
    margin-right: 20px;
}

.uc-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.uc-user-info {
    flex: 1;
}

.uc-user-info h2 {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 600;
}

.uc-user-email {
    margin: 0 0 5px 0;
    opacity: 0.9;
    font-size: 14px;
}

.uc-user-role {
    margin: 0;
    opacity: 0.8;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.uc-user-actions .uc-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.uc-user-actions .uc-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* 导航标签 */
.uc-nav-tabs {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.uc-nav-btn {
    flex: 1;
    padding: 15px 20px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.uc-nav-btn:hover {
    background-color: #e9ecef;
    color: #007cba;
}

.uc-nav-btn.active {
    background-color: #fff;
    color: #007cba;
    border-bottom-color: #007cba;
}

.uc-tab-content {
    padding: 30px;
}

/* 仪表板统计 */
.uc-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.uc-stat-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.uc-stat-card h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.uc-stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #007cba;
    margin: 0;
}

.uc-stat-text {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

/* 头像上传 */
.uc-avatar-upload {
    text-align: center;
}

.uc-avatar-preview {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
    cursor: pointer;
}

.uc-avatar-preview img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #e1e5e9;
    transition: all 0.3s ease;
}

.uc-avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #fff;
    font-size: 12px;
}

.uc-avatar-preview:hover .uc-avatar-overlay {
    opacity: 1;
}

/* 编辑器工具栏 */
.uc-editor-toolbar {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
}

.uc-editor-btn {
    padding: 6px 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.uc-editor-btn:hover {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

.uc-editor-toolbar + textarea {
    border-radius: 0 0 6px 6px;
    border-top: none;
}

/* 文章列表 */
.uc-posts-list {
    space-y: 20px;
}

.uc-post-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #007cba;
}

.uc-post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.uc-post-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.uc-post-title a {
    color: #333;
    text-decoration: none;
}

.uc-post-title a:hover {
    color: #007cba;
}

.uc-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.uc-status-draft {
    background: #ffc107;
    color: #856404;
}

.uc-status-pending {
    background: #17a2b8;
    color: #0c5460;
}

.uc-status-published {
    background: #28a745;
    color: #155724;
}

.uc-post-meta {
    margin-bottom: 10px;
    font-size: 12px;
    color: #666;
}

.uc-post-meta span {
    margin-right: 15px;
}

.uc-post-excerpt {
    margin-bottom: 15px;
    color: #555;
    line-height: 1.5;
}

.uc-post-actions {
    display: flex;
    gap: 10px;
}

/* 分页 */
.uc-pagination {
    text-align: center;
    margin-top: 30px;
}

.uc-pagination a,
.uc-pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #007cba;
}

.uc-pagination a:hover {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

.uc-pagination .current {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

/* 最近文章 */
.uc-recent-posts h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
}

.uc-recent-posts .uc-post-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-left: 4px solid #007cba;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .uc-container {
        padding: 10px;
    }
    
    .uc-auth-wrapper {
        padding: 20px;
    }
    
    .uc-user-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .uc-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .uc-nav-tabs {
        flex-wrap: wrap;
    }
    
    .uc-nav-btn {
        flex: 1 1 50%;
        min-width: 120px;
    }
    
    .uc-tab-content {
        padding: 20px;
    }
    
    .uc-dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .uc-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .uc-post-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .uc-post-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .uc-nav-btn {
        flex: 1 1 100%;
        font-size: 12px;
        padding: 12px 15px;
    }
    
    .uc-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .uc-post-actions .uc-btn {
        width: auto;
        margin-bottom: 5px;
    }
}

/* 动画效果 */
.uc-tab-content {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* 加载状态 */
.uc-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

