body {
    margin: 0;
    background: #000;
    color: #fff;
    font-family: 'Segoe UI', sans-serif;
    overflow: hidden;
}

canvas {
    display: block;
}

#controls {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(30, 30, 30, 0.8);
    padding: 10px;
    border-radius: 14px;
    width: 200px;
    z-index: 1000;
}

.button {
    width: 100%;
    padding: 6px;
    margin: 6px 0;
    background: #444444;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.button:hover {
    background: #e74c3c;
}

#objectList, #textureList {
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #dadada #444444;
}

#objectList::-webkit-scrollbar, #textureList::-webkit-scrollbar {
    width: 6px;
}

#objectList::-webkit-scrollbar-track, #textureList::-webkit-scrollbar-track {
    background: #444444;
    border-radius: 3px;
}

#objectList::-webkit-scrollbar-thumb, #textureList::-webkit-scrollbar-thumb {
    background: #e74c3c;
    border-radius: 3px;
}

.item {
    display: flex;
    align-items: center;
    margin: 4px 0;
    cursor: pointer;
}

.object-container, .texture-container {
    display: flex;
    align-items: center;
    width: 100%;
}

.item img {
    width: 200px;
    height: 40px;
    max-width: 200px;
    border-radius: 3px;
}

.item.selected img {
    border: 2px solid #e74c3c;
}

.item.button {
    padding: 5px 10px;
    background: rgba(194, 194, 194, 0.5); /* Trong suốt nhẹ */
    border: none;
    border-radius: 12px; /* Bo tròn nhẹ */
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 80%;
}

.item.button.selected {
    background: #e74c3c; /* Đổi màu khi chọn */
}

.delete-btn {
    margin-left: auto; /* Căn lề phải */
    background: #444444;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 10px;
    width: 20px;
    height: 20px;
    line-height: 16px;
    cursor: pointer;
}

.delete-btn:hover {
    background: #c0392b;
}

#status, #credit, #watermark {
    position: absolute;
    bottom: 10px;
    padding: 6px 10px;
    background: rgba(30, 30, 30, 0.9);
    border-radius: 3px;
    font-size: 10px;
}

#status { left: 10px; }
#credit { right: 60px; color: #bdc3c7; }
#watermark { right: 10px; width: 40px; height: 40px; opacity: 0.7; }

#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 3s ease; /* Thời gian hiện loading 3 giây */
}

#loadingScreen.hidden {
    opacity: 0;
    pointer-events: none;
}

#loadingScreen img { width: 300px; }

canvas.dragover { border: 2px dashed #3498db; }

video.hidden { display: none; }

#videoControls {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 30, 0.9);
    padding: 5px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    z-index: 1000;
    visibility: hidden;
}

#videoControls.visible { visibility: visible; }

#playPauseVideoBtn {
    width: 60px;
    padding: 5px;
    margin-right: 5px;
    background: #444444;
    border: none;
    border-radius: 3px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}

#playPauseVideoBtn:hover { background: #e74c3c; }

#videoScrub { width: 200px; accent-color: #3498db; }

#colorPicker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 10px;
    background: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

:root {
    --default-color: #444444;
}