.checkbox-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-field input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.sprite-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
    background: #2b2b2b;
    border: 1px solid #1e1e1e;
}

.sprite-item {
    aspect-ratio: 1;
    background: #3c3c3c;
    border: 2px solid #3c3c3c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.sprite-item:hover {
    border-color: #5a5a5a;
}

.sprite-item.selected {
    border-color: #4a90e2;
    background: #2a3a4a;
}

.sprite-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sprite-item-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    font-size: 9px;
    padding: 2px 4px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.sprite-item-actions {
    position: absolute;
    top: 2px;
    right: 2px;
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.2s;
}

.sprite-item:hover .sprite-item-actions {
    opacity: 1;
}

.sprite-action-btn {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.sprite-item-name[contenteditable="true"] {
    background: rgba(0, 0, 0, 0.5);
    padding: 1px 2px;
}

.object-list {
    max-height: 200px;
    overflow-y: auto;
    background: #2b2b2b;
    border: 1px solid #1e1e1e;
}

.object-item {
    padding: 8px 12px;
    border-bottom: 1px solid #1e1e1e;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.object-item:hover {
    background: #3a3a3a;
}

.object-item.selected {
    background: #2a3a4a;
    border-left: 3px solid #4a90e2;
}

.object-item-delete {
    color: #d24a4a;
    cursor: pointer;
    font-size: 14px;
}

.object-item-delete:hover {
    color: #e25a5a;
}

.file-upload-btn {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-upload-btn input[type="file"] {
    position: absolute;
    left: -9999px;
}

.upload-label {
    display: block;
    background: #4a4a4a;
    border: 1px solid #3a3a3a;
    color: #cccccc;
    padding: 7px 12px;
    font-size: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
}

.upload-label:hover {
    background: #5a5a5a;
}

.info-text {
    font-size: 10px;
    color: #777777;
    font-style: italic;
}

#ghostSprite {
    position: absolute;
    pointer-events: none;
    opacity: 0.5;
    z-index: 1000;
    display: none;
}
