body {
    font-family: 'Poppins', sans-serif;
    background: #1e1e2e;
    color: #fff;
    padding: 20px;
    height: 100vh;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #2a2a3a;
    border-radius: 10px;
    box-shadow: 0px 0px 15px rgba(255, 255, 255, 0.1);
}

.drop-zone {
    border: 2px dashed #ccc;
    padding: 50px 20px;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.drop-zone.dragover {
    border-color: #28a745;
    background-color: #e8f5e9;
}

.custom-dropdown {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.dropdown-btn {
    width: 100%;
    padding: 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-btn:hover {
    background-color: #218838;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.6);
}

.dropdown-btn:focus {
    outline: none;
}

.dropdown-content {
    display: none;
    position: absolute;
    width: 100%;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1;
    animation: fadeIn 0.3s ease;
    overflow: hidden;
}

.dropdown-content.show {
    display: block;
}

.dropdown-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    color: #333;
}

.dropdown-item:hover {
    background-color: #f1f1f1;
    transform: translateX(10px);
}

#convert-btn {
    width: 100%;
    display: block;
    margin: 0 auto 20px;
    padding: 15px 30px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#convert-btn:disabled {
    cursor: not-allowed;
}

#convert-btn:hover:not(:disabled) {
    background-color: #218838;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.6);
}

#download-all-btn {
    width: 100%;
    display: block;
    margin: 20px auto 0;
    padding: 15px 30px;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#download-all-btn:hover {
    background-color: #ff4949;
    box-shadow: 0 0 15px rgba(255, 4, 0, 0.6);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Improved Image Grid */
#image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px auto;
    width: 100%;
}

.image-card {
    background: #3a3a4a;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 4px 8px rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 12px rgba(255, 255, 255, 0.2);
}

.image-card img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    border-radius: 10px 10px 0 0;
}

.image-card .download-btn {
    display: block;
    width: 100%;
    background: #ff6b6b;
    color: white;
    padding: 10px 10px 10px 0;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.image-card .download-btn:hover {
    background: #ff4949;
}

/* Message Styling */
.message {
    text-align: center;
    margin: 10px 0;
    font-size: 16px;
    padding: 10px;
    border-radius: 5px;
    display: none; /* Initially hidden */
}

.upload-message {
    background: #007bff;
    color: white;
}

.success-message {
    background: #28a745;
    color: white;
}

@media (max-width: 768px) {
    #image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}