body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    padding: 10px;
    box-sizing: border-box;
}

.input-container {
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

.input-container input, .input-container button {
    margin: 5px;
    padding: 10px;
    font-size: 16px;
    width: calc(50% - 22px); /* Adjust width for better layout on mobile */
}

.container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.table {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.box-container {
    position: relative;
    width: 100%;
    padding-top: 140%; /* Adjusted aspect ratio to ensure chairs are visible */
}

.box {
    width: 100%;
    height: 70%;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 18px;
    background-color: #eef;
    opacity: 0;
    animation: fadeIn 2s forwards;
    transition: background-color 0.3s, transform 0.3s;
    position: absolute;
    top: 60%;
    left: 0;
    transform: translateY(-50%);
}

.box:hover {
    background-color: #dde;
    transform: scale(1.05);
}

.chair {
    width: 40%;
    height: 20%;
    background-color: #8b4513; /* Brown color for the chair */
    border-radius: 4px 4px 0 0;
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
}

.chair::before {
    content: '';
    width: 20%;
    height: 20%;
    background-color: #8b4513;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.aisle {
    width: 10%;
    min-width: 20px;
}

@media (max-width: 600px) {
    .aisle {
        width: 5%;
    }

    .box-container {
        padding-top: 160%; /* Adjust aspect ratio for mobile */
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

