/* 公共样式文件 - 钰乐SEO工具箱 */

/* 自定义变量 */
:root {
    --primary-color: #206bc4;
    --success-color: #2fb344;
    --warning-color: #f76707;
    --danger-color: #d63939;
    --info-color: #4299e1;
    --light-bg: #f8fafc;
    --border-radius: 6px;
    --box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --transition: all 0.2s ease-in-out;
}

/* 页面基础样式 */
body {
    background-color: var(--light-bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
}

/* 自定义进度条样式 */
.custom-progress {
    height: 8px;
    background-color: #e9ecef;
    border-radius: var(--border-radius);
}

.custom-progress .progress-bar {
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

/* 统计卡片增强 */
.stat-card {
    transition: var(--transition);
    border: 1px solid #e9ecef;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.stat-card .card-body {
    padding: 1.5rem;
}

.stat-card .h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* 工具栏卡片 */
.toolbar-card {
    margin: 1rem 0;
    border: 1px solid #e9ecef;
}

.toolbar-card .card-body {
    padding: 1rem 1.5rem;
}

/* 导出控制区域 */
.export-controls {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 表格增强 */
.table-enhanced {
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table-enhanced thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table-enhanced tbody tr:hover {
    background-color: #f8f9fa;
}

/* 表单增强 */
.form-enhanced .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-enhanced .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(32, 107, 196, 0.25);
}

/* 按钮增强 */
.btn-enhanced {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn-enhanced:hover {
    transform: translateY(-1px);
    box-shadow: var(--box-shadow);
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1050;
    min-width: 300px;
    max-width: 400px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 加载状态 */
.loading-overlay {
    position: relative;
}

.loading-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius);
    z-index: 10;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #6c757d;
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state .empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state .empty-subtitle {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .export-controls {
        margin-left: 0;
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .toolbar-card .card-body {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-card .h1 {
        font-size: 2rem;
    }
    
    .notification {
        left: 1rem;
        right: 1rem;
        min-width: auto;
    }
}

@media (max-width: 576px) {
    .container-xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .btn-group .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* 暗色主题支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --light-bg: #1a1d29;
        --border-color: #2d3748;
    }
}

/* 打印样式 */
@media print {
    .d-print-none {
        display: none !important;
    }
    
    .page-wrapper {
        padding: 0 !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}

/* 辅助工具类 */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.user-select-none {
    user-select: none;
}

.border-radius-lg {
    border-radius: calc(var(--border-radius) * 2);
}

.shadow-hover:hover {
    box-shadow: var(--box-shadow);
    transition: var(--transition);
} 