/* 整体页面布局与颜色 */
.tunnel-view-container {
    background-color: var(--bg-light);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-lg);
}

/* 顶部信息区域 */
.tunnel-quick-details {
    background-color: var(--bg-sidebar);
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: var(--shadow-sm);
}

.tunnel-quick-details span {
    padding: 4px 10px;
    border-radius: 15px;
    background-color: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border-card);
}

.tunnel-quick-details .text-primary {
    background-color: #e6f3ff;
    border-color: #b8dbff;
    color: #0056b3 !important;
    font-weight: var(--font-weight-semibold) !important;
}

/* 分析部分 */
.vibration-analysis-section .card {
    margin-bottom: 2rem;
    border: none;
    box-shadow: var(--shadow-md);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.vibration-analysis-section .card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.vibration-analysis-section .card-header {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
    padding: 16px 20px;
}

.vibration-analysis-section .card-body {
    padding: 20px;
    background-color: var(--bg-lighter);
}

#delay-charge-chart,
#ppv-chart {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    background-color: var(--chart-bg);
}

/* 3D场景容器 */
.tunnel-scene-container .card {
    box-shadow: var(--shadow-lg);
    border-radius: 16px;
    overflow: hidden;
    border: none;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tunnel-scene-container .card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.tunnel-scene-container .card-body {
    padding: 16px;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    background-color: var(--chart-bg);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    position: relative;
}

.tunnel-scene-container .card-footer {
    background-color: var(--bg-sidebar);
    border-top: 1px solid var(--border-light);
    padding: 16px 24px;
    flex-shrink: 0;
}

#scene-container {
    border: none;
    background-color: transparent;
    box-shadow: none;
    border-radius: 8px;
    padding: 0;
    width: 100%;
    height: 100%;
    max-width: 800px;
    max-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-footer {
    background-color: var(--bg-sidebar);
    border-top: 1px solid var(--border-light);
    padding: 16px 24px;
}

/* 按钮样式 */
#blast-button {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: var(--font-weight-medium);
    padding: 6px 16px;
    font-size: 0.8rem;
    box-shadow: 0 2px 6px rgba(10, 47, 92, 0.2);
    transition: all 0.3s ease;
    border-radius: 6px;
    min-width: 120px;
}

#blast-button:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(10, 47, 92, 0.25);
}

#reset-button {
    background-color: var(--text-secondary);
    border-color: var(--text-secondary);
    color: white;
    font-weight: var(--font-weight-medium);
    padding: 6px 16px;
    font-size: 0.8rem;
    box-shadow: 0 2px 6px rgba(176, 184, 193, 0.3);
    transition: all 0.3s ease;
    border-radius: 6px;
    min-width: 120px;
}

#reset-button:hover {
    background-color: var(--text-light);
    border-color: var(--text-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(176, 184, 193, 0.4);
}

/* 爆破孔表格 */
.tunnel-info-sidebar .card {
    border-radius: 16px;
    overflow: hidden;
    border: none;
    box-shadow: var(--shadow-lg);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tunnel-info-sidebar .card-header {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
    padding: 16px 20px;
}

.blast-hole-list {
    max-height: 650px; /* 限制最大高度 */
    min-height: 600px;
    overflow-y: auto; /* 启用垂直滚动 */
    background-color: var(--bg-lighter);
    flex: 1;
    scrollbar-width: thin; /* 细滚动条 */
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track); /* 滚动条颜色 */
}

/* 自定义滚动条样式 */
.blast-hole-list::-webkit-scrollbar {
    width: 8px;
}

.blast-hole-list::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 4px;
}

.blast-hole-list::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb);
    border-radius: 4px;
    border: 2px solid var(--scrollbar-track);
}

.blast-holes-table {
    margin-bottom: 0;
}

