.upload-area {
    border: 2px dashed #e9ecef;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    background: #fff;
}
.upload-text {
    margin-top: 8px;
    color: #333;
}
.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}
.file-thumb img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}
.file-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.file-name {
    font-weight: 600;
    color: #333;
}
.file-size {
    font-size: 12px;
    color: #666;
}
.file-info .btn {
    margin-left: auto;
}

/* Upload area redesign */
.upload-area {
    max-width: 760px;
    margin: 18px auto;
    background: linear-gradient(90deg,#0aa2ff 0%,#0a7dff 100%);
    color: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(10,125,255,0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.upload-area .file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    cursor: pointer;
    color: white;
}

.upload-area .upload-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 6px;
}

.upload-area .upload-text {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

/* hide native file input to avoid default browser button */
#fileInput {
    display: none;
}

.file-info {
    width: 100%;
    background: rgba(255,255,255,0.08);
    padding: 10px;
    border-radius: 8px;
    align-items: center;
}

.file-info .file-thumb img {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.12);
}

.file-meta .file-name {
    color: #fff;
}
.file-meta .file-size {
    color: rgba(255,255,255,0.85);
}

.file-info .btn {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
}

@media (max-width: 480px) {
    .upload-area { padding: 18px; border-radius: 10px; }
    .upload-area .upload-text { font-size: 16px; }
    .file-info { flex-direction: column; gap: 8px; align-items: stretch; }
    .file-info .btn { width: 100%; }
}
.controls-container {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}
.control-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.action-row {
    display: flex;
    gap: 10px;
}
.preview-container {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: center;
}
#previewCanvas {
    max-width: 100%;
    border: 1px solid #ddd;
}
.info-card {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 12px;
}

/* Ensure mobile hamburger bars are visible against any background */
.nav-toggle .hamburger {
    background-color: #333 !important;
}

/* Show nav-toggle on mobile explicitly and ensure it's on top */
@media (max-width: 768px) {
    .nav-toggle {
        display: inline-block !important;
        z-index: 10003;
    }
    .nav-toggle .hamburger {
        width: 22px;
        height: 2px;
        background-color: #333;
        margin: 5px 0;
        display: block;
    }

    /* Make action buttons full width on small screens for better UX */
    .controls-container .action-row .btn {
        min-width: 0;
        flex: 1 1 auto;
    }

    /* Make preview canvas scale nicely */
    #previewCanvas {
        max-width: 100%;
        height: auto;
    }
}

/* Desktop refinements: slightly larger controls and spacing */
@media (min-width: 769px) {
    .controls-container {
        padding: 20px;
    }
    .control-row label {
        width: 110px;
    }
    .action-row .btn {
        padding: 10px 18px;
    }
}

