#texture-updater-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9000;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(40, 40, 50, 0.9);
    border: 1px solid rgba(100, 130, 255, 0.4);
    color: #8899ff;
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

#texture-updater-toggle:hover {
    background: rgba(60, 60, 80, 0.95);
    transform: scale(1.1);
}

#texture-updater-panel {
    display: none;
    position: fixed;
    bottom: 80px;
    left: 20px;
    z-index: 9001;
    width: 320px;
    max-height: 70vh;
    background: rgba(25, 25, 35, 0.95);
    border: 1px solid rgba(100, 130, 255, 0.25);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    font-family: var(--font-sans, 'Plus Jakarta Sans', sans-serif);
    color: #c8c8d8;
}

#texture-updater-panel.texture-updater-visible {
    display: block;
}

.texture-updater-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid rgba(100, 130, 255, 0.15);
}

.texture-updater-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #a0b0ff;
    letter-spacing: 0.5px;
}

.texture-updater-close {
    background: none;
    border: none;
    color: #888;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}

.texture-updater-close:hover {
    color: #ff6666;
    background: rgba(255, 100, 100, 0.1);
}

.texture-updater-body {
    padding: 12px 16px 16px;
}

.texture-updater-field {
    margin-bottom: 12px;
}

.texture-updater-field label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #8890a8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.texture-updater-field select,
.texture-updater-field input[type="file"] {
    width: 100%;
    padding: 7px 10px;
    font-size: 12px;
    background: rgba(40, 40, 55, 0.8);
    border: 1px solid rgba(100, 130, 255, 0.2);
    border-radius: 6px;
    color: #c8c8d8;
    outline: none;
    transition: border-color 0.2s ease;
}

.texture-updater-field select:focus,
.texture-updater-field input[type="file"]:focus {
    border-color: rgba(100, 130, 255, 0.5);
}

.texture-updater-field select option {
    background: #1a1a2a;
    color: #c8c8d8;
}

.texture-updater-previews {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.texture-updater-preview-box {
    flex: 1;
    text-align: center;
}

.texture-updater-preview-box span {
    display: block;
    font-size: 10px;
    color: #6670a0;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.texture-updater-preview-container {
    width: 100%;
    aspect-ratio: 1;
    background: rgba(40, 40, 55, 0.6);
    border: 1px solid rgba(100, 130, 255, 0.15);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.texture-updater-preview-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    image-rendering: auto;
}

.texture-updater-no-preview {
    font-size: 10px;
    color: #555;
    text-align: center;
    padding: 8px;
}

.texture-updater-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.texture-updater-btn {
    flex: 1;
    min-width: 80px;
    padding: 7px 12px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.texture-updater-btn:active {
    transform: scale(0.97);
}

.texture-updater-btn-apply {
    background: rgba(80, 130, 255, 0.3);
    color: #80b0ff;
    border: 1px solid rgba(80, 130, 255, 0.3);
}

.texture-updater-btn-apply:hover {
    background: rgba(80, 130, 255, 0.45);
}

.texture-updater-btn-reset {
    background: rgba(255, 160, 60, 0.2);
    color: #ffaa66;
    border: 1px solid rgba(255, 160, 60, 0.2);
}

.texture-updater-btn-reset:hover {
    background: rgba(255, 160, 60, 0.35);
}

.texture-updater-btn-reset-all {
    background: rgba(255, 80, 80, 0.2);
    color: #ff8888;
    border: 1px solid rgba(255, 80, 80, 0.2);
    flex-basis: 100%;
}

.texture-updater-btn-reset-all:hover {
    background: rgba(255, 80, 80, 0.35);
}

.texture-updater-status {
    font-size: 11px;
    padding: 4px 0;
    min-height: 18px;
    text-align: center;
}

.texture-updater-status-success {
    color: #66cc88;
}

.texture-updater-status-error {
    color: #ff8888;
}

.texture-updater-mesh-info {
    font-size: 11px;
    line-height: 1.5;
    padding: 8px 10px;
    background: rgba(40, 40, 55, 0.5);
    border-radius: 6px;
    margin-bottom: 12px;
    border: 1px solid rgba(100, 130, 255, 0.1);
}

@media (max-width: 768px) {
    #texture-updater-panel {
        left: 10px;
        right: 10px;
        width: auto;
        bottom: 70px;
        max-height: 60vh;
    }

    #texture-updater-toggle {
        bottom: 15px;
        left: 15px;
    }
}
