* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Rubik", sans-serif;
}

body {
    background: linear-gradient(to right, #e3f2fd, #f1f8e9);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.wrapper {
    width: 100%;
    max-width: 1200px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 20px 35px rgba(0, 0, 0, 0.15);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 30px;
}

.editor, .result {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.editor label {
    font-size: 1rem;
    color: #333;
}

.editor input[type="range"] {
    width: 100%;
}

.flip-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flip-buttons .flip-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.edit-history {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.edit-history button,
#download-btn,
.result label {
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.edit-history button {
    background-color: #444;
    color: white;
}

#download-btn {
    background-color: #28a745;
    color: white;
}

.result label {
    background-color: #025bee;
    color: white;
    text-align: center;
}

.result img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
}

.image-container {
    display: none;
    text-align: center;
}

input[type="file"] {
    display: none;
}

#preview-thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

#preview-thumbnails img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 5px;
    transition: border 0.2s;
}

#preview-thumbnails img:hover {
    border-color: #025bee;
}

#drop-area {
    border: 2px dashed #025bee;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    background-color: #f9f9f9;
    transition: border-color 0.3s;
}

/* ----- Responsive Design ----- */
@media screen and (max-width: 900px) {
    .wrapper {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .result img {
        max-height: 300px;
    }

    .edit-history button,
    #download-btn,
    .result label {
        font-size: 0.9rem;
        padding: 10px;
    }
}

@media screen and (max-width: 500px) {
    .flip-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .flip-buttons .flip-option {
        flex: 1 1 45%;
    }

    .editor label {
        font-size: 0.9rem;
    }
}
