/* 组件样式 */

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.stat-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 24px;
    color: #fff;
}

.stat-card-icon.primary {
    background: linear-gradient(135deg, #409eff, #66b1ff);
}

.stat-card-icon.success {
    background: linear-gradient(135deg, #67c23a, #85ce61);
}

.stat-card-icon.warning {
    background: linear-gradient(135deg, #e6a23c, #ebb563);
}

.stat-card-icon.danger {
    background: linear-gradient(135deg, #f56c6c, #f78989);
}

.stat-card-content h3 {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    line-height: 1;
}

.stat-card-content p {
    font-size: 14px;
    color: #909399;
    margin: 4px 0 0;
}

.stat-card-trend {
    display: flex;
    align-items: center;
    margin-top: 12px;
    font-size: 12px;
}

.stat-card-trend.up {
    color: #67c23a;
}

.stat-card-trend.down {
    color: #f56c6c;
}

.stat-card-trend i {
    margin-right: 4px;
}

/* 项目列表 */
.project-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.project-item {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.project-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-color: #409eff;
}

.project-item-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.project-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: #409eff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: #fff;
    font-size: 18px;
}

.project-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    flex: 1;
}

.project-item-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.project-item-status.active {
    background: #f0f9ff;
    color: #409eff;
    border: 1px solid #b3d8ff;
}

.project-item-status.inactive {
    background: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fbc4c4;
}

.project-item-description {
    color: #606266;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.project-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #909399;
}

.project-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #ebeef5;
}

/* 文件树 */
.file-tree {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.file-tree-header {
    padding: 16px 20px;
    background: #fafafa;
    border-bottom: 1px solid #ebeef5;
    font-weight: 600;
    color: #2c3e50;
}

.file-tree-content {
    max-height: 400px;
    overflow-y: auto;
}

.file-tree-item {
    padding: 8px 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f5f7fa;
}

.file-tree-item:hover {
    background: #f5f7fa;
}

.file-tree-item.active {
    background: #ecf5ff;
    color: #409eff;
}

.file-tree-item-icon {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.file-tree-item-name {
    flex: 1;
    font-size: 14px;
}

.file-tree-item-size {
    font-size: 12px;
    color: #909399;
}

/* 编辑器工具栏 */
.editor-toolbar {
    background: #fff;
    border-bottom: 1px solid #ebeef5;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.editor-toolbar-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.editor-toolbar-separator {
    width: 1px;
    height: 20px;
    background: #ebeef5;
    margin: 0 4px;
}

.editor-toolbar-button {
    padding: 6px 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    background: #fff;
    color: #606266;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.editor-toolbar-button:hover {
    background: #f5f7fa;
    border-color: #c0c4cc;
}

.editor-toolbar-button.active {
    background: #409eff;
    border-color: #409eff;
    color: #fff;
}

.editor-toolbar-select {
    padding: 6px 8px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    background: #fff;
    font-size: 12px;
    min-width: 100px;
}

/* 生成进度 */
.generation-progress {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.generation-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.generation-progress-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.generation-progress-status {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.generation-progress-status.running {
    background: #f0f9ff;
    color: #409eff;
}

.generation-progress-status.completed {
    background: #f0f9f0;
    color: #67c23a;
}

.generation-progress-status.error {
    background: #fef0f0;
    color: #f56c6c;
}

.generation-progress-bar {
    height: 6px;
    background: #f5f7fa;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 12px;
}

.generation-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #409eff, #66b1ff);
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.generation-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.generation-progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #909399;
}

/* 日志面板 */
.log-panel {
    background: #2c3e50;
    border-radius: 8px;
    overflow: hidden;
    height: 300px;
    display: flex;
    flex-direction: column;
}

.log-panel-header {
    padding: 12px 16px;
    background: #34495e;
    color: #ecf0f1;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.log-panel-content {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
}

.log-entry {
    margin-bottom: 4px;
    word-break: break-all;
}

.log-entry-timestamp {
    color: #95a5a6;
    margin-right: 8px;
}

.log-entry-level {
    margin-right: 8px;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.log-entry-level.info {
    background: #3498db;
    color: #fff;
}

.log-entry-level.warn {
    background: #f39c12;
    color: #fff;
}

.log-entry-level.error {
    background: #e74c3c;
    color: #fff;
}

.log-entry-level.debug {
    background: #9b59b6;
    color: #fff;
}

.log-entry-message {
    color: #ecf0f1;
}

/* 图表容器 */
.chart-container {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ebeef5;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.chart-actions {
    display: flex;
    gap: 8px;
}

.chart-content {
    min-height: 300px;
    position: relative;
}

/* 配置表单 */
.config-form {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.config-section {
    margin-bottom: 32px;
}

.config-section:last-child {
    margin-bottom: 0;
}

.config-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #409eff;
}

.config-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* 上传组件 */
.upload-area {
    border: 2px dashed #dcdfe6;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #409eff;
    background: #f0f9ff;
}

.upload-area.dragover {
    border-color: #409eff;
    background: #f0f9ff;
}

.upload-area-icon {
    font-size: 48px;
    color: #c0c4cc;
    margin-bottom: 16px;
}

.upload-area-text {
    font-size: 14px;
    color: #606266;
    margin-bottom: 8px;
}

.upload-area-hint {
    font-size: 12px;
    color: #909399;
}

.upload-file-list {
    margin-top: 16px;
}

.upload-file-item {
    display: flex;
    align-items: center;
    padding: 8px;
    background: #f5f7fa;
    border-radius: 4px;
    margin-bottom: 8px;
}

.upload-file-icon {
    margin-right: 8px;
    color: #409eff;
}

.upload-file-name {
    flex: 1;
    font-size: 14px;
    color: #2c3e50;
}

.upload-file-size {
    font-size: 12px;
    color: #909399;
    margin-right: 8px;
}

.upload-file-progress {
    width: 60px;
    height: 4px;
    background: #ebeef5;
    border-radius: 2px;
    margin-right: 8px;
    overflow: hidden;
}

.upload-file-progress-bar {
    height: 100%;
    background: #409eff;
    transition: width 0.3s ease;
}

.upload-file-remove {
    background: none;
    border: none;
    color: #f56c6c;
    cursor: pointer;
    padding: 4px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-card-header {
        margin-bottom: 12px;
    }
    
    .stat-card-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
        margin-right: 12px;
    }
    
    .stat-card-content h3 {
        font-size: 24px;
    }
    
    .project-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .project-item {
        padding: 16px;
    }
    
    .config-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .editor-toolbar {
        padding: 8px 12px;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
} 