*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Inter',sans-serif;
}

body{
    background:#f8fafc;
    color:#111827;
}

/* Header */

header{
    width:100%;
    height:75px;

    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:0 8%;

    background:#ffffff;

    border-bottom:1px solid #e5e7eb;

    position:sticky;
    top:0;

    z-index:1000;
}

.logo{
    display:flex;
    align-items:center;
    gap:14px;
    text-decoration:none;
}

.logo-icon{
    width:52px;
    height:52px;
    background:#2563EB;
    border-radius:14px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-shrink:0;
}

.logo-icon i{
    color:#fff;
    font-size:24px;
}

.logo-text{
    display:flex;
    flex-direction:column;
    line-height:1.2;
}

.logo-text span{
    font-size:28px;
    font-weight:800;
    color:#111827;
}

.logo-text small{
    font-size:13px;
    font-weight:500;
    color:#6B7280;
    margin-top:2px;
}

nav{

    display:flex;

    gap:35px;

}

nav a{

    text-decoration:none;

    color:#374151;

    font-weight:600;

    position:relative;

    transition:.3s;

}

nav a:hover{

    color:#2563EB;

}

nav a::after{

    content:"";

    position:absolute;

    left:0;

    bottom:-6px;

    width:0;

    height:2px;

    background:#2563EB;

    transition:.3s;

}

nav a:hover::after{

    width:100%;

}

.menu-btn{

    display:none;

    font-size:28px;

    color:#2563EB;

    cursor:pointer;

}

/* Hero */

.tool-hero{

    text-align:center;

    padding:70px 20px 40px;

}

.tool-hero h1{

    font-size:48px;

    margin-bottom:15px;

}

.tool-hero p{

    color:#6b7280;

}

/* Upload */

.upload-section{

    padding:20px 8%;

}

.upload-box{

    background:#F3F8FF;

    border:1px solid #D6E4FF;

    border-radius:20px;

    padding:35px 30px;

    text-align:center;

    cursor:pointer;

    box-shadow:0 6px 20px rgba(37,99,235,.08);

    transition:
        transform .35s ease,
        box-shadow .35s ease,
        background .35s ease;

}

.upload-box:hover{

    transform:translateY(-5px);

    box-shadow:0 18px 40px rgba(37,99,235,.15);

    background:#EEF6FF;

}

.upload-box i{

    font-size:55px;

    color:#2563EB;

    margin-bottom:12px;

}

.upload-box h2{

    font-size:36px;

    margin-bottom:8px;

}

.upload-box p{

    margin-bottom:18px;

    color:#6b7280;

}

.upload-box button{

    padding:15px 35px;

    background:#2563EB;

    color:white;

    border:none;

    border-radius:10px;

    cursor:pointer;

    font-size:16px;

}

/* Preview */

.preview-section{

    padding:30px 8%;

}

.preview-section h2{

    margin-bottom:30px;

}

#previewContainer{

    display:grid;

    grid-template-columns:repeat(auto-fill,minmax(220px,1fr));

    gap:25px;

}

.image-card{

    background:white;

    border-radius:15px;

    overflow:hidden;

    box-shadow:0 8px 20px rgba(0,0,0,.08);

}

.image-card img{

    width:100%;

    height:200px;

    object-fit:cover;

}

.image-card p{

    padding:15px;

    text-align:center;

    font-size:14px;

}

.pixel-grid{

    display:grid;

    grid-template-columns:1fr 1fr;

    gap:20px;

    margin-top:20px;

}

#downloadBtn{

    display:block;

    width:260px;

    margin:25px auto 0;

    background:#16A34A;

    color:#fff;

    border:none;

    padding:16px 20px;

    font-size:18px;

    font-weight:600;

    border-radius:12px;

    cursor:pointer;

    transition:.3s;

}

#downloadBtn:hover{

    background:#15803D;

    transform:translateY(-2px);

}

.download-btn{

    width:90%;

    margin:15px auto;

    display:block;

    padding:12px;

    border:none;

    border-radius:10px;

    background:#2563EB;

    color:#fff;

    cursor:pointer;

    font-weight:600;

}

