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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    min-height: 100vh;
    padding: 20px;
}

.player-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--player-background, rgba(30, 30, 30, 0.95));
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}


.header {
    display: flex;
    flex-direction: column;
    padding: 30px;
    align-items: center;
    background: var(--player-header-background, linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%));
    text-align: center;
    position: relative;
}

.album-art {
    width: 250px;
    height: 250px;
    border-radius: 15px;
    margin: 0 auto 20px;
    position: relative;
    overflow: hidden; /* This is key */
    background-color: #111; /* Fallback color */
}

.album-info {
    text-align: center;
}

.player-controls {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.now-playing {
    text-align: center;
    margin-bottom: 15px;
}

.player-controls-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.cart-link {
    margin-top: 20px;
}

.album-art-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(20px);
    transform: scale(1.15); /* Scale up to hide blurred edges */
}

.album-art-fg {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.album-info h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    background: var(--player-accent-color, linear-gradient(135deg, #ff6b6b, #ee5a24));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.album-info .subtitle {
    color: #999;
    font-size: 1.1em;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--player-text-color, white);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--player-accent-color, rgba(255, 107, 107, 0.3));
    transform: translateY(-2px);
}

.description {
    color: var(--player-text-color, #ccc);
    line-height: 1.6;
    font-size: 0.95em;
}

.tracklist {
    padding: 0 30px 20px;
}

.track {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin: 10px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.track:hover {
    background: var(--player-accent-color, rgba(255, 107, 107, 0.1));
    transform: translateX(5px);
}

.track.active {
    background: linear-gradient(135deg, var(--player-accent-color, rgba(255, 107, 107, 0.2)), rgba(238, 90, 36, 0.2));
    border-left: 4px solid var(--player-accent-color, #ff6b6b);
}

.track.playing {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { background: var(--player-accent-color, rgba(255, 107, 107, 0.2)); }
    50% { background: var(--player-accent-color, rgba(255, 107, 107, 0.3)); }
    100% { background: var(--player-accent-color, rgba(255, 107, 107, 0.2)); }
}

.play-btn {
    width: 2.5em;
    height: 2.5em;
    flex-shrink: 0;
    background: var(--player-accent-color, linear-gradient(135deg, #ff6b6b, #ee5a24));
    border: none;
    border-radius: 50%;
    color: var(--player-text-color, white);
    cursor: pointer;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    transition: all 0.3s ease;
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px var(--player-accent-color, rgba(255, 107, 107, 0.4));
}

.track-name {
    flex-grow: 1;
    min-width: 0;
    font-weight: 500;
    font-size: 1em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 15px;
}

.track-duration {
    color: #888;
    font-size: 0.9em;
}

.track-price {
    font-weight: bold;
    text-align: right;
}

.track-purchase {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-left: 15px;
}

.track .btn {
    padding: 0.2rem 0.5rem; /* Smaller padding */
    font-size: 0.8em; /* Smaller font size */
}

.now-playing h3 {
    color: var(--player-accent-color, #ff6b6b);
    font-size: 1.1em;
    margin-bottom: 5px;
    white-space: normal;
    word-wrap: break-word;
}

.now-playing p {
    color: #999;
    font-size: 0.9em;
}

.control-btn {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--player-text-color, white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: var(--player-accent-color, rgba(255, 107, 107, 0.3));
    transform: scale(1.1);
}

.control-btn.main {
    width: 55px;
    height: 55px;
    background: var(--player-accent-color, linear-gradient(135deg, #ff6b6b, #ee5a24));
    font-size: 22px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time {
    color: #999;
    font-size: 0.8em;
    min-width: 40px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

.progress {
    height: 100%;
    background: var(--player-accent-color, linear-gradient(90deg, #ff6b6b, #ee5a24));
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s ease;
}

.prompt-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.prompt-modal-content {
    background: #2d2d2d;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.prompt-modal-content h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: var(--player-accent-color, #ff6b6b);
}

.prompt-modal-content p {
    margin-bottom: 20px;
}

.prompt-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}


/* Mobile-first responsive design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
    }

    .album-art {
        margin: 0 auto 20px;
    }

    .track {
        align-items: center;
    }

    .track-name {
        white-space: normal;
        flex-grow: 1;
    }

    .track-purchase {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .player-container {
        margin: 0;
        border-radius: 15px;
    }

    .header {
        padding: 20px;
    }

    .album-art {
        width: 120px;
        height: 120px;
        font-size: 20px;
    }

    .album-info h1 {
        font-size: 1.8em;
        line-height: 1.2;
    }

    .album-info .subtitle {
        font-size: 1em;
    }

    .description {
        font-size: 0.85em;
        line-height: 1.5;
    }

    .social-links {
        justify-content: center;
    }

    .social-links a {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .tracklist {
        padding: 0 15px 15px;
    }

    .track {
        padding: 12px 15px;
        margin: 6px 0;
        font-size: 0.9em; /* Scale down track content and buttons */
    }

    .track:hover {
        transform: none;
    }

    .track:active {
        transform: scale(0.98);
    }

    .play-btn {
        width: 35px;
        height: 35px;
        margin-right: 12px;
        font-size: 14px;
    }

    .track-name {
        font-size: 0.9em;
    }

    .track-duration {
        font-size: 0.8em;
    }

    .player-controls {
        padding: 15px;
    }

    .now-playing h3 {
        font-size: 1em;
        margin-bottom: 8px;
    }

    .now-playing p {
        font-size: 0.9em;
    }

    .controls {
        gap: 10px;
        margin-bottom: 10px;
    }

    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .control-btn.main {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .progress-container {
        gap: 8px;
    }

    .time {
        font-size: 0.75em;
        min-width: 35px;
    }

    .progress-bar {
        height: 6px;
    }
}

/* Landscape orientation for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .header {
        flex-direction: row;
        text-align: left;
    }

    .album-art {
        width: 100px;
        height: 100px;
        margin: 0 20px 0 0;
        font-size: 18px;
    }

    .album-info h1 {
        font-size: 1.6em;
    }

    .description {
        display: none;
    }
}

/* High-DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .album-art, .play-btn, .control-btn {
        image-rendering: -webkit-optimize-contrast;
    }
}