/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* 标题样式 */
h1 {
    color: #0d6efd;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* 卡片样式 */
.card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
    font-weight: 600;
    border-bottom: 0;
}

/* 表格样式 */
/* 表格样式 */
.table {
    margin-bottom: 0;
}

.table th {
    background-color: #f1f5f9;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
}

.table td {
    vertical-align: middle;
}

/* 统一所有数据列的宽度 */
.table th:not(:first-child):not(:nth-child(2)), 
.table td:not(:first-child):not(:nth-child(2)) {
    min-width: 63px;
    width: auto;
    text-align: center;
}

/* 第一列（骨料名称列）宽度 */
.table th:first-child, 
.table td:first-child {
    min-width: 110px;
    width: auto;
}

/* 第二列宽度设置小一点 */
.table th:nth-child(2), 
.table td:nth-child(2) {
    min-width: 45px;
    width: auto;
    text-align: center;
}

/* 输入框样式 */
.form-control {
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-control[readonly] {
    background-color: #f8f9fa;
}

/* 按钮样式 */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline-primary:hover {
    background-color: #0d6efd;
    color: white;
}

.btn-outline-success:hover {
    background-color: #198754;
    color: white;
}

.btn-outline-info:hover {
    background-color: #0dcaf0;
    color: white;
}

/* 复选框样式 */
.form-check-input {
    cursor: pointer;
}

/* 图表容器样式 */
#gradationChart {
    width: 100%;
    height: 400px;
}

/* 表格响应式调整 */
@media (max-width: 992px) {
    .table-responsive {
        overflow-x: auto;
    }
    
    .form-control {
        font-size: 0.875rem;
        padding: 0.25rem 0.5rem;
    }
}

/* 特殊行样式 */
.table-info {
    background-color: rgba(13, 202, 240, 0.1) !important;
}

.table-warning {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

.table-success {
    background-color: rgba(25, 135, 84, 0.1) !important;
}

.table-danger {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.card {
    animation: fadeIn 0.5s ease-in-out;
}

/* 优化结果显示区域 */
#optimizationResult {
    font-size: 0.85rem;
    color: #0d6efd;
}