* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a1a1a;
    color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

h1 {
    color: #ffffff;
    margin-bottom: 30px;
    font-size: 2.5em;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h2 {
    color: #e0e0e0;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 400;
    font-size: 24px;
}

.customizer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
}

.controls {
    background-color: #2d2d2d;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    width: 30%;
    max-height: 95vh;
    overflow-y: auto;
}

.controls::-webkit-scrollbar {
    width: 8px;
}

.controls::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 4px;
}

.controls::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 4px;
}

.color-option {
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.3s;
    border-bottom: 1px solid #444;
    padding-bottom: 15px;
}

.color-option:hover {
    background-color: #3d3d3d;
}

.color-option label {
    margin-right: 15px;
    font-weight: 500;
    font-size: 0.9em;
    color: #e0e0e0;
    text-transform: uppercase;
}

.color-option input[type="color"] {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 8px;
    background: none;
    cursor: pointer;
}

.canvas-container {
    width: 65%;
    height: 600px;
    border: 2px solid #3d3d3d;
    border-radius: 15px;
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
    cursor: move;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}

#svg-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    transform-origin: center;
    transition: transform 0.3s ease;
    will-change: transform;
}

#svg-container svg {
    width: 100%;
    height: 100%;
}

.highlighted {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
}

#resetColors {
    background: linear-gradient(135deg, #ff4444 0%, #ff0000 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#resetColors:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
}

#resetColors:active {
    transform: translateY(0);
}

/* Então ajuste os estilos dos controles */
.zoom-controls,
.rotation-controls {
    position: absolute;
    bottom: 25px;
    display: flex;
    gap: 8px;
    z-index: 1000;
    background: rgba(45, 45, 45, 0.85);
    padding: 8px 10px;
    border-radius: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.zoom-controls {
    right: 25px;
}

.rotation-controls {
    left: 25px;
    gap: 6px;
    padding: 8px 12px;
}

.zoom-button {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #3d3d3d;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.zoom-button:hover {
    background: #4a4a4a;
    transform: scale(1.1);
}

.zoom-button:active {
    transform: scale(0.95);
}

.zoom-button.reset {
    font-size: 12px;
    width: auto;
    padding: 0 16px;
    border-radius: 20px;
    background: linear-gradient(135deg, #666666 0%, #4a4a4a 100%);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rotate-button {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #3d3d3d;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.rotate-button:hover {
    background: #4a4a4a;
    transform: scale(1.1);
}

.rotate-button:active {
    transform: scale(0.95);
}

.rotate-button.flip {
    font-size: 24px;
    background: #3d3d3d;
}

.rotate-button.flip:hover {
    background: #4a4a4a;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #aaa;
}

.error {
    color: #ff6b6b;
    background-color: rgba(255, 107, 107, 0.1);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
}

/* Ajuste para dispositivos móveis */
@media (max-width: 768px) {
    .customizer {
        flex-direction: column;
    }
    
    .controls {
        order: 2;
        width: 100%;
        margin-top: 20px;
    }
    
    .canvas-container {
        order: 1;
        width: 100%;
        height: 500px;
        aspect-ratio: 1 / 1;
        margin-bottom: 20px;
    }
    
    #svg-container {
        max-width: 85%;
        max-height: 85%;
    }
    
    /* Ajustar tamanho dos botões em telas menores */
    .zoom-controls, 
    .rotation-controls {
        bottom: 15px;
        padding: 6px 8px;
        background: rgba(45, 45, 45, 0.95);
        backdrop-filter: blur(5px);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        gap: 5px;
    }

    .zoom-controls {
        right: 10px;
    }

    .rotation-controls {
        left: 10px;
    }
    
    .zoom-button, 
    .rotate-button {
        width: 34px;
        height: 34px;
        font-size: 16px;
        margin: 0 1px;
    }
    
    .zoom-button.reset {
        font-size: 11px;
        padding: 0 12px;
        height: 34px;
    }

    h1 {
        font-size: 1.8em;
        margin-bottom: 15px;
    }

    .color-option {
        margin: 8px 0;
        padding: 6px;
    }

    .color-option label {
        font-size: 0.85em;
    }

    .color-option input[type="color"] {
        width: 35px;
        height: 35px;
    }
}

/* Ajuste para telas muito pequenas */
@media (max-width: 480px) {
    .canvas-container {
        height: auto;
        aspect-ratio: 1 / 1;
        min-height: 350px;
    }

    #svg-container {
        max-width: 80%;
        max-height: 80%;
    }

    .controls {
        max-height: 40vh;
    }

    .zoom-controls, 
    .rotation-controls {
        padding: 5px 7px;
        gap: 4px;
        border-radius: 20px;
    }

    .zoom-button, 
    .rotate-button {
        width: 32px;
        height: 32px;
        font-size: 15px;
        margin: 0 1px;
    }

    .zoom-button.reset {
        font-size: 10px;
        padding: 0 10px;
        height: 32px;
    }

    h1 {
        font-size: 1.5em;
        margin-bottom: 10px;
    }

    .customizer {
        gap: 15px;
    }

    .controls {
        margin-top: 15px;
    }

    .selected-color-preview {
        width: 35px;
        height: 35px;
    }
}

