@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #f472b6;
    --accent: #8b5cf6;
    --light: #f9fafb;
    --gray-light: #f3f4f6;
    --gray-medium: #e5e7eb;
    --gray-dark: #9ca3af;
    --dark: #1f2937;
    --text: #4b5563;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

body {
    background-color: var(--light);
    color: var(--text);
    overflow-x: hidden;
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background-color: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--gray-light);
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 1.5rem;
}

.nav-menu {
    padding: 20px 0;
}

.menu-title {
    padding: 0 20px;
    font-size: 0.8rem;
    color: var(--gray-dark);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.nav-item:hover {
    background-color: var(--gray-light);
    color: var(--primary);
}

.nav-item.active {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    font-weight: 500;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: var(--primary);
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.user-profile {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid var(--gray-light);
    background-color: white;
}

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

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.95rem;
}

.user-email {
    font-size: 0.8rem;
    color: var(--gray-dark);
}

.logout-btn {
    padding: 6px;
    border-radius: 8px;
    background-color: var(--gray-light);
    border: none;
    cursor: pointer;
    color: var(--text);
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background-color: var(--danger);
    color: white;
}

.main-content {
    flex: 1;
    margin-right: 280px;
    padding: 20px;
    transition: all 0.3s ease;
}

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

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background-color: white;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background-color: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 8px;
    padding: 10px 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    width: 300px;
}

.search-bar input {
    border: none;
    outline: none;
    background: none;
    width: 100%;
    padding: 0 10px;
}

.search-bar i {
    color: var(--gray-dark);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: white;
    font-size: 1.2rem;
}

.icon-songs {
    background-color: var(--primary);
}

.icon-albums {
    background-color: var(--secondary);
}

.icon-playlists {
    background-color: var(--accent);
}

.icon-favorites {
    background-color: var(--warning);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--gray-dark);
    font-size: 0.9rem;
}

.content-section {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--gray-light);
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
}

.songs-list {
    width: 100%;
}

.songs-header {
    display: grid;
    grid-template-columns: 50px 1fr 1fr 120px 120px 100px;
    padding: 10px;
    background-color: var(--gray-light);
    border-radius: 8px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

.song-item {
    display: grid;
    grid-template-columns: 50px 1fr 1fr 120px 120px 100px;
    padding: 15px 10px;
    align-items: center;
    border-bottom: 1px solid var(--gray-light);
    transition: all 0.3s ease;
}

.song-item:hover {
    background-color: var(--gray-light);
    border-radius: 8px;
}

.song-cover {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(45deg, var(--primary) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.song-title {
    font-weight: 500;
    color: var(--dark);
}

.song-artist {
    color: var(--text);
}

.song-album, .song-duration {
    color: var(--text);
}

.song-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background-color: var(--gray-light);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text);
    transition: all 0.3s ease;
}

.action-btn:hover {
    background-color: var(--primary);
    color: white;
}

.action-btn.delete:hover {
    background-color: var(--danger);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    width: 500px;
    max-width: 90%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease forwards;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-light);
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--gray-medium);
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--gray-light);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.btn-cancel {
    background-color: var(--gray-light);
    color: var(--text);
    border: none;
}

.btn-cancel:hover {
    background-color: var(--gray-medium);
}

.upload-area {
    border: 2px dashed var(--gray-medium);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary);
    background-color: rgba(99, 102, 241, 0.05);
}

.upload-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.upload-text {
    margin-bottom: 10px;
    color: var(--text);
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--gray-dark);
}

.tab-container {
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    border-bottom: 2px solid var(--gray-light);
}

