:root {
    --bg-color: #0f0c29;
    --primary-color: #302b63;
    --secondary-color: #24243e;
    --accent-color: #f50057;
    --text-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background: linear-gradient(135deg, var(--bg-color), var(--primary-color), var(--secondary-color));
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    overflow: hidden;
    position: relative;
}

/* Background Art */
.background-art {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    /* Behind blobs */
    filter: blur(30px) brightness(0.6);
    /* Blurry and slightly dark */
    opacity: 0;
    /* Hidden by default until loaded */
    transition: opacity 1s ease;
}

.background-art.active {
    opacity: 1;
}

/* Background Animations */
.background-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Behind content, in front of bg art */
    overflow: hidden;
    mix-blend-mode: overlay;
    /* Blend with the background art */
}

/* ... (rest of CSS) ... */

.track-info h1 {
    font-size: 1.8rem;
    /* Reduced further */
    margin-bottom: 0.5rem;
    white-space: normal;
    /* Allow wrapping */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 10s infinite ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: #ff00cc;
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: #3333ff;
    bottom: -50px;
    right: -50px;
    animation-delay: 2s;
}

.blob-3 {
    width: 200px;
    height: 200px;
    background: #00ffcc;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 4s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -30px);
    }
}

/* Glass Container */
.glass-container {
    position: relative;
    z-index: 1;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    width: 90%;
    max-width: 450px;
    /* Default mobile width */
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.5s ease;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

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

.live-indicator {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

.dot {
    width: 8px;
    height: 8px;
    background-color: #ff4d4d;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

/* Player */
.player-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.5s ease;
}

.album-art {
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.5s ease;
}

.album-art i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.5);
}

.wave-animation {
    position: absolute;
    bottom: 20px;
    display: flex;
    gap: 4px;
    height: 20px;
    align-items: flex-end;
    opacity: 0;
    /* Hidden by default, shown when playing */
    transition: opacity 0.3s ease;
}

.playing .wave-animation {
    opacity: 1;
}

.wave-animation span {
    width: 4px;
    background: var(--accent-color);
    border-radius: 4px;
    animation: wave 1s infinite ease-in-out;
}

.wave-animation span:nth-child(1) {
    animation-delay: 0.1s;
    height: 10px;
}

.wave-animation span:nth-child(2) {
    animation-delay: 0.2s;
    height: 15px;
}

.wave-animation span:nth-child(3) {
    animation-delay: 0.3s;
    height: 20px;
}

.wave-animation span:nth-child(4) {
    animation-delay: 0.2s;
    height: 15px;
}

.wave-animation span:nth-child(5) {
    animation-delay: 0.1s;
    height: 10px;
}

@keyframes wave {

    0%,
    100% {
        transform: scaleY(1);
    }

    50% {
        transform: scaleY(1.5);
    }
}

.track-info {
    width: 100%;
    transition: all 0.5s ease;
}

.track-info h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.track-info p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* Controls */
.controls {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.control-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    transition: transform 0.2s ease;
}

.main-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--accent-color);
    font-size: 1.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(245, 0, 87, 0.4);
}

.main-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(245, 0, 87, 0.6);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 80%;
}

.volume-control i {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    outline: none;
}

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

/* Footer */
footer {
    margin-top: 2rem;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
}

/* Responsive / Desktop Design */
@media (min-width: 1024px) {
    .glass-container {
        max-width: 900px;
        padding: 4rem;
    }

    .player-wrapper {
        display: grid;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        column-gap: 4rem;
        row-gap: 1rem;
        align-items: center;
        margin: 2rem 0;
    }

    .album-art {
        grid-column: 1;
        grid-row: 1 / span 2;
        width: 350px;
        height: 350px;
        margin-bottom: 0;
    }

    .track-info {
        grid-column: 2;
        grid-row: 1;
        text-align: center;
        /* Center text in right column */
        align-self: end;
        /* Push to bottom of its row */
        margin-bottom: 1rem;
    }

    .track-info h1 {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }

    .track-info p {
        font-size: 1.2rem;
        margin-bottom: 0;
    }

    .controls {
        grid-column: 2;
        grid-row: 2;
        align-self: start;
        /* Push to top of its row */
        width: 100%;
        flex-direction: row;
        justify-content: center;
        /* Center controls */
        gap: 2rem;
    }

    .volume-control {
        width: 180px;
    }
}

@media (max-width: 480px) {
    .glass-container {
        width: 95%;
        padding: 2rem;
        /* Make glass clearer so background art shows through */
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .blob-1 {
        width: 300px;
        height: 300px;
    }

    .blob-2 {
        width: 200px;
        height: 200px;
    }
}