/* Para telas muito pequenas (menos de 360px) */
@media (max-width: 360px) {
    .zoom-controls, 
    .rotation-controls {
        padding: 4px 5px;
        gap: 3px;
    }

    .zoom-button, 
    .rotate-button {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .zoom-button.reset {
        font-size: 8px;
        padding: 0 8px;
        height: 28px;
        letter-spacing: 0.5px;
    }
}

/* Melhorar a área de toque para dispositivos móveis */
@media (pointer: coarse) {
    .zoom-button, 
    .rotate-button {
        position: relative;
    }
    
    .zoom-button::after, 
    .rotate-button::after {
        content: '';
        position: absolute;
        top: -5px;
        left: -5px;
        right: -5px;
        bottom: -5px;
        z-index: -1;
    }
    
    /* Ajustar feedback visual para deixar mais perceptível */
    .zoom-button.active,
    .rotate-button.active {
        transform: scale(0.9);
        background-color: rgba(80, 120, 255, 0.5) !important;
    }
}

/* Feedback visual para interações touch */
.touch-feedback {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}

/* Adicione estes estilos */
.background-option {
    margin: 15px 0;
    padding: 15px;
    background-color: #333;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.background-option label {
    font-weight: 500;
    font-size: 0.9em;
    color: #e0e0e0;
    text-transform: uppercase;
}

.background-option input[type="color"] {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 8px;
    background: none;
    cursor: pointer;
}

.divider {
    height: 1px;
    background: #444;
    margin: 20px 0;
}

/* Ajuste para mobile */
@media (max-width: 768px) {
    .background-option {
        padding: 10px;
    }
    
    .background-option input[type="color"] {
        width: 35px;
        height: 35px;
    }
}

/* Adicione estes estilos para feedback visual de touch */
.zoom-button.active,
.rotate-button.active {
    transform: scale(0.95);
    background-color: rgba(255, 255, 255, 0.2) !important;
}

/* Estilos para o novo seletor de cores em bolhas */
.color-selection-title {
    color: #e0e0e0;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    margin: 25px 0 15px;
    letter-spacing: 1px;
}

.parts-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.part-option {
    background: linear-gradient(145deg, #323232, #2a2a2a);
    border-radius: 8px;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-left: 3px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.part-option:hover {
    background: linear-gradient(145deg, #3a3a3a, #323232);
    transform: translateX(3px);
}

.part-option.active {
    border-left: 3px solid #3b82f6;
    background: linear-gradient(145deg, #3b3b3b, #323232);
}

.part-name {
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 500;
    flex-grow: 1;
}

.part-color-indicator {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    margin-left: 10px;
    flex-shrink: 0;
}

.color-bubbles-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 15px 0 25px;
    justify-content: center;
}

.color-bubble {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.148), 0 0 5px 1px rgba(126, 126, 126, 0.541);
    position: relative;
}

.color-bubble:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.color-bubble.active {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px #3b82f6, 0 5px 15px rgba(0, 0, 0, 0.3);
}

.custom-color {
    background: linear-gradient(135deg, #444, #333);
    display: none !important;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.custom-color.active {
    box-shadow: 0 0 0 3px #3b82f6, 0 5px 15px rgba(0, 0, 0, 0.3);
}

.hidden-color-input {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.reset-btn {
    background: linear-gradient(135deg, #ff4444 0%, #ff0000 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
    font-weight: 600;
    font-size: 1em;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
}

.reset-btn:active {
    transform: translateY(0);
}

/* Ajustes responsivos para o novo seletor de cores */
@media (max-width: 768px) {
    .color-bubble {
        width: 40px;
        height: 40px;
    }
    
    .part-option {
        padding: 10px;
    }
    
    .part-name {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .color-bubbles-container {
        gap: 10px;
    }
    
    .color-bubble {
        width: 35px;
        height: 35px;
    }
    
    .custom-color {
        font-size: 16px;
    }
    
    .color-selection-title {
        font-size: 15px;
        margin: 20px 0 10px;
    }
}

/* Estilos para a interface de seleção de cores */
.color-selection-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 25px 0 15px;
}

.part-title {
    margin: 0;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Quando não está dentro do header */
h3.color-selection-title:not(.part-title) {
    margin: 25px 0 15px;
} 