.img-container{
    max-width:750px;
    margin:50px auto;
    padding:35px;
    background:#fff;
    border-radius:16px;
    box-shadow:0 8px 24px rgba(15,23,42,.08);
    animation:fadeUp .4s ease;
}

.img-container h1{
    text-align:center;
    margin-bottom:10px;
    color:#2563eb;
}

.img-container > p{
    text-align:center;
    margin-bottom:25px;
    color:#666;
    line-height:1.6;
}

.drop-zone{
    border:2.5px dashed #cbd5e1;
    border-radius:14px;
    padding:40px 20px;
    text-align:center;
    cursor:pointer;
    transition:.25s;
    background:#f8fafc;
}

.drop-zone:hover,
.drop-zone.dragover{
    border-color:#2563eb;
    background:#eef4ff;
}

.drop-zone .icon{
    font-size:42px;
    margin-bottom:10px;
}

.drop-zone p{
    color:#555;
    margin:6px 0;
}

.drop-zone .hint{
    font-size:13px;
    color:#999;
}

#fileInput{
    display:none;
}

.options{
    margin-top:28px;
}

.option-row{
    margin-bottom:20px;
}

.option-row label{
    display:flex;
    justify-content:space-between;
    margin-bottom:8px;
    font-weight:600;
    color:#333;
}

.option-row label span.value{
    color:#2563eb;
    font-weight:700;
}

.option-row input[type="range"]{
    width:100%;
    accent-color:#2563eb;
}

.format-buttons{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.format-buttons button{
    flex:1;
    min-width:90px;
    padding:10px;
    border:2px solid #ddd;
    background:#fff;
    border-radius:10px;
    font-family:'Kanit',sans-serif;
    font-weight:600;
    cursor:pointer;
    transition:.2s;
}

.format-buttons button.active{
    border-color:#2563eb;
    background:#2563eb;
    color:#fff;
}

.preview-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
    margin-top:28px;
}

.preview-card{
    border:1px solid #e5e7eb;
    border-radius:12px;
    overflow:hidden;
    background:#f8fafc;
    text-align:center;
}

.preview-card img{
    width:100%;
    height:180px;
    object-fit:contain;
    background:#fff;
    display:block;
}

.preview-card .info{
    padding:12px;
}

.preview-card .info .label{
    font-size:13px;
    color:#888;
}

.preview-card .info .size{
    font-size:20px;
    font-weight:700;
    color:#1e293b;
}

.saved-badge{
    display:inline-block;
    margin-top:6px;
    padding:4px 10px;
    background:#dcfce7;
    color:#166534;
    border-radius:20px;
    font-size:13px;
    font-weight:700;
}

#downloadBtn{
    display:block;
    width:100%;
    margin-top:25px;
    padding:16px;
    background:#2563eb;
    color:#fff;
    font-size:20px;
    font-family:'Kanit',sans-serif;
    font-weight:700;
    border:none;
    border-radius:10px;
    cursor:pointer;
    transition:.25s;
    text-align:center;
    text-decoration:none;
}

#downloadBtn:hover{
    background:#1d4ed8;
    transform:translateY(-2px);
}

#downloadBtn[disabled]{
    background:#cbd5e1;
    cursor:not-allowed;
    transform:none;
    pointer-events:none;
}

.back{
    display:block;
    margin-top:30px;
    text-align:center;
    font-weight:600;
    color:#2563eb;
    text-decoration:none;
}

.back:hover{
    text-decoration:underline;
}

.disclaimer{
    margin-top:20px;
    padding:14px 18px;
    background:#fffbeb;
    border:1px solid #fde68a;
    border-radius:10px;
    font-size:14px;
    color:#78350f;
    line-height:1.6;
}

@media (max-width:768px){

    .img-container{
        margin:20px auto;
        padding:22px;
    }

    .img-container h1{
        font-size:28px;
    }

    .preview-grid{
        grid-template-columns:1fr;
    }

    .drop-zone{
        padding:30px 15px;
    }
}

@media (max-width:480px){

    .img-container{
        margin:15px;
        padding:18px;
    }

    .format-buttons button{
        min-width:70px;
        font-size:14px;
    }
}
