body {
    font-family: 'Nunito', Arial, Tahoma, 'PingFang SC', sans-serif;
    background-color: #f8f8f8;
    margin: 0;
    padding: 0;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.6);

}
h1 {
    color: #333;
    padding: 20px;
}
ul {
    list-style-type: none; /* Remove list bullets */
    padding: 0;
    margin: 0;
    height: calc(100vh - 50px); /* Value subtracting menu bar height from screen height */
}

ul li {
    background-color: #ffffff;
    margin: 10px 5%;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
ul li:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}
@media (max-width: 600px) {
    ul li {
        margin: 10px 3%;
        padding: 15;
        font-size: larger;
    }

    #add-item {
        right: 12px;
        bottom: 80px;
        margin: 0;
        padding: 0;
        width: 52px;
        height: 52px;
        font-size: 28px;
    }
}


#add-item {
    position: fixed;
    bottom: 80px;
    right: 12px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #007bff;
    color: #ffffff;
    font-size: 32px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    z-index: 997;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


#menu-bar {
    z-index: 996;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: rgb(0, 0, 0);
    color: white;
    padding: 5px;
    display: flex;
    justify-content: space-around; /* Set equal spacing between items */
    align-items: center;
}

#list-container {
    padding: 20px 0 140px;
}

#menu-bar a {
    display: flex; /* Enable flexbox */
    flex-direction: column; /* Arrange elements vertically */
    align-items: center; /* Center align */
    text-decoration: none; /* Remove text underline */
    color: white; /* Set text color to white */
    font-size: small;
}

#menu-bar img {
    height: 20px;
    width: auto;
    margin-bottom: 3px; /* Set margin between image and text */
}

.playlist-container {
    display: flex;
    flex-direction: column;
    justify-content: center; /* Adjust items to the center vertically */
    align-items: center; /* Center items horizontally */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgb(0 0 0 / 85%);
    padding: 20px;
    box-sizing: border-box;
    z-index: 10; /* Set z-index for .playlist-container */
    overflow-y: auto; /* Enable vertical scrollbar */
}



/* Ensure the form and cancel button are wrapped in a container for better control */
.form-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


/* Apply to both the form and cancel button for consistent styling */
.playlist-form, .cancel-button {
    margin: 10px 0; /* Provide spacing */
    width: 90%; /* Adjust based on design */
    max-width: 500px; /* Set a max width */
}

/* Addition: Overlay style to darken the background */
.overlay {
    position: fixed; /* Fixed position relative to the screen */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: 1040; /* To appear under the form */
}

.cancel-button {
    width: 100%;
    padding: 10px;
    margin-top: 5%;
    background-color: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}


.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

button {
    width: 100%;
    padding: 10px;
    margin-top: 5%;
    background-color: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.playlist-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%; /* Adjust the width as needed */
    max-width: 600px; /* Or any maximum width you prefer */
}

.input-group {
    width: 100%; /* Full width of the form */
    margin-bottom: 20px; /* Space between input groups */
    margin-top: 70%;
}

.input-group label,
.input-group input,
button {
    width: 100%; /* Ensure full width within the form */
    margin: 8px 0; /* Adjust spacing as needed */
    padding: 10px;
}

/* Make sure buttons are aligned and styled consistently */
button {
    background-color: #007bff;
    border-radius: 5px; /* Optional: rounded corners */
    color: white;
    padding: 4%; /* Padding for content */
    /* width: 30%; */
    z-index: 996;
    margin: 10px;
    font-family: 'Nunito', Arial, Tahoma, 'PingFang SC', sans-serif;
    display: inline-block;
    text-decoration: none;
    border: none; /* Remove border */
    box-shadow: none; /* Remove shadow */
    position: relative;
}



.cancel-button {
    background-color: grey;
    border-radius: 5px; /* Optional: rounded corners */
    color: white;
    padding: 4%; /* Padding for content */
    /* width: 30%; */
    z-index: 996;
    margin: 10px;
    font-family: 'Nunito', Arial, Tahoma, 'PingFang SC', sans-serif;
    position: relative;
    display: inline-block;
    text-decoration: none;
    border: none; /* Remove border */
    box-shadow: none; /* Remove shadow */
    position: relative;
}


#message {
    display: none; /* Initially hidden for control by JavaScript */
    position: fixed; /* Fixed to the top of the screen */
    top: 20px; /* Distance from the top */
    left: 50%; /* Position at 50% from the left edge */
    transform: translateX(-50%); /* Translate -50% on the X-axis to center */
    z-index: 1000; /* Display in front of other elements */
    background-color: #f8d7da; /* Background color (e.g., pale red for error messages) */
    color: #721c24; /* Text color */
    padding: 15px 30px; /* 内側の余白 */
    margin: 0 auto; /* Center align with auto margin */
    border-radius: 5px; /* Rounded corners */
    border: 1px solid #f5c6cb; /* Border */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add shadow */
    font-size: 16px; /* Font size */
    text-align: center; /* Center align text */
    max-width: 80%; /* Set maximum width */
}

#message.success {
    background-color: #d4edda; /* Green background */
    color: #155724; /* Green text */
    border-color: #c3e6cb;
}

#message.error {
    background-color: #f8d7da; /* Red background */
    color: #721c24; /* Red text */
    border-color: #f5c6cb;
}

/* Styles for desktops */
@media (min-width: 601px) {
    #list-container {
        padding-bottom: 50px; /* Add padding at the bottom equal to the height of the menu bar */
        overflow-y: auto; /* Enable scrolling if content overflows */
        height: calc(100vh - 177px); /* Set height considering other elements */
    }
}

/* Styles for mobile devices */
@media (max-width: 600px) {
    #list-container {
        padding-bottom: 60px; /* Add padding at the bottom for mobile menu */
        overflow-y: auto; /* Enable scrolling if content overflows */
        height: calc(100vh - 190px); /* Set height considering other elements */
    }
}


#add-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}
