:root {
    --wa-green: #10B981;
    --wa-green-rgb: 16, 185, 129;
    --wa-bg: #f8faf7;
    --white: #ffffff;
    --gray-text: #5a6b64;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --shadow-card: 0 24px 48px -20px rgba(16,185,129,0.18), 0 8px 20px -8px rgba(15,32,27,0.08);
    --radius-xl: 24px;
    --radius-md: 16px;
    --radius-full: 50px;
}

.main-wrapper { width: 100%; max-width: 100%; margin: 0; padding: 0; }

.resizer-container {
    display: flex;
    gap: 2rem;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.upload-box {
    flex: 1 1 40%;
    min-width: 0;
    max-width: none;
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 1.8rem;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(16,185,129,0.08);
    display: flex;
    flex-direction: column;
}

.upload-zone {
    flex: 1;
    border: 1.5px solid #e8efec;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fbfdfc;
    position: relative;
    overflow: hidden;
    min-height: 280px;
}

.upload-zone:hover, .upload-zone.drag-over { border-color: #10B981; background: #ffffff; box-shadow: 0 0 0 4px rgba(16,185,129,0.12); border-style: solid; }
.upload-zone.has-image { border-style: solid; border-color: #e8efec; }
.upload-zone img { position: absolute; width: 100%; height: 100%; object-fit: contain; padding: 1rem; }
.upload-placeholder { text-align: center; z-index: 1; }
.upload-zone.has-image .upload-placeholder { opacity: 0; pointer-events: none; }
.upload-icon { font-size: 2.5rem; display: block; margin-bottom: 0.3rem; }
.upload-text { font-weight: 700; font-size: 0.88rem; color: #0b2b25; }
.upload-hint { font-size: 0.73rem; color: #889992; margin-top: 0.15rem; }
.upload-input { display: none; }

.upload-change-btn {
    display: none;
    margin-top: 1rem;
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    border: 1.5px solid #e8efec;
    background: #fff;
    color: #1B1F27;
    text-align: center;
    transition: all 0.2s;
    width: 100%;
}
.upload-zone.has-image ~ .upload-change-btn { display: block; }
.upload-change-btn:hover { border-color: #10B981; background: #fff; }

.result-box {
    flex: 1 1 60%;
    min-width: 0;
    max-width: none;
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 1.8rem;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(16,185,129,0.08);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    
    margin-right: 3px;

}

.result-title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: #0b2b25; text-align: center; }
.result-placeholder { flex: 1; display: flex; align-items: center; justify-content: center; color: #b0bfb7; font-size: 0.88rem; text-align: center; }

.result-grid { display: none; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.result-grid.show { display: grid; }

.result-color-row { display: none; margin-top: 0.8rem; }
.result-color-row.show { display: block; }

.result-item {
    background: #f4faf7;
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid rgba(16,185,129,0.10);
    transition: all 0.2s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.result-item:hover { border-color: #10B981; box-shadow: 0 4px 15px rgba(0,0,0,.04); }

.result-dp-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid #f0faf3;
    background: #f5f5f5;
    box-shadow: 0 0 0 5px rgba(16,185,129,0.06);
}
.result-dp-preview img { width: 100%; height: 100%; object-fit: cover; }
.result-variant-name { font-weight: 700; font-size: 0.8rem; color: #0b2b25; }
.result-variant-desc { font-size: 0.66rem; color: #889992; line-height: 1.3; }

.result-dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 1rem;
    border-radius: 16px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #fff;
    background: #10B981;
    box-shadow: 0 12px 24px -8px rgba(16,185,129,0.55);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: auto;
}
.result-dl-btn:hover { background: #0e9f72; transform: scale(1.04); }

.color-section {
    background: #f4faf7;
    border-radius: var(--radius-md);
    padding: 1.2rem;
    border: 1px solid rgba(16,185,129,0.10);
    text-align: center;
}

.color-section-label {
    font-weight: 700;
    font-size: 0.78rem;
    color: #3a5448;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.color-picker-full-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 0.8rem;
    border: 3px solid #f0faf3;
    background: #f5f5f5;
    box-shadow: 0 0 0 5px rgba(16,185,129,0.06);
}
.color-picker-full-preview img { width: 100%; height: 100%; object-fit: cover; }

.color-presets-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}

.color-preset-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    transition: all 0.2s;
    position: relative;
}
.color-preset-dot:hover { transform: scale(1.2); border-color: #10B981; }
.color-preset-dot.active { border-color: #10B981; box-shadow: 0 0 0 4px rgba(16,185,129,0.2); }

.color-custom-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.color-custom-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #5a6b64;
}

.color-custom-input {
    width: 32px;
    height: 32px;
    border: 1.5px solid #e8efec;
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
    background: #fff;
}
.color-custom-input:hover { border-color: #10B981; }
.color-custom-input:focus-visible,
.result-dl-btn:focus-visible,
.color-dl-btn:focus-visible,
.upload-change-btn:focus-visible { outline: none; border-color: #10B981; box-shadow: 0 0 0 4px rgba(16,185,129,0.2); }

.color-dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.5rem;
    border-radius: 16px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    background: #10B981;
    box-shadow: 0 12px 24px -8px rgba(16,185,129,0.55);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.8rem;
}
.color-dl-btn:hover { background: #0e9f72; transform: scale(1.04); }

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    background: #1a2e28;
    color: #fff;
    padding: 12px 24px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: transform 0.3s ease;
    z-index: 999;
}
.toast.show { transform: translateX(-50%) translateY(0); }

@media (max-width: 860px) {
    .resizer-container { flex-direction: column; align-items: stretch; gap: 1.2rem; }
    .upload-box, .result-box { flex: 1 1 auto; width: 100%; }
    .upload-zone { min-height: 220px; }
    .result-dp-preview { width: 80px; height: 80px; }
    .color-picker-full-preview { width: 100px; height: 100px; }
}

@media (max-width: 480px) {
    .result-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
    .result-item { padding: 0.7rem; }
    .result-dp-preview { width: 64px; height: 64px; }
    .color-picker-full-preview { width: 80px; height: 80px; }
    .upload-box, .result-box { padding: 1rem 0.8rem; }
}