body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0;
}

.container {
    width: 90%;
    max-width: 600px;
    margin: 20px auto;
    background: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
}

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

.inline-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

label {
    margin-top: 10px;
    position: relative;
}

input {
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border-color 0.3s;
}

input:focus {
    border-color: #ff7a57;
    outline: none;
    box-shadow: 0 0 5px rgba(255, 122, 87, 0.5);
}

button {
    margin-top: 20px;
    padding: 10px;
    background-color: #ff7a57;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #e66a4d;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    max-width: 150px;
    height: 8px;
    background: #ddd;
    outline: none;
    opacity: 0.7;
    -webkit-transition: .2s;
    transition: opacity .2s;
}

input[type="range"]:hover {
    opacity: 1;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #ff7a57;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #ff7a57;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

.room-dimensions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#result {
    margin-top: 20px;
}

#warning {
    color: red;
    margin-top: 10px;
}

.room-visualization {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.room, .shared-space {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #000;
    background-color: #ddd;
}

.room {
    background-color: #e7f7ff;
}

.shared-space {
    background-color: #ffeedf;
}

.tooltip {
    visibility: hidden;
    width: 300px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%; /* Position above the label */
    left: 50%;
    margin-left: -150px; /* Center the tooltip */
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%; /* Bottom of the tooltip */
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

label:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Media Queries for Responsive Design */
@media (max-width: 600px) {
    .inline-inputs {
        flex-direction: column;
        align-items: flex-start;
    }

    button {
        width: 100%;
    }
}
