/* RESET & GLOBALS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100vh;
    overflow-x: hidden;
}

body {
    font-family: Arial, sans-serif;
}

/* LAYOUT WRAPPER */
.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* HEADER */
header {
    background: #333;
    color: white;
    height: 60px;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.directory {
    margin-left: 60px;
    background: #ccc;
    width: fit-content;
    padding: 2px 20px 2px 5px;
    border: 3px solid;
}
/* BACK ICON */
.back_icon {
    position: absolute;
    left: 30px;
    top: 30px;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 1000;
}

/* MAIN CONTENT */
main {
    flex: 1;
    overflow-y: auto;
    padding: 0px 60px 20px 60px;
}

/* FOOTER */
footer {
    background: #333;
    color: white;
    height: 60px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* PLAYLIST GRID */
.playlist_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 16px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 0;
}

/* PLAYLIST CARD */
.playlist_card {
    background: #222;
    backdrop-filter: blur(10px);
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: 280px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.playlist_card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    background: #333;
}

.playlist_card:hover .playlist_thumbnail img {
    transform: scale(1.05);
}

.playlist_card:hover .play_overlay {
    opacity: 0.8;
}

/* PLAYLIST THUMBNAIL */
.playlist_thumbnail {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.playlist_thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* PLAY OVERLAY */
.play_overlay {
    position: absolute;
    width: 60px;
    height: 60px;
    top: 100px;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.play_overlay img {
    width: 50%;
    height: 50%;
    transform: translateX(8%);
}
/* PLAYLIST INFO */
.playlist_info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* PLAYLIST TITLE */
.playlist_title {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    text-overflow: ellipsis;
    height: 40px;
    text-decoration: none;
}

/* PLAYLIST LENGTH */
.playlist_length {
    position: absolute;
    bottom: 80px;
    right: 5px;
    background: rgb(97, 136, 209);
    color: white;
    font-size: 0.9rem;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px #222 solid;
}

/* ICONS & UTILITIES */
.list_icon {
    width: 1rem;
    height: 1rem;
    transform: translateY(1px);
}

.playlist_grid a {
    text-decoration: none;
}

@media (max-width: 600px) {
    body {
        height: fit-content;
    }
    main {
        padding: 0 15px 20px 15px;
    }
    .playlist_grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
}   
