body {
    font-family: sans-serif;
    margin: 20px;
    background-color: #f4f4f4;
}

.container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    max-width: 700px; 
    margin: auto;
}

h1 {
    text-align: center;
    color: #333;
}

label {
    display: block;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

input[type="text"], textarea {
    width: calc(100% - 22px); 
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box; 
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.dropzone {
    border: 2px dashed #007bff;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    color: #007bff;
    cursor: pointer;
    background-color: #f9f9f9;
    min-height: 150px; 
    transition: height 0.3s ease-in-out;
}

.dropzone.dz-started {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); 
    gap: 10px; 
    align-content: flex-start; 
    padding: 10px; 
}

.dropzone:not(.dz-started) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropzone .dz-preview {
    position: relative; 
    background: #fff; 
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    min-height: 200px; 
}

.dropzone .dz-preview .dz-image {
    border-radius: 4px 4px 0 0; 
    width: 100%;
    height: 150px; 
    overflow: hidden; 
    display: block; 
}

.dropzone .dz-preview .dz-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block; 
}

.dropzone .dz-preview .dz-details {
    padding: 8px; 
    font-size: 0.8em;
    min-height: 40px; 
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    justify-content: center; 
}

.dropzone .dz-preview .dz-remove {
    all: unset; 
    display: flex; 
    align-items: center;
    justify-content: center;
    width: 24px; 
    height: 24px; 
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: red;
    color: white !important; 
    border-radius: 50%; 
    font-size: 16px; 
    font-weight: bold;
    line-height: 24px; 
    text-align: center;
    cursor: pointer;
    z-index: 20; 
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
    transition: background-color 0.2s ease;
    font-size: 0;
    text-decoration: none !important; 
}

.dropzone .dz-preview .dz-remove::before {
    font-size: 18px;
    content: '\00D7'; 
}

.dropzone .dz-preview .dz-remove:hover {
    background-color: darkred;
}

.dropzone .dz-message {
    font-weight: bold;
    font-size: 1.2em;
}

.dz-error-message { 
    color: red;
    font-size: 0.8em;
    padding: 5px;
}

#submit-all-files {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    margin-top: 20px;
    transition: background-color 0.3s ease;
}

#submit-all-files:hover {
    background-color: #218838;
}

#messages { 
    margin-top: 20px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message { /* General error message div on uploader page */
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Styles for Download Page (download.html) */
/* Ensure body for download page also uses flex for centering if it's a standalone page view */
/* If download.html has its own body tag, these will apply. */
/* We can also target .download-container directly if it's always within a styled body */

.download-container { 
    background-color: #fff; 
    padding: 30px; 
    border-radius: 8px; 
    box-shadow: 0 0 15px rgba(0,0,0,0.1); 
    text-align: center; 
    width: 100%; 
    max-width: 400px; 
    margin: 5vh auto; /* Center it on the page if body isn't flexed */
}

.download-container h2 { 
    color: #333; 
    margin-bottom: 20px; 
}

.download-container .form-input, /* Class for password input */
.download-container .submit-button { /* Class for submit button */
    width: calc(100% - 22px); 
    padding: 12px; 
    margin-bottom: 15px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    box-sizing: border-box;
    font-size: 1em;
}

.download-container .submit-button { 
    background-color: #007bff; 
    color: white; 
    cursor: pointer; 
    transition: background-color 0.3s ease; 
}

.download-container .submit-button:hover { 
    background-color: #0056b3; 
}

.download-container .error-message-text { /* Class for error text on download page */
    color: red; 
    margin-top: 10px; 
    font-weight: bold; 
}
.download-container .back-link-container {
    margin-top: 20px;
}
.download-container .back-link-container a {
    color: #007bff;
    text-decoration: none;
}
.download-container .back-link-container a:hover {
    text-decoration: underline;
}

/* If the download page body needs specific centering: */
body.download-page-body { /* Add class="download-page-body" to body in download.html if needed */
    display: flex; 
    justify-content: center; 
    align-items: center; 
    min-height: 90vh; 
    margin: 0; /* Reset margin for full page centering */
}
