* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    min-height: 100vh;
    background-color: #f9f9f9;
}

#form-title {
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

form {
    padding: 12px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.container {
    display: flex;
    min-width: 300px;
}

.container-item {
    margin: 0 8px;
    max-height: 50vh;
    overflow: scroll;
}

@media screen and (orientation: portrait) and (max-width: 630px) {
    .container {
        flex-direction: column;
    }

    .container-item {
        max-height: 100%;
    }
}


label {
    font-size: 14px;
    color: #555;
    margin-bottom: 5px;
    display: block;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="tel"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    color: #333;
}

.toggle-container {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    position: absolute;
    top: 40px;
    right: 8px;
}

.toggle-container input[type="checkbox"] {
    position: relative;
    width: 40px;
    height: 20px;
    appearance: none;
    background: #ccc;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-container input[type="checkbox"]::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-container input[type="checkbox"]:checked {
    background: #4caf50;
}

.toggle-container input[type="checkbox"]:checked::before {
    transform: translateX(20px);
}

.toggle-label {
    cursor: pointer;
    user-select: none;
    margin-top: 6px;
}

select {
    width: 100%;
    padding: 10px;
    margin-bottom: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    color: #333;
    background-color: #fff;
    appearance: none; /* Removes default OS styling */
    cursor: pointer;
}

/* Optional: Add a down arrow icon */
select::-ms-expand {
    display: none; /* Hide default arrow in IE */
}

/* Optional: Hover and Focus States */
select:hover {
    border-color: #888;
}

select:focus {
    outline: none;
    border-color: #555;
}

ul {
    padding: 0;
    margin-bottom: 10px;
    width: 250px;
}

li {
    background: #f8f8f8;
    padding: 2px;
    margin-bottom: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hint {
    font-size: 12px;
    color: #777;
    margin-bottom: 15px;
}

button {
    width: 100%;
    height: 100%;
    align-self: center;
    padding: 10px;
    font-size: 16px;
    color: #fff;
    background-color: #4caf50;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 0 4px;
}

li > .delete-btn {
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
}

button:hover {
    background-color: #45a049;
}

.form-group {
    margin-bottom: 15px;
}

.message {
    flex-direction: column;
    gap: 6px;
    margin: 6px 0;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
    display: none; /* Hidden by default */
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.hide {
    display: none;
}

textarea {
    width: 100%;
    padding: 10px;
    resize: none;
}