.tab {
    padding: 12px 20px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab.active {
    color: var(--primary);
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
}

.tab-content {
    display: none;
    padding: 20px 0;
}

.tab-content.active {
    display: block;
}

.albums-grid, .playlists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.album-card, .playlist-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.album-card:hover, .playlist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.album-cover, .playlist-cover {
    height: 150px;
    background: linear-gradient(45deg, var(--primary) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.album-info, .playlist-info {
    padding: 15px;
}

.album-title, .playlist-title {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 5px;
    font-size: 1rem;
}

.album-artist, .playlist-count {
    font-size: 0.85rem;
    color: var(--text);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
}

.category-card {
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

.category-card:hover {
    transform: scale(1.05);
}

.category-icon {
    font-size: 1.5rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.category-title {
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.category-1 {
    background: linear-gradient(45deg, #4f46e5 0%, #818cf8 100%);
}

.category-2 {
    background: linear-gradient(45deg, #db2777 0%, #f472b6 100%);
}

.category-3 {
    background: linear-gradient(45deg, #059669 0%, #34d399 100%);
}

.category-4 {
    background: linear-gradient(45deg, #d97706 0%, #fbbf24 100%);
}

.category-5 {
    background: linear-gradient(45deg, #7c3aed 0%, #a78bfa 100%);
}

.category-6 {
    background: linear-gradient(45deg, #be123c 0%, #fb7185 100%);
}

.favorites-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.favorite-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 10px;
    background-color: var(--gray-light);
    transition: all 0.3s ease;
}

.favorite-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.favorite-cover {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: linear-gradient(45deg, var(--primary) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.favorite-info {
    flex: 1;
}

.favorite-title {
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 3px;
}

.favorite-artist {
    font-size: 0.85rem;
    color: var(--text);
}

.favorite-play {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.favorite-play:hover {
    transform: scale(1.1);
    background-color: var(--primary-dark);
}

.music-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    padding: 15px 30px;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 50;
    transform: translateY(100%);
    transition: all 0.3s ease;
    height: 90px;
}

.music-player.active {
    transform: translateY(0);
}

.player-song-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.player-cover {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: linear-gradient(45deg, var(--primary) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.player-details {
    flex: 1;
}

.player-title {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 5px;
}

.player-artist {
    font-size: 0.85rem;
    color: var(--text);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.player-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: white;
    border: 1px solid var(--gray-light);
    color: var(--text);
}

.player-btn:hover {
    background-color: var(--gray-light);
}

.player-btn.play {
    background-color: var(--primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
}

.player-btn.play:hover {
    background-color: var(--primary-dark);
    transform: scale(1.1);
}

.player-progress {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.progress-bar {
    width: 100%;
    height: 5px;
    background-color: var(--gray-light);
    border-radius: 3px;
    overflow: hidden;
    cursor: pointer;
}

.progress {
    height: 100%;
    background-color: var(--primary);
    border-radius: 3px;
    width: 30%;
}

.progress-time {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text);
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 150px;
}

.volume-icon {
    color: var(--text);
}

.volume-slider {
    flex: 1;
    height: 4px;
    background-color: var(--gray-light);
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
}

.volume-level {
    height: 100%;
    background-color: var(--primary);
    border-radius: 2px;
    width: 70%;
}

/* Mobile responsive */
@media (max-width: 1024px) {
    .main-content {
        margin-right: 80px;
    }

    .sidebar {
        width: 80px;
    }

    .logo span, .nav-item span, .menu-title, .user-info {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 15px;
    }

    .nav-item i {
        width: auto;
    }

    .user-profile {
        justify-content: center;
        padding: 15px 10px;
    }

    .logout-btn {
        display: none;
    }
}

@media (max-width: 768px) {
    .songs-header {
        display: none;
    }

    .song-item {
        grid-template-columns: 50px 1fr 100px;
    }

    .song-album, .song-duration {
        display: none;
    }

    .music-player {
        padding: 10px 15px;
    }

    .player-volume, .player-btn.prev, .player-btn.next {
        display: none;
    }

    .player-controls {
        gap: 10px;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 576px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .albums-grid, .playlists-grid, .favorites-list {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .action-buttons {
        width: 100%;
    }

    .btn {
        flex: 1;
        justify-content: center;
    }

    .search-bar {
        width: 100%;
    }
}
