body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 20px 0px;
	background-color: #f0f2f5;
}
.container {
	background: white;
	padding: 2rem 2.5rem;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	width: 100%;
	max-width: 400px;
}
.container-gallery {
	background: white;
	padding: 2rem 2.5rem;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	width: 100%;
	margin: 0px 20px;
}
h1 {
	text-align: center;
	color: #333;
	margin-bottom: 1.5rem;
}
.form-group {
	margin-bottom: 1.25rem;
}
label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	color: #555;
}
input[type="email"],
input[type="password"] {
	width: 100%;
	box-sizing: border-box; /* Ensures padding doesn't affect width */
	padding: 0.75rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1rem;
}
input:focus {
	border-color: #007bff;
	outline: none;
	box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}
button {
	width: 100%;
	padding: 0.75rem;
	border: none;
	border-radius: 4px;
	background-color: #007bff;
	color: white;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s;
}
button:hover {
	background-color: #0056b3;
}
button:disabled {
	background-color: #a0c3e6;
	cursor: not-allowed;
}
#message {
	margin-top: 1rem;
	text-align: center;
	font-weight: 500;
}
.navigation-link {
	text-align: center;
	margin-top: 1.5rem;
	font-size: 0.9rem;
}
.navigation-link a {
	color: #007bff;
	text-decoration: none;
}
.navigation-link a:hover {
	text-decoration: underline;
}
.upload-container { max-width: 600px; }
#imagePreview { /* Pastikan ID-nya cocok dengan di HTML */
	width: 100%; /* Paksa lebar gambar menjadi 100% dari kotaknya */
	max-height: 300px; /* Kita beri sedikit ruang lebih untuk tinggi */
	object-fit: contain; /* Ini properti ajaib: gambar akan menyesuaikan diri tanpa terpotong */
	margin-top: 1rem;
	display: none;
	border: 1px solid #eee; /* Beri sedikit border agar terlihat rapi */
	border-radius: 4px;
}
.result-area { margin-top: 1.5rem; display: none; }
.result-area input { width: calc(100% - 80px); }
.result-area button { width: 70px; }
.gallery-container {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1rem;
	margin-top: 1.5rem;
}
.gallery-item {
	border: 1px solid #ddd;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.gallery-item img {
	width: 100%;
	height: 150px;
	object-fit: cover;
	display: block;
}
.gallery-item p {
	padding: 0.5rem;
	margin: 0;
	font-size: 0.9rem;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.gallery-item:hover .delete-button {
    opacity: 1; /* Tampilkan saat di-hover */
}
.gallery-item {
    position: relative; /* Diperlukan agar tombol 'absolute' berfungsi */
}
.delete-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s;
}
/* CSS untuk Loading Overlay */
.gallery-item .loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: none; /* Sembunyi secara default */
    justify-content: center;
    align-items: center;
    z-index: 10;
}
.gallery-item.deleting .loading-overlay {
    display: flex; /* Tampilkan saat class 'deleting' */
}
/* CSS untuk Spinner itu sendiri */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* CSS untuk Notifikasi Toast */
#toastNotification {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 16px;
    position: fixed;
    z-index: 20;
    left: 30px;
    top: 30px;
    opacity: 0;
    transition: visibility 0.5s, opacity 0.5s, transform 0.5s;
    transform: translateY(20px);
}
#toastNotification.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}
#toastNotification.success {
    background-color: #28a745; /* Hijau */
}
#toastNotification.error {
    background-color: #dc3545; /* Merah */
}
@media only screen and (max-width: 500px) {
	body, .container-gallery {
		margin: 0;
	}
	.container, .container-gallery {
		padding: 14px;
	}
}
