* {
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f4f6f8;
    margin: 0;
}

.container {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 500px;
    width: 90%;
}

h2 {
    margin-top: 0;
    color: #333;
}

input[type="file"] {
    margin-bottom: 15px;
    width: 100%;
}

.preview-container {
    margin: 15px 0;
    min-height: 150px;
    max-height: 300px;
    border: 2px dashed #ccc;
    border-radius: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 15px;
    overflow-y: auto;
    background-color: #fafafa;
    align-items: center;
    justify-content: center;
}

/* Wrapper buat thumbnail biar tombol X posisinya pas */
.thumbnail-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
}

.thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Tombol hapus satuan (X) */
.delete-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.delete-btn:hover {
    background-color: #c82333;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

button {
    background-color: #0056b3;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    width: 100%;
    transition: background-color 0.2s;
}

button:hover:not(:disabled) {
    background-color: #004494;
}

/* Tombol bahaya/hapus */
.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover:not(:disabled) {
    background-color: #c82333;
}

button:disabled {
    background-color: #b0c4de;
    cursor: not-allowed;
}

.btn-danger:disabled {
    background-color: #f5c6cb;
}