/* GLOBAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f7fb;
    color: #111;
    text-align: center;
    padding-bottom: 70px;
}

/* REMOVE BLUE LINE / LINK STYLE */
a,
a:visited,
a:hover,
a:active,
a:focus {
    text-decoration: none;
    color: inherit;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0f172a;
    padding: 10px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    color: #facc15;
    font-size: 20px;
    font-weight: bold;
}

/* HAMBURGER */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
    cursor: pointer;
    margin-left: 50px;
}

.menu-toggle .bar {
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 3px;
    transition: 0.3s;
}

.menu-toggle.open .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* NAV MENU */
nav ul.nav-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

nav ul.nav-list li {
    position: relative;
}

nav ul.nav-list li a,
nav ul.nav-list li a:visited,
nav ul.nav-list li a:hover,
nav ul.nav-list li a:active,
nav ul.nav-list li a:focus {
    color: white !important;
    text-decoration: none !important;
    padding: 10px 12px;
    display: block;
    font-size: 14px;
}

nav ul.nav-list li a:hover {
    color: #facc15 !important;
}

/* BOX */
.box {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 1000px;
    margin: 40px auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.box h2 {
    margin-bottom: 20px;
    color: #0f172a;
}

/* DROP AREA */
#drop-area {
    border: 2px dashed orange;
    padding: 25px;
    border-radius: 15px;
    cursor: pointer;
    margin-bottom: 15px;
    transition: 0.3s;
}

#drop-area:hover {
    background: #fff7ed;
}

#drop-area input {
    display: none;
}

/* BUTTONS */
.btn-group {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 15px;
}

button {
    padding: 10px 20px;
    border: none;
    background: linear-gradient(135deg, orange, #f59e0b);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    transition: 0.3s;
}

button:hover {
    background: #ea580c;
    transform: scale(1.05);
}

button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

/* STATUS */
#status {
    margin-top: 16px;
    color: #334155;
    font-size: 14px;
    min-height: 20px;
}

/* PREVIEW WRAPPER */
.preview-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 25px;
}

.preview-box {
    background: #f8fafc;
    border-radius: 16px;
    padding: 18px;
    border: 1px solid #e2e8f0;
}

.preview-box h3 {
    margin-bottom: 15px;
    color: #0f172a;
    font-size: 18px;
}

/* IMAGE PREVIEW */
.image-preview {
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    overflow: hidden;
    background: white;
    border: 2px solid #f1f5f9;
}

.image-preview img {
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
    display: block;
    border-radius: 10px;
}

/* TRANSPARENT BG PREVIEW */
.checkerboard {
    background-image:
        linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
        linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
        linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* LOADER */
.loader {
    width: 50px;
    height: 50px;
    border: 5px solid #fde68a;
    border-top: 5px solid #f59e0b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* MEDIA QUERIES */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    nav ul.nav-list {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #0f172a;
        position: absolute;
        top: 60px;
        left: 0;
    }

    nav ul.nav-list.active {
        display: flex;
    }

    nav ul.nav-list li {
        text-align: center;
        margin: 8px 0;
    }

    .box {
        padding: 25px;
        width: 95%;
    }

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

    .image-preview {
        min-height: 260px;
    }

    .image-preview img {
        max-height: 260px;
    }

    button {
        padding: 9px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .box {
        padding: 20px;
        width: 95%;
        margin: 20px auto;
    }

    .logo {
        font-size: 17px;
    }

    .image-preview {
        min-height: 220px;
    }

    .image-preview img {
        max-height: 220px;
    }

    #drop-area {
        padding: 18px;
    }
}

/* FOOTER */
.footer {
    background: #0f172a;
    color: #cbd5e1;
    text-align: center;
    padding: 15px;
    position: fixed;
    bottom: 0;
    width: 100%;
}