body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 900px;
    width: 100%;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

h1, h2 {
    color: #1a2533;
    text-align: center;
    margin-bottom: 20px;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.control-group {
    border: 1px solid #e0e0e0;
    padding: 15px;
    border-radius: 6px;
}

.control-group label {
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.image-input {
    display: block;
    width: 100%;
    margin-bottom: 10px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scale-slider {
    width: 100%;
}

.preview-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 30px;
    border: 2px dashed #ccc;
    padding: 10px;
    background: #fafafa;
}

.preview-box {
    position: relative;
    width: 100%;
    /* Raport de aspect (H/W) ajustat la ~120% pentru a se potrivi mai bine noilor dimensiuni */
    padding-top: 120%; 
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.preview-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.1s linear;
}

#generate-btn, .button {
    display: block;
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s;
}

#generate-btn:hover {
    background-color: #0056b3;
}

#generate-btn:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}

#result-area {
    margin-top: 30px;
    text-align: center;
}

#result-image {
    max-width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
}

.hidden {
    display: none;
}
