/* Base styles for the page */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f7f9fc;
    min-height: 100vh;
}

/* Sticky Header */
#header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Main layout */
#main {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 100px 20px 40px;
    width: 100%;
}

/* Main container */
.container {
    background: white;
    padding: 40px 20px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 800px;
    width: 100%;
}

/* Typography styles */
.container h1 {
    margin-bottom: 10px;
}

.container p {
    color: gray;
    font-size: 14px;
}

.container p a {
    color: #3b82f6;
    text-decoration: none;
    margin: 0 4px;
}

/* Button styles */
.upload-btn {
    margin: 20px 0;
    background: #3b82f6;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

/* Drop area styling */
.drop-area {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 30px;
    margin: 20px 0;
    color: gray;
    font-size: 14px;
    cursor: pointer;
}

/* Form elements */
select {
    margin-top: 10px;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    height: 40px;
    width: 80px;
}

/* Preview area grid layout */
#preview {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    justify-content: center;
    max-width: 100%;
    align-items: center;
}

/* Individual preview items */
.preview-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: #fafafa;
    position: relative;
    width: 150px;
    flex-direction: column;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-item img {
    max-width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    justify-content: center;
}
.remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    z-index: 2;
    opacity: 0.9;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    background: #cc0000;
    transform: scale(1.1);
    opacity: 1;
}

/* Information box */
#infoBox {
    margin-top: 20px;
    background: #e0f2fe;
    padding: 10px;
    border-radius: 8px;
    color: #0369a1;
    font-size: 14px;
}

/* Convert button */
#convertBtn {
    margin-top: 20px;
    background: #3b82f6;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: none;
}

/* Download all button */
.download-all-btn {
    margin-top: 20px;
    background: #10b981;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: none;
}

/* Download link styling */
.download-link {
    display: block;
    margin-top: 10px;
    color: #3b82f6;
    text-decoration: none;
    padding: 8px 12px;
    border: 1px solid #3b82f6;
    border-radius: 6px;
    background: white;
}