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

.player {
    background-color: white;
    padding: 2em;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: center;
    width: 90%;
    max-width: 400px;
}

h1 {
    margin-top: 0;
}

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

#controls button {
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    cursor: pointer;
    margin: 0 0.5em;
    border-radius: 50%; /* Make buttons circular */
    width: 50px;
    height: 50px;
    color: black;
    transition: background-color 0.2s;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 50%;
}

#controls button:hover {
    background-color: #e0e0e0;
}

#controls button.active {
    background-color: #333;
    border-color: #333;
}

#play-pause-btn div {
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 50%;
}

/* SVG Icons as Data URIs */
#prev-btn { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M6 6h2v12H6zm3.5 6l8.5 6V6z"></path></svg>'); }
#play-icon { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M8 5v14l11-7z"></path></svg>'); }
#pause-icon { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"></path></svg>'); }
#next-btn { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M6 18l8.5-6L6 6v12zM16 6v12h2V6h-2z"></path></svg>'); }
#loop-btn { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black"><path d="M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z"></path></svg>'); }
#loop-btn.active { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z"></path></svg>'); }


.hidden {
    display: none;
}

#time-controls {
    display: flex;
    align-items: center;
    gap: 1em;
    margin-bottom: 1em;
}

#seek-bar {
    flex-grow: 1;
}

#current-time, #total-duration {
    font-family: monospace;
    font-size: 0.9em;
}

#search-input {
    width: 100%;
    padding: 0.5em;
    margin-bottom: 1em;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#playlist {
    list-style: none;
    padding: 0;
    margin-top: 1em;
    max-height: 200px;
    overflow-y: auto;
    text-align: left;
    border: 1px solid #eee;
}

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

#playlist li:hover {
    background-color: #f0f0f0;
}

#playlist li.playing {
    background-color: #e0e0e0;
    font-weight: bold;
}

.dir-button {
    display: block;
    width: 80%;
    margin: 1em auto 0;
    padding: 1em;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s;
}

.dir-button:hover {
    background-color: #555;
}

input[type="file"].hidden {
    display: none;
}