/* General Body Styles */
body {
    font-family: sans-serif;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

/* Player Styles */
#player {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 20px;
    width: 350px;
}

#cover img {
    width: 100%;
    border-radius: 8px;
}

#info {
    text-align: center;
    margin: 15px 0;
}

#title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
}

#time-info, #total-time-info {
    font-size: 0.9em;
    color: #666;
}

#controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

#controls button {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    margin: 0 15px;
    color: #333;
}

/* Playlist Styles */
#playlist ul {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 150px;
    overflow-y: auto;
}

#playlist li {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

#playlist li.active {
    background-color: #eee;
    font-weight: bold;
}

/* Download & PWA Buttons */
#download {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #333;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f1f1f1;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    bottom: 100%;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {background-color: #ddd;}

.dropdown:hover .dropdown-content {
    display: block;
}

#install-pwa {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #333;
    display: none;
}

/* Login Form Styles */
#login-form {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 20px;
    width: 300px;
    text-align: center;
}

#login-form h1 {
    margin-bottom: 20px;
}

#login-form .error {
    color: #ff0000;
    margin-bottom: 10px;
}

#login-form input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

#login-form button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Responsive Styles */
@media (max-width: 400px) {
    body {
        padding: 0;
    }

    #player {
        width: 100%;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    #cover {
        flex-grow: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #cover img {
        max-height: 80%;
        max-width: 80%;
    }

    #info {
        margin: 10px 0;
    }

    #title {
        font-size: 1.1em;
    }

    #time-info, #total-time-info {
        font-size: 0.8em;
    }

    #controls button {
        font-size: 1.3em;
        margin: 0 10px;
    }

    #playlist ul {
        max-height: 100px;
    }

    #download {
        margin-top: 10px;
    }
}