:root {
    --bg-color: #121212;
    --sidebar-bg: #000000;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent-color: #1db954;
    /* Spotify Green-ish, but let's go more festive gold/red? No, user said Spotify style. Let's stick to elegant green or gold. */
    --accent-color-gold: #d4af37;
    --player-bg: rgba(24, 24, 24, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-family: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100%;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #282828;
}

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

.logo i {
    color: var(--accent-color-gold);
}

.playlist-header h3 {
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
}

.playlist {
    list-style: none;
    overflow-y: auto;
    flex: 1;
}

.playlist::-webkit-scrollbar {
    width: 8px;
}

.playlist::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 4px;
}

.playlist-item {
    padding: 12px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    color: var(--text-secondary);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.playlist-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.playlist-item.active {
    background-color: rgba(212, 175, 55, 0.2);
    /* Gold tint */
    color: var(--accent-color-gold);
}

.playlist-item i {
    font-size: 12px;
    opacity: 0;
    /* Hide play icon by default */
}

.playlist-item:hover i,
.playlist-item.active i {
    opacity: 1;
}

/* Main Content */
.main-content {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(to bottom, #1e1e1e, #121212);
    overflow: hidden;
}

/* Background Overlay for Glassmorphism */
.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(60px) brightness(0.4);
    z-index: 0;
    transition: background-image 0.5s ease;
}

/* Player Container */
.player-container {
    position: relative;
    z-index: 1;
    width: 400px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.album-art-container {
    width: 250px;
    height: 250px;
    margin: 0 auto 24px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

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

/* Rotate animation for playing state if desired, or just scale */
.playing .album-art {
    transform: scale(1.05);
}

.track-info h2 {
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 600;
}

.track-info p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 24px;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 24px;
    cursor: pointer;
}

.progress-bar {
    height: 4px;
    background-color: #555;
    border-radius: 2px;
    position: relative;
    width: 100%;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 0%);
    background-color: var(--accent-color-gold);
    border-radius: 2px;
    transition: width 0.1s linear;
}

.progress-bar:hover::after {
    background-color: #e5c158;
}

.time-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

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

.control-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}

.control-btn:hover {
    color: var(--text-primary);
}

.play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--text-primary);
    color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    transition: transform 0.2s, background-color 0.2s;
}

.play-btn:hover {
    transform: scale(1.05);
    color: #000;
    background-color: var(--accent-color-gold);
}

/* Volume */
.volume-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-secondary);
}

input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    width: 100px;
    height: 4px;
    background: #555;
    border-radius: 2px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: var(--text-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--accent-color-gold);
}

/* Responsive */
@media (max-width: 768px) {
    body {
        height: auto;
        overflow-y: auto;
    }

    .app-container {
        flex-direction: column;
        height: auto;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 400px;
        /* Limit height of playlist on mobile */
        border-right: none;
        border-top: 1px solid #282828;
        order: 2;
        /* Move playlist below player */
        padding: 16px;
    }

    .main-content {
        height: auto;
        min-height: 100vh;
        /* Ensure player takes up full screen initially */
        order: 1;
        /* Player on top */
        padding: 20px 0;
        align-items: flex-start;
        /* Align to top so it doesn't center vertically if content is tall */
        padding-top: 40px;
    }

    .player-container {
        width: 100%;
        max-width: 350px;
        /* Prevent it from being too wide on tablets */
        padding: 20px;
        margin: 0 auto;
        box-shadow: none;
        /* Simplify on mobile */
        background: rgba(255, 255, 255, 0.08);
    }

    .album-art-container {
        width: 200px;
        height: 200px;
        margin-bottom: 20px;
    }

    .track-info h2 {
        font-size: 20px;
    }

    .controls {
        gap: 16px;
    }

    .play-btn {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
}