.download-btn:hover{

    background:#1D4ED8;

}

/* ==========================
   DRAG & DROP
========================== */

.upload-box.dragover{

    background:#EFF6FF;

    border:2px dashed #2563EB;

    transform:scale(1.01);

}

/* ==========================
   REMOVE BUTTON
========================== */

.image-card{

    position:relative;

}

.remove-btn{

    position:absolute;

    top:10px;

    right:10px;

    width:34px;

    height:34px;

    border:none;

    border-radius:50%;

    background:#ef4444;

    color:white;

    font-size:20px;

    cursor:pointer;

    display:flex;

    justify-content:center;

    align-items:center;

    transition:.3s;

}

.remove-btn:hover{

    background:#dc2626;

    transform:scale(1.1);

}

/* ==========================
   SORTABLE
========================== */

.dragging{

    opacity:.5;

}

.chosen{

    transform:scale(1.03);

}

.image-card{

    cursor:grab;

}

.image-card:active{

    cursor:grabbing;

}

/* ==========================
   PDF SETTINGS
========================== */

.settings-section{

    padding:70px 8%;

}

.settings-section h2{

    margin-bottom:35px;

    text-align:center;

}

.settings-grid{

    display:grid;

    grid-template-columns:repeat(2, 1fr);

    gap:30px;

    width:100%;

    margin-bottom:40px;

}

.setting{

    display:flex;

    flex-direction:column;

    background:#fff;

    padding:25px;

    border-radius:16px;

    border:1px solid #e5e7eb;

}

.setting label{

    font-weight:600;

    margin-bottom:14px;

    display: block;

}

.setting select{

    width:100%;

    padding:16px;

    font-size:16px;

    border:1px solid #d1d5db;

    border-radius:10px;

    outline:none;

}

.setting input{

    width:100%;

    padding:14px 16px;

    font-size:16px;

    border:1px solid #d1d5db;

    border-radius:10px;

    outline:none;

    margin-top: 4px;

} 

#convertBtn{

    background:#2563EB;

    color:#fff;

    border:none;

    padding:16px 32px;

    border-radius:12px;

    font-size:18px;

    cursor:pointer;

    transition:.3s;

}

#convertBtn:hover{

    background:#1D4ED8;

}

#convertBtn:disabled{

    background:#9CA3AF;

    cursor:not-allowed;

    opacity:.7;

}   

#downloadZipBtn{

    display:none;

    background:#16A34A;

    color:#fff;

    border:none;

    padding:16px 32px;

    border-radius:12px;

    font-size:18px;

    cursor:pointer;

    transition:.3s;

}

#downloadZipBtn:hover{

    background:#15803D;

}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button
{

    -webkit-appearance:none;

    margin:0;

}

input[type="number"]{
    appearance: textfield;
    -moz-appearance:textfield;
    

}

@media(max-width:768px){

.settings-grid{

grid-template-columns:1fr;

}

}

@media(max-width:768px){

.pixel-grid{

    grid-template-columns:1fr;

}

}

#pixelBox{

    grid-column:1 / -1;

}

.button-group{

    display:flex;

    justify-content:center;

    align-items:center;

    gap:20px;

    margin-top:20px;

}

/* ==========================
   MOBILE NAVIGATION
========================== */

@media(max-width:768px){

header{

    padding:0 20px;

}

nav{

    position:absolute;

    top:75px;

    left:0;

    width:100%;

    background:#ffffff;

    display:none;

    flex-direction:column;

    align-items:center;

    gap:20px;

    padding:25px 0;

    border-bottom:1px solid #e5e7eb;

}

nav.active{

    display:flex;

}

.menu-btn{

    display:block;

}

.tool-hero h1{

    font-size:42px;

}

.logo-text span{

    font-size:22px;

}

.logo-text small{

    font-size:11px;

}

}

@media (max-width:768px){

    #resultBox{

        width:100%;

        display:flex;

        flex-direction:column;

        align-items:center;

    }

    #downloadBtn{

        width:90%;

        max-width:300px;

        margin-top:20px;

    }

}