/* playlist.css - Responsive Playlist Page */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: #f0f0f0;
    min-height: 100vh;
    overflow-x: hidden;
}

.playlist-container {
    display: flex;
    min-height: 100vh;
    padding-bottom: 80px; /* Space for music player footer */
}

/* Navigation Styles */
.playlist-nav {
    width: 280px;
    background: rgba(15, 15, 40, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.3);
    z-index: 100;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.nav-header {
    margin-bottom: 40px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.user-info img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #5a2fc2;
}

.user-details h2 {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
}

.user-details p {
    font-size: 12px;
    color: #aaa;
}

.nav-menu {
    list-style: none;
    margin-bottom: 40px;
}

.nav-item {
    margin: 8px 0;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.nav-item a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #ccc;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.nav-item.active a,
.nav-item a:hover {
    background: linear-gradient(90deg, #5a2fc2, #8a4fff);
    color: white;
    transform: translateX(5px);
}

.nav-icon {
    font-size: 18px;
    width: 30px;
}

.nav-text {
    margin-left: 15px;
    font-size: 15px;
    font-weight: 500;
}

.playlist-stats {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-item i {
    font-size: 24px;
    color: #8a4fff;
    width: 50px;
    height: 50px;
    background: rgba(138, 79, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-item h3 {
    font-size: 20px;
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 12px;
    color: #aaa;
}

.nav-footer {
    list-style: none;
    margin-top: auto;
}

/* Main Content Styles */
.playlist-main {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.header-left h1 {
    font-size: 32px;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #ff416c, #ff4b2b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-left p {
    color: #aaa;
    font-size: 16px;
}

.create-playlist-btn {
    background: linear-gradient(90deg, #5a2fc2, #8a4fff);
    border: none;
    padding: 12px 25px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.create-playlist-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(90, 47, 194, 0.4);
}

.search-box {
    position: relative;
    margin-top: 15px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.search-box input {
    width: 300px;
    padding: 12px 20px 12px 45px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #8a4fff;
    background: rgba(255, 255, 255, 0.12);
}

/* Featured Playlists */
.featured-playlists {
    margin-bottom: 40px;
}

.featured-playlists h2,
.all-playlists h2,
.recently-played h2 {
    font-size: 24px;
    margin-bottom: 25px;
    color: #fff;
}

.playlist-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.playlist-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.playlist-card.featured {
    border: 2px solid transparent;
    background: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)), 
                linear-gradient(45deg, #5a2fc2, #ff416c);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.playlist-cover {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.playlist-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.playlist-card:hover .playlist-cover img {
    transform: scale(1.05);
}

.playlist-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(90, 47, 194, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.playlist-card:hover .playlist-overlay {
    opacity: 1;
}

.play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    border: none;
    color: #5a2fc2;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn:hover {
    transform: scale(1.1);
    background: #ff416c;
    color: white;
}

.playlist-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff416c;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.playlist-info {
    padding: 20px;
}

.playlist-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: white;
}

.playlist-info p {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 15px;
}

.playlist-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.tag {
    background: rgba(138, 79, 255, 0.2);
    color: #8a4fff;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.playlist-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 10px;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn:first-child {
    background: linear-gradient(90deg, #5a2fc2, #8a4fff);
}

.action-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
}

.action-btn:first-child:hover {
    background: linear-gradient(90deg, #8a4fff, #ff416c);
}

/* All Playlists Table */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.filter-options {
    display: flex;
    gap: 15px;
    align-items: center;
}

.filter-select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
}

.view-toggle {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.view-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.playlist-table {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 40px;
}

.table-header {
    display: grid;
    grid-template-columns: 80px 2fr 1fr 1fr 1fr 1fr;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    font-weight: 600;
    color: #aaa;
}

.playlist-row {
    display: grid;
    grid-template-columns: 80px 2fr 1fr 1fr 1fr 1fr;
    padding: 20px;
    align-items: center;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.playlist-row:last-child {
    border-bottom: none;
}

.playlist-row:hover {
    background: rgba(255, 255, 255, 0.08);
}

.col-index {
    display: flex;
    align-items: center;
    gap: 15px;
}

.index-number {
    color: #aaa;
    font-size: 14px;
}

.row-play-btn {
    background: transparent;
    border: none;
    color: #8a4fff;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
}

.playlist-row:hover .row-play-btn {
    opacity: 1;
}

.col-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.playlist-thumb {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    overflow: hidden;
}

.playlist-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-details h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: white;
}

.playlist-details p {
    font-size: 14px;
    color: #aaa;
}

.col-songs,
.col-duration,
.col-date {
    font-size: 14px;
    color: #aaa;
}

.col-actions {
    display: flex;
    gap: 10px;
}

.table-action-btn {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Recently Played */
.recent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.recent-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.recent-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.recent-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.recent-card h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: white;
}

.recent-card p {
    font-size: 14px;
    color: #aaa;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}

.modal-content