.model-viewer-container {
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background-color: #f9f9f9;
}

.container {
    display: flex;
    flex-direction: row;
    height: 600px;
    overflow: hidden;
    border-radius: 8px;
}

.viewer-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f1f1f1 100%);
}

.viewer-container canvas {
    width: 100%;
    height: 100%;
}

.controls-container {
    width: 320px;
    background-color: #ffffff;
    border-left: 1px solid #e0e0e0;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.control-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 6px;
    background-color: #f7f7f7;
    margin-bottom: 10px;
    transition: background-color 0.2s;
}

.control-item:hover {
    background-color: #f0f0f0;
}

.color-box {
    width: 30px;
    height: 30px;
    margin-right: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.color-box:hover {
    transform: scale(1.1);
}

.control-item span {
    flex: 1;
    font-size: 14px;
    color: #444;
}

.edit-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #007bff;
    transition: color 0.2s;
}

.edit-button:hover {
    color: #0056b3;
}

.matching-materials {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #f7f7f7;
    border-radius: 6px;
    margin-bottom: 20px;
}

.matching-materials input {
    margin-right: 8px;
}

.matching-materials label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.color-options .color-option-item {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    margin-top: 5px;
    cursor: pointer;
}

.color-options .color-option-item:hover {
    background-color: #e8f0fe;
    border-color: #007bff;
}

.download-button {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.2s;
    margin-top: auto;
}

.download-button:hover {
    background-color: #0056b3;
}

.drag-to-spin {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10;
}

.bottom-bar {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    z-index: 10;
}

.bottom-bar-button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s, border-color 0.2s;
}

.bottom-bar-button:hover {
    background-color: #f0f0f0;
    border-color: #bbb;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        height: auto;
    }

    .viewer-container {
        height: 400px;
    }

    .controls-container {
        width: 100%;
        height: auto;
        border-left: none;
        border-top: 1px solid #e0e0e0;
    }

    .drag-to-spin {
        bottom: 20px;
    }

    .bottom-bar {
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
    }
}