/* Styles for elements inside recent-container */
#recent-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 20px;
}

#recent-song-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 1520px;
    margin-bottom: 20px;
}

.recent-card {
    position: relative;
    width: 500px;
    background-color: var(--form-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    overflow: hidden;
    cursor: pointer;
}

.recent-card-cover {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
    transition: filter 0.3s ease;
}

.recent-card:hover .recent-card-cover {
    filter: blur(1px) brightness(50%);
}

.recent-play-button {
    all: unset;
    position: absolute;
    top: 30px;
    left: 30px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recent-play-button svg {
    filter: drop-shadow( 0 5px 5px rgba(0, 0, 0, .9));
    width: 40px;
    height: 40px;
}

.recent-card:hover .recent-play-button {
    opacity: 1;
}

.cover-container {
    position: relative;
    display: inline-block;
}

.recent-download-link {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: var(--youtube-color);
    border: none;
    padding: 4px;
    border-radius: 8px 0 0 0;
}

.recent-edit-link {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--youtube-color);
    border: none;
    padding: 4px;
    border-radius: 0 0 0 8px;
}

#icon-edit path, #icon-download path {
    fill: #fff;
}

.recent-download-link:hover, .recent-edit-link:hover {
    background-color: var(--youtube-dark-color);
    cursor: pointer;
}

.recent-details {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.recent-title {
    max-width: 320px;
    font-weight: bold;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-artist {
    color: var(--text-subtle-color);
    font-size: 0.95em;
    max-width: 320px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-album {
    max-width: 320px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-album {
    font-size: 0.9em;
    color: var(--neutral-color);
}

.recent-download-date {
    font-size: 0.75em;
    color: var(--youtube-color);
}

/* Styles for elements inside playlist-searches */
.playlist-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}
.playlist-cover {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}
.playlist-title {
    font-size: 1.2em;
    font-weight: bold;
}
.playlist-uploader {
    font-size: 0.95em;
    color: var(--text-subtle-color);
}

.playlist-song-count {
    font-size: 0.9em;
    color: var(--neutral-color);
}

.playlist-flex-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 55vh;
    overflow-y: auto;
    padding: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--youtube-color) var(--form-color);
}

.playlist-flex-container::-webkit-scrollbar {
    width: 12px;
    background: var(--form-color);
    border-radius: 4px;
}

.playlist-flex-container::-webkit-scrollbar-thumb {
    background: var(--youtube-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.playlist-song-card {
    display: flex;
    width: 550px;
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 8px;
    background-color: var(--form-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.playlist-song-card:hover {
    cursor: pointer;
    background: var(--youtube-transparent-color, rgba(255,0,0,0.2));
}

.playlist-song-thumbnail {
    height: 100px;
    width: 100px;
    border-radius: 8px;
    object-fit: cover;
}

.playlist-song-title {
    font-size: 1em;
    font-weight: bold;
    max-width: 328px;
}

.playlist-song-channel {
    font-size: 0.95em;
    color: var(--text-subtle-color);
}

.playlist-song-duration {
    font-size: 0.9em;
    color: var(--neutral-color);
}

.playlist-details {
    flex: 1;
    flex-direction: column;
    display: flex;
    justify-content: center;
    align-items: center;
}

.playlist-song-download-status {
    font-size: .8em;
}

.playlist-song-progress-bar-container {
    max-width: 300px;
    width: 100%;
    height: 8px;
    background: var(--form-inner-color);
    border-radius: 3px;
    margin-top: 6px;
    overflow: hidden;
    display: none;
}

.playlist-song-progress-bar {
    height: 100%;
    background: var(--youtube-color);
    width: 0%;
    transition: width 0.4s;
}

.playlist-song-download-status a {
    position: relative;
    left: 148px;
}

.playlist-controls {
    display: flex;
    flex-direction: column;
    padding: 10px;
}

.playlist-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 20px;
}

#playlist-checkbox {
    user-select: none;
    color: #fff;
    background-color: var(--youtube-color);
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
}

#playlist-checkbox:hover {
    background-color: var(--youtube-dark-color);
}

#select-all-checkbox {
    display: none;
}

#main-playlist-progress-bar-container {
    width: 100%;
}

#main-playlist-progress-bar {
    height: 12px;
    background: var(--youtube-color);
    width: 0%;
    border-radius: 4px;
    margin-top: 10px;
    transition: width 0.3s;
}

#playlist-overall-progress {
    font-size: 0.9em;
    color: var(--youtube-color);
    font-weight: bold;
}

#download-all-mp3s-btn {
    margin-top: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
}

.playlist-select-checkbox {
    display: none;
}

/* Checked effect (modern browsers) */
.playlist-song-card:has(.playlist-select-checkbox:checked) {
    outline: 1px solid var(--youtube-color);
    box-shadow: 0 0 6px var(--youtube-color);
}

/* Responsive design */
@media (max-width: 768px) {
    #download-form {
        width: 365px;
    }

    .input-search-container {
        width: 100%;
    }

    .recent-card {
        width: 90%;
    }

    .recent-card-cover {
        width: 60px;
        height: 60px;
    }

    .recent-title {
        font-size: .9em;
    }

    .recent-artist, .recent-album {
        font-size: .8em;
    }

    .recent-title, .recent-artist, .recent-album {
        max-width: 225px;
    }

    .recent-play-button {
        top: 10px;
        left: 10px;
    }

    .recent-download-link, .recent-edit-link {
        padding: 0;
    }
}