body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding-top: 70px;
}

.container {
    background-color: #fff;
    padding: 20px 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
}

h1 {
    color: #1c1e21;
    text-align: center;
    margin-bottom: 24px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
}

button {
    width: 100%;
    padding: 10px;
    background-color: #1877f2;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #166fe5;
}

#logout-btn {
    width: auto;
    padding: 8px 16px;
    background-color: #e4e6eb;
    color: #333;
}

#logout-btn:hover {
    background-color: #d8dade;
}

.error-message {
    color: #fa383e;
    text-align: center;
    margin-top: 10px;
}

p {
    text-align: center;
}

a {
    color: #1877f2;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

#session-list, #song-list {
    list-style: none;
    padding: 0;
}

#session-list li, #song-list li {
    background-color: #f7f7f7;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.session-link {
    font-weight: 600;
    color: #1c1e21;
    text-decoration: none;
}

.delete-btn {
    background-color: #fa383e;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.icon-btn {
    width: 35px; /* Adjust as needed */
    height: 30px; /* Adjust as needed */
    padding: 0; /* Remove default padding */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px; /* Adjust icon size */
    border-radius: 4px; /* Slightly rounded corners */
}

#song-list li:nth-child(even) {
    background-color: #f9f9f9;
}

.song-list-img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    margin-right: 10px;
}

.search-container {
    margin-bottom: 1rem;
}

.source-toggle {
    display: flex;
    margin-top: 8px;
}

.source-toggle button {
    flex: 1;
    background-color: #e4e6eb;
    color: #333;
    border-radius: 0;
    transition: background-color 0.3s ease;
}

.source-toggle button:first-child { border-radius: 6px 0 0 6px; }
.source-toggle button:last-child { border-radius: 0 6px 6px 0; }

#source-spotify.active {
    background-color: #1DB954; /* Spotify Green */
    color: white;
}

#source-youtube.active {
    background-color: #FF0000; /* YouTube Red */
    color: white;
}

#toast {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #28a745;
    color: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: bottom 0.5s ease-in-out;
    z-index: 1000;
    text-align: center;
}

#toast.show {
    bottom: 30px;
}

#toast.error {
    background-color: #fa383e;
}

#search-results {
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    position: relative;
}

.search-result-item:hover {
    background-color: #f0f2f5;
}

.search-result-item img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    border-radius: 4px;
}

.search-result-item .song-info strong {
    display: block;
    font-size: 14px;
}
.search-result-item .song-info small {
    color: #606770;
    font-size: 12px;
}

.search-result-item.pending {
    pointer-events: none;
}

.search-result-item.pending .loader-container {
    display: flex;
}

.search-result-item.odd {
    background-color: #f7f7f7;
}

.loader-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    display: none; /* Hidden by default */
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#main-header {
    background-color: #fff;
    padding: 10px 40px;
    border-bottom: 1px solid #ddd;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

#main-header .header-left {
    display: flex;
    align-items: center;
}

#main-header .header-right {
    display: flex;
    align-items: center;
}

#main-header .icon-btn {
    background-color: transparent;
    color: #333;
    border: none;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

#main-header .icon-btn:hover {
    background-color: #e4e6eb;
}

#main-header .user-info {
    display: flex;
    align-items: center;
}

#main-header .user-info span {
    margin-right: 15px;
    font-weight: 600;
}

#main-header button {
    width: auto;
    padding: 8px 16px;
    background-color: #1877f2;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

#main-header button:hover {
    background-color: #166fe5;
}

#main-header .logout-btn {
    background-color: #e4e6eb;
    color: #333;
}

#main-header .logout-btn:hover {
    background-color: #d8dade;
}

.session-header {
    display: flex;
    align-items: center;
    justify-content: center; /* Center the items */
    gap: 10px; /* Add some space between the title and the button */
    margin-bottom: 0px; /* Adjust as needed */
}

#share-session-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

#share-session-btn:hover {
    background-color: #f0f0f0;
}

#share-session-btn svg {
    width: 20px;
    height: 20px;
    stroke: #333;
}

#song-list li > span {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 10px;
}

#song-list li .delete-btn {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    padding: 0;
}