.blast-holes-table thead th {
    position: sticky;
    top: 0;
    background-color: var(--table-header-bg);
    z-index: 10;
    padding: 12px 10px;
    font-weight: var(--font-weight-light);
    color: var(--text-secondary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.blast-holes-table tbody tr:hover {
    background-color: var(--table-row-hover);
}

.blast-holes-table td {
    padding: 10px;
    vertical-align: middle;
    font-size: var(--font-size-caption); /* 减小数据字体大小 */
}

/* 确保每行都保持一致的高度 */
.row.g-4 {
    display: flex;
    flex-wrap: wrap;
}

.row.g-4 > [class*='col-'] {
    display: flex;
    flex-direction: column;
}

.row.g-4 > [class*='col-'] > .card {
    flex: 1;
}

/* 改进按钮组样式 */
.btn-group-sm .btn {
    border-radius: 6px;
    margin: 0 1px;
    font-weight: var(--font-weight-light);
    font-size: var(--font-size-caption); /* 与表格数据字体大小保持一致 */
    transition: all 0.2s;
}

.btn-outline-secondary:hover {
    background-color: var(--text-light);
    border-color: var(--text-light);
}

.btn-outline-danger:hover {
    background-color: var(--status-error);
    border-color: var(--status-error);
}

/* 提高标题和内容对比度 */
h4, h5 {
    color: var(--text-dark);
    font-weight: var(--font-weight-semibold);
}

/* 分析切换按钮样式优化 */
.btn-outline-secondary {
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* 增加图表响应式 */
@media (max-width: 768px) {
    .tunnel-view-container {
        padding: 12px;
    }
    
    .tunnel-quick-details {
        flex-direction: column;
        gap: 8px !important;
    }
    
    .tunnel-quick-details span {
        display: inline-block;
        margin-bottom: 5px;
    }
    
    /* 移动端下调整炮孔列表高度 */
    .blast-hole-list {
        max-height: 300px;
    }
    
    /* 移动端隧道场景容器优化 */
    .tunnel-scene-container .card-body {
        min-height: 300px;
        padding: 12px;
    }
    
    #scene-container {
        max-width: 100%;
        max-height: 350px;
        border-radius: 6px;
    }
    
    /* 移动端按钮优化 */
    .tunnel-scene-container .card-footer {
        padding: 12px 16px;
    }
    
    .tunnel-scene-container .card-footer .d-flex {
        flex-direction: column;
        gap: 8px;
    }
    
    .tunnel-scene-container .card-footer .btn {
        width: 100%;
        padding: 8px 12px;
        font-size: 0.75rem;
        min-width: auto;
    }
    
    /* 移动端顶部操作按钮优化 */
    #share-design-btn,
    #export-pdf-btn {
        padding: 5px 12px;
        font-size: 0.7rem;
    }
}

/* 中等屏幕优化 */
@media (max-width: 991px) and (min-width: 769px) {
    .tunnel-scene-container .card-body {
        min-height: 350px;
    }
    
    #scene-container {
        max-width: 700px;
        max-height: 450px;
    }
}

/* 大屏幕优化 */
@media (min-width: 1200px) {
    .tunnel-scene-container .card-body {
        min-height: 450px;
    }
    
    #scene-container {
        max-width: 900px;
        max-height: 550px;
    }
}

/* 碎块度分析部分样式 */
.fragmentation-analysis-section {
    transition: all 0.3s ease;
}

.fragmentation-analysis-section .card {
    box-shadow: var(--shadow-sm);
}

.fragmentation-analysis-section .card-header {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

#frag-analysis-loading {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#size-distribution-chart {
    width: 100%;
    height: 100%;
    min-height: 250px;
}

/* 隧道视图页面样式 */

/* 炮孔列表行样式 */
.blast-hole-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.blast-hole-row:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

/* 防止删除按钮的父元素也触发点击事件 */
.blast-hole-row td:last-child {
    cursor: default;
}

/* 调试按钮样式 */
.debug-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    padding: 5px 10px;
    background-color: rgba(255, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: var(--font-size-caption);
}

/* 隧道场景容器 */
.tunnel-scene-container {
    position: relative;
}

/* 隐藏元素 */
.hidden {
    display: none !important;
}

/* 顶部操作按钮样式 */
#share-design-btn {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: var(--font-weight-medium);
    padding: 6px 14px;
    font-size: 0.75rem;
    box-shadow: 0 2px 4px rgba(10, 47, 92, 0.15);
    transition: all 0.3s ease;
    border-radius: 6px;
}

#share-design-btn:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(10, 47, 92, 0.2);
}

#export-pdf-btn {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    font-weight: var(--font-weight-medium);
    padding: 6px 14px;
    font-size: 0.75rem;
    box-shadow: 0 2px 4px rgba(243, 108, 33, 0.2);
    transition: all 0.3s ease;
    border-radius: 6px;
}

#export-pdf-btn:hover {
    background-color: #e05a10;
    border-color: #e05a10;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(243, 108, 33, 0.25);
} 