/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', '微软雅黑', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 10px;
}

/* 头部样式 - 减小边距 */
header {
    background: linear-gradient(to right, #3a7bd5, #00d2ff);
    color: white;
    padding: 10px 0;
    text-align: center;
    border-radius: 10px 10px 0 0;
    margin-bottom: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1, h2, h3 {
    margin-bottom: 8px;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
    color: #3a7bd5;
    border-bottom: 2px solid #eee;
    padding-bottom: 6px;
}

h3 {
    font-size: 1.1rem;
    color: #444;
}

/* 主要内容区域 */
.calculator-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 卡片通用样式 - 减小内边距 */
.card {
    background: white;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 10px;
}

/* 输入区域 */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 容器选择样式 - 修改为紧凑行布局 */
.container-options, .pallet-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.container-type, .pallet-type {
    border: 2px solid #eee;
    border-radius: 5px;
    padding: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    flex: 0 0 19%;
    min-width: 160px;
    max-width: 180px;
}

.container-type:hover, .pallet-type:hover {
    border-color: #3a7bd5;
    transform: translateY(-3px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.container-type.selected, .pallet-type.selected {
    border-color: #3a7bd5;
    background-color: rgba(58, 123, 213, 0.05);
}

.container-type img, .pallet-type img {
    width: 100%;
    height: 70px;
    object-fit: contain;
    margin-bottom: 5px;
}

.container-type p, .pallet-type p {
    color: #666;
    font-size: 0.8rem;
    margin: 2px 0;
}

/* 自定义尺寸输入 - 更紧凑 */
.custom-dimensions, .custom-pallet-dimensions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 8px;
    text-align: left;
}

.custom-dimensions label, .custom-pallet-dimensions label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.custom-dimensions input, .custom-pallet-dimensions input {
    width: 80px;
    padding: 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

/* 货物信息样式 - 更紧凑 */
.cargo-options {
    margin-top: 10px;
}

.cargo-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.cargo-item {
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 8px;
    background-color: #f9f9f9;
}

.cargo-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    margin-top: 5px;
}

.cargo-details label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.cargo-details input[type="number"] {
    width: 70px;
    padding: 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.cargo-details select {
    width: 110px;
    padding: 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background-color: white;
    font-size: 0.85rem;
}

/* 货物颜色选择器 */
.cargo-color {
    cursor: pointer;
    border: 1px solid #ccc;
    transition: transform 0.2s ease;
}

.cargo-color:hover {
    transform: scale(1.2);
}

/* 按钮样式 - 更紧凑 */
button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    background-color: #f0f0f0;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

button:hover {
    background-color: #e0e0e0;
}

.primary-btn {
    background-color: #3a7bd5;
    color: white;
    padding: 8px 16px;
    font-weight: bold;
}

.primary-btn:hover {
    background-color: #2a6ac5;
}

.remove-cargo {
    background-color: #ff4d4d;
    color: white;
    padding: 4px 8px;
    font-size: 0.8rem;
}

.remove-cargo:hover {
    background-color: #e60000;
}

.actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* 间隙设置区域 */
.spacing-settings {
    margin: 10px 0;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 10px;
    background-color: #f9f9f9;
}

.spacing-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
}

.spacing-options label {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    white-space: nowrap;
    margin-right: 10px;
}

.spacing-options input {
    width: 50px;
    padding: 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
    margin-left: 5px;
}

/* 输出区域样式 */
.output-section {
    background-color: white;
}

/* 多容器导航 */
.container-navigation {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.container-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.container-tab {
    padding: 5px 12px;
    background-color: #f0f0f0;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.container-tab:hover {
    background-color: #e0e0e0;
}

.container-tab.active {
    background-color: #3a7bd5;
    color: white;
}

/* 装载统计信息 */
.loading-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.progress-bar {
    width: 100%;
    height: 15px;
    background-color: #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(to right, #3a7bd5, #00d2ff);
    transition: width 0.5s ease;
}

/* 3D可视化区域 */
.visualization {
    margin-bottom: 15px;
}

.container-3d {
    width: 100%;
    height: 400px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: transparent;
    margin-bottom: 10px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

.visualization-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

/* 视图切换按钮 */
.visualization-views {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
}

.view-btn {
    padding: 6px 15px;
    border-radius: 15px;
    font-weight: bold;
    background-color: #f0f0f0;
    color: #555;
}

.view-btn:hover {
    background-color: #e0e0e0;
}

.view-btn.active {
    background-color: #3a7bd5;
    color: white;
}

/* 装载顺序列表 */
.loading-sequence {
    margin-bottom: 15px;
}

#loading-sequence-list {
    list-style-position: inside;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #f9f9f9;
    max-height: 300px;
    overflow-y: auto;
}

#loading-sequence-list li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

#loading-sequence-list li:last-child {
    border-bottom: none;
}

/* 导出选项 */
.export-options {
    display: flex;
    gap: 10px;
}

/* 模态窗口样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 15px;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

#print-content {
    max-height: 60vh;
    overflow-y: auto;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin: 15px 0;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 15px 0;
    margin-top: 20px;
    color: #666;
    border-top: 1px solid #eee;
}

/* 响应式设计 */
@media (min-width: 1366px) {
    .calculator-container {
        flex-direction: row;
    }
    
    .input-section {
        flex: 0 0 55%;
    }
    
    .output-section {
        flex: 0 0 45%;
    }
}

@media (max-width: 768px) {
    .container-options, .pallet-options {
        flex-direction: column;
        align-items: center;
    }
    
    .container-type, .pallet-type {
        max-width: 100%;
    }
    
    .cargo-details {
        grid-template-columns: 1fr;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .export-options {
        flex-direction: column;
    }
    
    .visualization-views {
        flex-wrap: wrap;
    }
}

/* 间隙设置单行显示 */
.spacing-options {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 15px;
}

.spacing-options label {
    white-space: nowrap;
}

.spacing-options input {
    width: 50px;
} 