body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
}

#login-container, #main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    margin: 20px;
}

#main-container {
    align-items: center;
}

h2, h3 {
    margin-top: 0;
}

form {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 5px;
}

input {
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    padding: 10px;
    border: none;
    background-color: #007BFF;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

#response {
    margin-top: 20px;
}

#machines-list {
    width: 100%;
}

#machines-list .machine-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    width: 100%;
}

#machines-list .machine-name {
    flex-grow: 1;
    position: relative;
}

#machines-list .machine-name::after {
    content: attr(data-status);
    visibility: hidden;
    opacity: 0;
    width: 60px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -30px;
    transition: opacity 0.3s;
}

#machines-list .machine-name:hover::after {
    visibility: visible;
    opacity: 1;
}

#machines-list .machine-buttons {
    display: flex;
    gap: 5px;
}

#control-buttons {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
}

#control-buttons button {
    flex: 1 1 calc(50% - 10px);
    box-sizing: border-box;
}

#add-machine-container {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

#offline-machines-container {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

#offline-machines-list {
    list-style-type: none;
    padding: 0;
}

#offline-machines-list li {
    color: red;
}

#offline-machines-container {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

#online-count, #offline-count {
    font-weight: bold;
    margin-bottom: 10px;
}

#offline-machines-list {
    list-style-type: none;
    padding: 0;
}

#offline-machines-list li {
    color: red;
}

.modal {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 400px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 20px;
}

.button-container {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: space-between;
}

.machine-counts {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 10px;
}

.machine-counts > div {
    flex: 1;
    text-align: center;
    font-weight: bold;
}

button.delete-button {
    background-color: #FF0000;
}

button.delete-button:hover {
    background-color: #CC0000;
}