/**
 * 自定义栏目样式文件
 * 
 * 包含各种类型自定义栏目的样式定义
 */

/* === 基础自定义栏目样式 === */
.custom-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.custom-stats-grid,
.learning-stats-grid,
.reading-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.custom-content .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--bg-card-hover);
    border: 1px dashed var(--border-primary);
}

.custom-content .stat-label {
    color: var(--text-muted);
    font-size: 13px;
}

.custom-content .stat-number {
    font-weight: 600;
    color: var(--text-primary);
}

.custom-content-text {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

/* === 项目展示样式 === */
.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-item {
    background: var(--bg-card-hover);
    border: 1px solid var(--border-primary);
    border-radius: 10px;
    padding: 12px;
    transition: all 0.3s ease;
}

.project-item:hover {
    background: var(--bg-card);
    border-color: var(--border-secondary);
    transform: translateY(-1px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.project-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.project-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.project-status.completed {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.project-status.in-progress {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.project-status.planned {
    background: rgba(108, 117, 125, 0.2);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.project-description {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

.project-links {
    display: flex;
    gap: 8px;
}

.project-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-primary);
}

.project-links a:hover {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
    transform: scale(1.1);
}

/* === 学习统计特殊样式 === */
.learning-stats-grid .stat-item {
    background: linear-gradient(135deg, rgba(116, 185, 255, 0.1) 0%, rgba(116, 185, 255, 0.05) 100%);
    border-color: rgba(116, 185, 255, 0.2);
}

.learning-stats-grid .stat-number {
    color: var(--accent-blue);
}

/* === 阅读统计特殊样式 === */
.reading-stats-grid .stat-item {
    background: linear-gradient(135deg, rgba(253, 121, 168, 0.1) 0%, rgba(253, 121, 168, 0.05) 100%);
    border-color: rgba(253, 121, 168, 0.2);
}

.reading-stats-grid .stat-number {
    color: var(--accent-pink);
}

/* === 响应式设计 === */
@media (max-width: 480px) {
    .custom-stats-grid,
    .learning-stats-grid,
    .reading-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .project-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .project-status {
        align-self: flex-end;
    }
}

/* === 暗色主题适配 === */
[data-theme="dark"] .project-status.completed {
    background: rgba(40, 167, 69, 0.15);
    color: #4caf50;
}

[data-theme="dark"] .project-status.in-progress {
    background: rgba(255, 193, 7, 0.15);
    color: #ffeb3b;
}

[data-theme="dark"] .project-status.planned {
    background: rgba(158, 158, 158, 0.15);
    color: #9e9e9e;
}

/* === 动画效果 === */
.custom-content .stat-item,
.project-item {
    animation: fadeInUp 0.5s ease-out;
}

.custom-content .stat-item:nth-child(2) {
    animation-delay: 0.1s;
}

.custom-content .stat-item:nth-child(3) {
    animation-delay: 0.2s;
}

.custom-content .stat-item:nth-child(4) {
    animation-delay: 0.3s;
}

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

/* === 加载状态样式 === */
.custom-section-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-muted);
}

.custom-section-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-primary);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

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

/* === 错误状态样式 === */
.custom-section-error {
    padding: 12px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 8px;
    color: #dc3545;
    font-size: 13px;
    text-align: center;
}

[data-theme="dark"] .custom-section-error {
    background: rgba(220, 53, 69, 0.05);
    color: #ff6b6b;
}
