.volume-shader-info {
    width: 100%;
    margin-top: 20px;
    background: #ffffff;
    padding: 10px 0;
    border-top: 1px solid #e0e0e0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    flex: none; /* 保证不会被父容器的flex撑满 */
}

.volume-shader-info h3 {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.volume-shader-info p {
    color: #555;
    font-size: 13px;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .volume-shader-info {
        padding: 15px;
    }
    
    .volume-shader-info h3 {
        font-size: 15px;
    }
    
    .volume-shader-info p {
        font-size: 12px;
    }
}
#volume-shader-bm-wrapper {
    width: 100%;
    background: #f8f9fa;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: auto;   /* 不再强制100vh */
    max-height: 80vh;  /* 占屏幕高度不超过70% */
    overflow: hidden;
}

#volume-shader-warning {
    width: 100%;
    flex: none;  /* 不占满剩余高度 */
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8f9fa;
    padding: 20px;
    box-sizing: border-box;
}

.warning-content {
    width: 100%;
    max-width: 500px;
    text-align: center;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    padding: 40px 20px;
    box-sizing: border-box;
}

.warning-content h3 {
    color: #dc3545;
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.warning-content p {
    color: #666;
    margin: 0 0 30px 0;
    font-size: 14px;
    line-height: 1.5;
}

#volume-shader-confirm-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 30px;
    font-size: 14px;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-block;
}

#volume-shader-confirm-btn:hover {
    background: #0056b3;
}

#volume-shader-canvas {
    display: block;
    background: #f8f9fa;
    width: 100%;
    height: auto;
    margin: 0 auto;
    box-sizing: border-box;
    max-width: 100%;
}

#volume-shader-config-btn {
    position: absolute;
    left: 0;
    top: 0;
    background: #6c757d;
    color: white;
    border: 1px solid #495057;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    z-index: 10;
    border-radius: 0;
}

#volume-shader-stop-btn {
    position: absolute;
    right: 0;
    top: 0;
    background: #6c757d;
    color: white;
    border: 1px solid #495057;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    z-index: 10;
    border-radius: 0;
}

#volume-shader-config-panel {
    position: absolute;
    left: 0;
    top: 30px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    padding: 10px;
    z-index: 10;
    border-radius: 0;
    max-width: calc(100% - 20px);
    box-sizing: border-box;
    overflow: hidden;
}

#volume-shader-kernel {
    width: 100%;
    max-width: 300px;
    background: #f8f9fa;
    color: #212529;
    border: 1px solid #dee2e6;
    font-family: monospace;
    font-size: 12px;
    padding: 5px;
    border-radius: 0;
    box-sizing: border-box;
    resize: vertical;
}

#volume-shader-config-panel div {
    margin-top: 5px;
    text-align: right;
}

#volume-shader-apply-btn,
#volume-shader-cancel-btn {
    background: #6c757d;
    color: white;
    border: 1px solid #495057;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 5px;
    border-radius: 0;
    min-width: 60px;
}

#volume-shader-apply-btn:hover,
#volume-shader-cancel-btn:hover,
#volume-shader-config-btn:hover,
#volume-shader-stop-btn:hover {
    background: #5a6268;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .warning-content {
        padding: 30px 15px;
    }
    
    .warning-content h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .warning-content p {
        font-size: 13px;
        margin-bottom: 25px;
    }
    
    #volume-shader-confirm-btn {
        padding: 8px 20px;
        font-size: 13px;
    }
    
    #volume-shader-canvas {
        width: 100%;
        height: auto;
        max-width: 100vw;
        max-height: 100vh;
    }
    
    #volume-shader-config-panel {
        width: calc(100% - 20px);
        left: 10px;
        right: 10px;
        top: 30px;
    }
    
    #volume-shader-kernel {
        max-width: none;
        width: 100%;
    }
    
    #volume-shader-config-btn,
    #volume-shader-stop-btn {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    #volume-shader-bm-wrapper {
        min-height: auto;
    }
}

@media screen and (max-width: 480px) {
    .warning-content {
        padding: 20px 10px;
    }
    
    .warning-content h3 {
        font-size: 15px;
    }
    
    .warning-content p {
        font-size: 12px;
    }
    
    #volume-shader-confirm-btn {
        padding: 6px 15px;
        font-size: 12px;
    }
    
    #volume-shader-config-btn,
    #volume-shader-stop-btn {
        font-size: 10px;
        padding: 2px 4px;
    }
    
    #volume-shader-canvas {
        width: 100%;
        height: auto;
    }
}