:root {
    --primary: #1DB954;
    --bg-dark: #090909;
    --sidebar-bg: rgba(0, 0, 0, 0.4);
    --player-bg: rgba(18, 18, 18, 0.8);
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #FFFFFF;
    --text-dim: #b3b3b3;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    background-image: url('assets/sevda.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.glass-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.5);
    position: relative;
}


/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--glass-border);
    padding: 24px;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
}

.profile-sidebar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary);
    margin-bottom: 15px;
    box-shadow: 0 0 20px rgba(29, 185, 84, 0.3);
}

.sidebar-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--glass-border);
}

.logo span span {
    color: #ff0000;
}

.sub-logo {
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
    padding-left: 36px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.anim-text {
    background: linear-gradient(
        to right, 
        #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff, #ff0000
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% auto;
    animation: rainbow 3s linear infinite;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

@keyframes rainbow {
    to { background-position: 200% center; }
}

nav .nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px;
    border-radius: 8px;
    color: var(--text-dim);
    transition: all 0.3s;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 8px;
}

.playlist-sidebar-section {
    margin: 20px 0;
}

.add-list-btn {
    width: 100%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    transition: 0.3s;
}

.add-list-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

nav .nav-item:hover, nav .nav-item.active {
    color: white;
    background: var(--glass);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #1a1a1a;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid var(--glass-border);
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.close, .close-add {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal h3 { margin-bottom: 20px; font-size: 24px; }
.modal input {
    width: 100%;
    background: #333;
    border: 1px solid #444;
    padding: 12px;
    border-radius: 8px;
    color: white;
    margin-bottom: 20px;
    outline: none;
}

.mood-selector { margin-bottom: 20px; }
.moods { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.mood-chip {
    background: #333;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 14px;
}
.mood-chip:hover, .mood-chip.selected { background: var(--primary); color: white; }

.primary-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

/* Song card extra btn */
.add-to-playlist-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: all 0.3s;
    opacity: 0;
}

.song-card:hover .add-to-playlist-btn { opacity: 1; }
.add-to-playlist-btn:hover { background: var(--primary); transform: scale(1.1); }

/* Playlists Grid */
.playlist-section { margin-bottom: 40px; }
.playlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.playlist-card {
    background: var(--glass);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.playlist-card:hover { transform: translateY(-5px); background: rgba(255,255,255,0.1); }
.playlist-card .mood-tag { font-size: 11px; text-transform: uppercase; color: var(--primary); font-weight: bold; }
.playlist-card h4 { font-size: 18px; }
.playlist-card p { font-size: 13px; color: var(--text-dim); }

.delete-playlist {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #666;
    transition: 0.3s;
}
.delete-playlist:hover { color: #ff0000; }

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}

.m-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--text-dim);
    font-size: 12px;
    cursor: pointer;
}

.m-nav-item i { font-size: 20px; }
.m-nav-item.active { color: white; }

.playlist-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.add-song-to-list-btn, .back-btn {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-song-to-list-btn:hover { background: var(--primary); }
.back-btn:hover { background: rgba(255,255,255,0.1); }

/* Progress Bar */
.progress-bar-bg {
    width: 100%;
    height: 10px;
    background: #333;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    width: 0%;
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.progress-info {
    margin-bottom: 5px;
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
}

/* Modal Songs List */
.modal-songs-list {
    max-height: 300px;
    overflow-y: auto;
}

.modal-song-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: 0.3s;
}

.modal-song-item:hover { background: rgba(255,255,255,0.05); }
.modal-song-item i { color: var(--text-dim); }

.search-box-modal input {
    width: 100%;
    background: #222;
    border: 1px solid #333;
    padding: 10px;
    border-radius: 8px;
    color: white;
    outline: none;
}

/* Mobile Player Adjustments */
@media screen and (max-width: 768px) {
    .sidebar { display: none; }
    .mobile-nav { display: flex; }
    .content { padding-bottom: 180px; }
    .top-bar { padding: 10px 0; }
    .search-box { width: 100%; }
    .player-bar { 
        bottom: 70px; 
        height: 80px; 
        padding: 0 15px; 
    }
    .now-playing { width: 150px; }
    .current-img { width: 45px; height: 45px; }
    .current-info h4 { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100px; }
    .current-info p { font-size: 10px; }
    .player-controls .buttons { gap: 15px; }
    .player-controls .buttons button { font-size: 16px; }
    .volume-controls { display: none; }
    .progress-container { position: absolute; top: 0; left: 0; width: 100%; gap: 0; }
    .progress-container span { display: none; }
    #progressRange { height: 2px; }
    .hero h1 { font-size: 28px; }
}

.sidebar-footer {
    margin-top: auto;
    font-size: 12px;
    color: var(--text-dim);
    border-top: 1px solid var(--glass-border);
    padding-top: 10px;
}

/* Main Content */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    padding-bottom: 120px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.search-box {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 300px;
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    width: 100%;
}

.search-box i {
    color: var(--text-dim);
}

.avatar {
    width: 35px;
    height: 35px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.hero {
    background: linear-gradient(135deg, rgba(29, 185, 84, 0.2), rgba(255, 0, 0, 0.1));
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 30px;
    border: 1px solid var(--glass-border);
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

.songs-section h2 {
    margin-bottom: 20px;
    font-size: 24px;
}

.songs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

.song-card {
    background: var(--glass);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s;
    cursor: pointer;
}

.song-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.default-cover {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: rgba(255, 255, 255, 0.3);
}

.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.song-card:hover .play-overlay {
    opacity: 1;
}

.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: all 0.3s;
    opacity: 0;
}

.song-card:hover .favorite-btn {
    opacity: 1;
}

.favorite-btn:hover {
    transform: scale(1.1);
    background: rgba(0,0,0,0.8);
}

.favorite-btn.liked {
    color: var(--primary);
    opacity: 1;
}

.favorite-btn.liked i {
    font-weight: 900;
}

.play-overlay i {
    font-size: 32px;
    color: white;
}

.card-info h3 {
    font-size: 16px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-info p {
    font-size: 14px;
    color: var(--text-dim);
}

/* Player Bar */
.player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: var(--player-bg);
    backdrop-filter: blur(30px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    justify-content: space-between;
    z-index: 100;
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 300px;
}

.current-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: var(--glass);
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-info h4 {
    font-size: 14px;
    margin-bottom: 2px;
}

.current-info p {
    font-size: 12px;
    color: var(--text-dim);
}

.player-controls {
    flex: 1;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.buttons {
    display: flex;
    align-items: center;
    gap: 24px;
}

.buttons button {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s;
}

.buttons button:hover {
    color: white;
}

.play-btn {
    width: 40px;
    height: 40px;
    background: white !important;
    color: black !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-dim);
}

input[type="range"] {
    flex: 1;
    height: 4px;
    cursor: pointer;
    accent-color: var(--primary);
}

.volume-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 200px;
    justify-content: flex-end;
}

.volume-controls input {
    width: 100px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

.no-songs {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    background: var(--glass);
    border-radius: 12px;
}

.no-songs i {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--text-dim);
}
