body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fbf8f2;
}

.container {
    display: flex;
    min-height: 100vh;
}

.left-side {
    width: 75%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.canvas-container {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 2 / 3;
    position: relative;
    overflow: visible;
}

.nft-display {
    width: 100%;
    height: 100%;
    background-color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: visible;
    min-height: 400px;
}

.button-group {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.reset-button,
.download-button {
    padding: 10px 20px;
    font-size: 16px;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.reset-button {
    background-color: #f44336;
}

.reset-button:hover {
    background-color: #d32f2f;
}

.download-button {
    background-color: #000000;
}

.download-button:hover {
    background-color: #45a049;
}

.right-side {
    width: 25%;
    padding: 20px;
    background-color: white;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.category {
    margin-bottom: 20px;
}

.category h2 {
    margin-bottom: 10px;
}

.component-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.component-button {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
    cursor: pointer;
    width: 50px;
    height: 50px;
}

.component-button.selected {
    background-color: #fff;
    border: 2px solid #f8a732;
}

.upload-button {
    background-color: #f8f8f8 !important;
    /* border: 2px dashed #ccc !important; */
    transition: all 0.3s ease;
}

.upload-button:hover {
    background-color: #e8e8e8 !important;
    border-color: #f8a732 !important;
}

.component-button svg {
    width: 100%;
    height: 100%;
}

.nft-display svg {
    isolation: isolate;
}

.nft-display [data-category="Background"] {
    z-index: 1;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.nft-display [data-category="Background"] svg {
    width: 100%;
    height: 100%;
    display: block;
}

.nft-display [data-category="Background"] img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.nft-display [data-category="Action"] {
    z-index: 2;
}

.nft-display [data-category="Body"] {
    z-index: 3;
}

.nft-display [data-category="Role"] {
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nft-display [data-category="Role"] img {
    object-fit: contain !important;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.nft-display [data-category="Accessories"] {
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nft-display [data-category="Accessories"] img {
    object-fit: contain !important;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

/* Editable component styles */
.editable-component {
    cursor: grab;
    position: absolute;
    transition: transform 0.1s ease;
    transform-origin: center center;
}

.editable-component:active {
    cursor: grabbing;
}

.editable-component img {
    border: 2px solid transparent;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.editable-component.selected img {
    border-color: #f8a732;
}

.component-controls {
    position: absolute;
    top: -30px;
    right: -30px;
    display: none;
    gap: 5px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 5px;
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
    transform-origin: center center;
}

.editable-component.selected .component-controls {
    display: flex;
}

.control-btn {
    width: 20px;
    height: 20px;
    background: #f8a732;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.control-btn:hover {
    background: #e6951f;
}

.control-btn:active {
    transform: scale(0.95);
}

/* Component selected state - remove empty rule */

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .left-side,
    .right-side {
        width: 100%;
        padding: 10px;
        box-sizing: border-box;
    }

    .canvas-container {
        max-width: 90%;
        margin: 0 auto;
    }

    .button-group {
        width: 100%;
        justify-content: center;
    }

    .right-side {
        box-shadow: none;
        overflow-y: visible;
    }

    .component-list {
        justify-content: flex-start;
    }
}
