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

body {
    background: #0f172a;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center; /*  centraliza vertical */
    min-height: 100vh; /*  ocupa tela toda */
    padding: 20px;
}

.container {
    max-width: 520px;
    width: 100%;
}

/* quando tiver preview ativo, volta layout normal */
.container.has-preview {
    align-self: flex-start;
    margin-top: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
}

.subtitle {
    text-align: center;
    margin: 15px 0;
    color: #94a3b8;
}

/*  UPLOAD GRANDE (HOME) */
.upload-area {
    border: 2px dashed #38bdf8;
    border-radius: 20px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;

    height: 280px;
    font-size: 18px;
    transition: 0.2s;
}

/* hover */
.upload-area:hover {
    background: #1e293b;
    transform: scale(1.02);
}

/*  quando tem preview, ele fica menor */
.container.has-preview .upload-area {
    height: 120px;
    font-size: 14px;
    margin-bottom: 10px;
}

.preview-container {
    margin-top: 10px;
}

.hidden {
    display: none;
}

/*  COMPARADOR */
.compare-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

/* imagem base */
.img-base {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* overlay */
.overlay {
    position: absolute;
    inset: 0;
    width: 50%;
    overflow: hidden;
}

/* imagem original */
.overlay img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* linha */
.divider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 3px;
    height: 100%;
    background: #38bdf8;
    pointer-events: none;
}

/* slider */
#slider {
    width: 100%;
}

/* thumb */
#slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: #38bdf8;
    border-radius: 50%;
    cursor: pointer;
}

#slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #38bdf8;
    border-radius: 50%;
    cursor: pointer;
}

/* info */
.info {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    background: #1e293b;
    padding: 12px;
    border-radius: 10px;
}

.info span {
    font-size: 12px;
    color: #94a3b8;
}

/* botão */
button {
    width: 100%;
    margin-top: 15px;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: #38bdf8;
    color: black;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    transform: scale(1.02);
}

/* seletor de formato */
.format-select {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.format-select select {
    padding: 6px;
    border-radius: 6px;
    border: none;
}