/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff9d00;
    --primary-hover: #ffb340;
    --text-color: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --bg-dark: #0f0f1e;
    --bg-card: rgba(30, 30, 60, 0.5);
    --bg-card-hover: rgba(40, 40, 80, 0.6);
    --bg-active: rgba(255, 157, 0, 0.2);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.36);
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-color);
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
    background-image: url('https://i.imgur.com/UkN9X9V.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom right, rgba(10, 10, 30, 0.9), rgba(10, 10, 30, 0.7));
    backdrop-filter: blur(5px);
    z-index: -1;
}

.container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 15px;
    position: relative;
    z-index: 1;
}

/* Header styles */
header {
    text-align: center;
    padding: 15px 0;
    margin-bottom: 15px;
}

header h1 {
    font-size: 2.2rem;
    color: var(--primary-color);
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 5px;
}

header p {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Main content styles */
main {
    flex: 1;
    display: flex;
    overflow: hidden;
    gap: 20px;
}

.music-player {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 20px;
}

/* Glassmorphic card styles */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

/* Player container styles */
.player-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    position: relative;
}

.album-art {
    width: 220px;
    height: 220px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 25px;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease;
}

.album-art:hover {
    transform: scale(1.02);
}

.album-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.album-art:hover img {
    transform: scale(1.05);
}

.song-info {
    text-align: center;
    margin-bottom: 25px;
    width: 100%;
}

.song-info h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-info p {
    font-size: 1rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 300;
}

/* Progress bar styles */
.progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress {
    width: 0;
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: width 0.1s linear;
    position: relative;
}

.progress::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-color: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 157, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.progress-bar:hover .progress::after {
    opacity: 1;
}

#current-time, #duration {
    font-size: 0.9rem;
    color: var(--text-secondary);
    width: 45px;
    text-align: center;
    font-weight: 300;
}

/* Controls styles */
.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    margin-bottom: 25px;
}

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

.control-btn:hover {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.05);
}

.play-btn {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--bg-dark);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(255, 157, 0, 0.3);
}

.play-btn:hover {
    background-color: var(--primary-hover);
    color: var(--bg-dark);
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255, 157, 0, 0.5);
}

/* Volume control styles */
.volume-container {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 220px;
}

.volume-slider {
    flex: 1;
}

.volume-bar {
    height: 7px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

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

.volume-level::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 157, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.volume-bar:hover .volume-level::after {
    opacity: 1;
}

/* Song library styles */
.song-library {
    width: 320px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.song-library h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 600;
    padding-left: 10px;
}

.library-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

.game-section {
    margin-bottom: 20px;
}

.game-section h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-secondary);
    padding: 8px 10px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    font-weight: 500;
}

.song-list {
    list-style: none;
}

.song-item {
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 5px;
    border-left: 3px solid transparent;
}

.song-item:hover {
    background-color: var(--bg-card-hover);
    border-left-color: var(--primary-color);
}

.song-item.active {
    background-color: var(--bg-active);
    border-left-color: var(--primary-color);
}

.song-item-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.song-item-title {
    font-size: 0.95rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400;
}

/* Custom scrollbar */
.library-container::-webkit-scrollbar {
    width: 5px;
}

.library-container::-webkit-scrollbar-track {
    background: transparent;
}

.library-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.library-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Responsive styles */
@media (max-width: 992px) {
    .music-player {
        flex-direction: column;
    }
    
    .song-library {
        width: 100%;
        max-height: 300px;
    }
    
    .album-art {
        width: 180px;
        height: 180px;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .controls {
        gap: 15px;
    }
    
    .play-btn {
        width: 50px;
        height: 50px;
    }
    
    .song-library {
        max-height: 250px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 10px 0;
        margin-bottom: 10px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    main {
        gap: 15px;
    }
    
    .player-container {
        padding: 15px;
    }
    
    .album-art {
        width: 150px;
        height: 150px;
        margin-bottom: 15px;
    }
    
    .song-info h2 {
        font-size: 1.3rem;
    }
    
    .progress-container, .controls, .volume-container {
        margin-bottom: 15px;
    }
    
    .song-library {
        padding: 15px;
        max-height: 255px;
    }
    
    .song-library h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .game-section h4 {
        font-size: 1rem;
    }
    
    .song-item {
        padding: 8px 12px;
    }
    
    .song-item-title {
        font-size: 0.9rem;
    }
}
