:root {
    --primary-color: #1a73e8;
    --secondary-color: #f0f3f7;
    --text-color: #333;
    --border-color: #ddd;
    --hover-color: #f5f5f5;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --player-bg: #fff;
    --progress-bg: #e0e0e0;
    --progress-fill: #1a73e8;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 24px;
    color: var(--primary-color);
}

.search-box {
    display: flex;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 2px 5px var(--shadow-color);
    width: 300px;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    outline: none;
    font-size: 16px;
}

.search-box button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background-color: #0d66da;
}

/* Filter Container */
.filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    margin-right: 15px;
    margin-bottom: 10px;
}

.filter-group label {
    margin-right: 10px;
    font-weight: 500;
}

.filter-group select {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    outline: none;
    background-color: white;
    cursor: pointer;
}

.view-options button {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 12px;
    margin-left: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.view-options button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Music Container */
#music-container {
    display: grid;
    grid-gap: 20px;
    margin-bottom: 100px; /* Space for the player */
}

#music-container.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

#music-container.list-view {
    grid-template-columns: 1fr;
}

.music-item {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px var(--shadow-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.music-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.music-item.grid-item {
    display: flex;
    flex-direction: column;
}

.music-item.list-item {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    align-items: center;
    padding: 10px;
}

.music-item .item-icon {
    background-color: #f8f9fa;
    padding: 20px;
    text-align: center;
    font-size: 2em;
    color: var(--primary-color);
}

.list-item .item-icon {
    padding: 10px;
    font-size: 1.5em;
}

.music-item .item-info {
    padding: 15px;
    flex: 1;
}

.list-item .item-info {
    padding: 0 15px;
}

.music-item .item-title {
    font-weight: 500;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.music-item .item-category {
    color: #777;
    font-size: 0.9em;
}

.music-item .item-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.list-item .item-actions {
    margin-top: 0;
}

.music-item button {
    background-color: transparent;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
}

.music-item button:hover {
    color: #0d66da;
}

.music-item button i {
    margin-right: 5px;
}

/* Music Player */
#music-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--player-bg);
    box-shadow: 0 -2px 10px var(--shadow-color);
    z-index: 100;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.now-playing {
    flex: 1;
    min-width: 200px;
    margin-right: 20px;
}

.track-info {
    margin-bottom: 5px;
}

#current-track {
    font-weight: 500;
}

.progress-container {
    width: 100%;
}

.progress-bar {
    height: 5px;
    background-color: var(--progress-bg);
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 5px;
}

.progress {
    height: 100%;
    background-color: var(--progress-fill);
    width: 0;
    transition: width 0.1s linear;
}

.time-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: #777;
}

.controls {
    display: flex;
    align-items: center;
}

.controls button {
    background-color: transparent;
    border: none;
    padding: 10px;
    font-size: 1.2em;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.3s;
}

.controls button:hover {
    color: var(--primary-color);
}

#play-btn {
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 15px;
    transition: background-color 0.3s;
}

#play-btn:hover {
    background-color: #0d66da;
    color: white;
}

.volume-container {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.volume-slider {
    width: 80px;
    height: 5px;
    background-color: var(--progress-bg);
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    margin-left: 10px;
}

.volume-progress {
    height: 100%;
    background-color: var(--progress-fill);
    width: 100%;
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
    padding: 50px;
    text-align: center;
}

.loading i {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: white;
    margin-top: 50px;
}

/* Responsive */
@media (max-width: 768px) {
    header, .filter-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .logo, .search-box, .filter-group {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .search-box {
        width: 100%;
    }
    
    #music-container.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    #music-player {
        flex-direction: column;
    }
    
    .now-playing {
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .controls {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    #music-container.grid-view {
        grid-template-columns: 1fr;
    }
}
