/* JavaScript压缩工具专用样式 */
.js-minifier-tool {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* 代码编辑器样式 */
.font-monospace {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
    font-size: 14px;
    line-height: 1.5;
}

.form-control.font-monospace {
    resize: vertical;
    min-height: 400px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

.form-control.font-monospace:focus {
    background-color: #ffffff;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* 统计信息样式 */
.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #495057;
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.stat-item {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

/* 压缩选项样式 */
.form-check-inline {
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* 按钮组样式 */
.btn-group .btn {
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-group .btn:hover {
    transform: translateY(-1px);
}

/* 卡片增强 */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* 状态栏样式 */
.alert {
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
}

.alert-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #0d47a1;
}

/* 分析结果样式 */
.analysis-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 0.375rem;
    border-left: 4px solid #0d6efd;
}

.analysis-item.warning {
    border-left-color: #ffc107;
    background: #fff8e1;
}

.analysis-item.error {
    border-left-color: #dc3545;
    background: #ffebee;
}

.analysis-item.success {
    border-left-color: #198754;
    background: #e8f5e8;
}

/* 优化建议样式 */
.suggestion-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    background: #ffffff;
    transition: all 0.2s ease;
}

.suggestion-item:hover {
    border-color: #86b7fe;
    box-shadow: 0 0.125rem 0.25rem rgba(13, 110, 253, 0.15);
}

.suggestion-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.suggestion-description {
    color: #6c757d;
    font-size: 0.875rem;
}

.suggestion-impact {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.25rem;
    margin-top: 0.5rem;
}

.impact-high {
    background-color: #f8d7da;
    color: #721c24;
}

.impact-medium {
    background-color: #fff3cd;
    color: #856404;
}

.impact-low {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* 压缩率显示 */
.compression-rate {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.compression-rate.good {
    color: #198754;
}

.compression-rate.medium {
    color: #ffc107;
}

.compression-rate.poor {
    color: #dc3545;
}

/* 文件上传样式 */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #86b7fe;
    background-color: #f8f9fa;
}

.upload-area.dragover {
    border-color: #0d6efd;
    background-color: #e7f3ff;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .form-check-inline {
        display: block;
        margin-bottom: 0.75rem;
    }

    .stat-value {
        font-size: 1rem;
    }

    .compression-rate {
        font-size: 1.5rem;
    }

    .btn-group .btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
}

/* 动画效果 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.analysis-results {
    animation: slideInUp 0.3s ease-out;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .form-control {
        border-width: 2px;
    }

    .btn {
        border-width: 2px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .form-control {
        background-color: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .form-control:focus {
        background-color: #1a202c;
        border-color: #63b3ed;
    }

    .card {
        background-color: #2d3748;
        color: #e2e8f0;
    }

    .card-header {
        background-color: #4a5568;
        border-bottom-color: #718096;
    }
}