:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --dark-color: #1e272e;
    --darker-color: #0f1519;
    --light-color: #f5f6fa;
    --gray-color: #636e72;
    --overlay-color: rgba(0, 0, 0, 0.7);
    --blur-intensity: 10px;
}

/* Style the scrollbar track */
::-webkit-scrollbar {
    width: 5px; /* Width of the scrollbar */
     /* Height of the scrollbar (for horizontal scrollbars) */
}

/* Style the scrollbar thumb (the draggable part) */
::-webkit-scrollbar-thumb {
    background-color: #5526eea7; /* Color of the thumb */
}

/* Style the scrollbar thumb on hover */
::-webkit-scrollbar-thumb:hover {
    background-color: #000000; /* Change thumb color on hover */
}

/* Style the scrollbar track */
::-webkit-scrollbar-track {
    background: #000000; /* Color of the scrollbar track */
}

/* Optional: Style the scrollbar buttons (top and bottom arrows) */
::-webkit-scrollbar-button {
    background-color: transparent; /* Background for scrollbar buttons */
}

/* Optional: Style the horizontal scrollbar */
::-webkit-scrollbar-horizontal {
    height: 4px;
}


* {
    user-select: none;
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* Internet Explorer/Edge */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--dark-color);
    color: var(--light-color);
    min-height: 100vh;
    transition: all 0.3s ease;
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-container input {
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    border-radius: 50px;
    border: none;
    background-color: var(--darker-color);
    color: var(--light-color);
    font-size: 1rem;
    width: 250px;
    outline: none;
    transition: all 0.3s ease;
}

.search-container input:focus {
    box-shadow: 0 0 0 2px var(--primary-color);
}

.search-container i {
    position: absolute;
    left: 1rem;
    color: var(--gray-color);
}

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

.music-item {
    background-color: var(--darker-color);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

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

.music-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.music-item:hover::before {
    opacity: 1;
}

.music-cover {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.music-info {
    padding: 1.2rem;
}

.music-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-info p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Music Player Styles */
.music-player {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background-color: var(--darker-color);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 2rem;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 500px;
    left: 50%;
    transform: translateX(-50%);
    backdrop-filter: blur(var(--blur-intensity));
    background-color: rgba(30, 39, 46, 0.8);
}

.music-player.active {
    bottom: 2rem;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.now-playing {
    font-size: 1rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.close-player {
    background: none;
    border: none;
    color: var(--light-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.close-player:hover {
    transform: rotate(90deg);
}

.album-art {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    position: relative;
}

.art-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: rotateAlbumArt 20s linear infinite;
    animation-play-state: paused;
}

.music-player.active .art-wrapper {
    animation-play-state: running;
}

@keyframes rotateAlbumArt {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vinyl {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 60%, rgba(0, 0, 0, 0.8) 60.1%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.vinyl::before {
    content: '';
    width: 30px;
    height: 30px;
    background-color: var(--light-color);
    border-radius: 50%;
    z-index: 2;
}

.song-info {
    text-align: center;
    margin-bottom: 2rem;
}

.song-info h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-info p {
    color: var(--gray-color);
    font-size: 1rem;
}

.progress-container {
    width: 100%;
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: var(--gray-color);
    border-radius: 3px;
    margin-bottom: 0.5rem;
    overflow: hidden;
    cursor: pointer;
}

.progress-bar::before {
    content: '';
    display: block;
    width: 0%;
    height: 100%;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    /* background: white; */
    border-radius: 3px;
    transition: width 0.1s linear;
}

.time-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--gray-color);
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.control-btn {
    background: none;
    border: none;
    color: var(--light-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.control-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.play-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    width: 60px;
    height: 60px;
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.6);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.volume-control i {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.volume-control input[type="range"] {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    background-color: var(--gray-color);
    border-radius: 2px;
    outline: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    background-color: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
}

.blur-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-color);
    backdrop-filter: blur(var(--blur-intensity));
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.blur-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Responsive Design */
@media (max-width: 768px) {
    .music-list {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .music-player {
        max-width: 100%;
        border-radius: 0;
        bottom: -100%;
    }
    
    .music-player.active {
        bottom: 0;
    }
}

@media (max-width: 480px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-container {
        width: 100%;
    }
    
    .search-container input {
        width: 100%;
    }
    
    .music-list {
        grid-template-columns: 1fr;
    }
    
    .art-wrapper {
        width: 150px;
        height: 150px;
    }
}