:root {
    --text-color: #ffffff;
    --text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.7);

    /* Wordt normaal door JS vervangen */
    --bg-image: url('assets/fallback.webp');
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

/* --- Achtergrond & overlay --- */

#background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    z-index: -3;

    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;

    /* Veel lichter */
    filter: blur(25px) brightness(1.15);
    transform: scale(1.1);

    transition: background-image 0.7s ease-in-out;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* Bijna geen donkere laag meer */
    background: radial-gradient(
        circle,
        rgba(0, 0, 0, 0.05) 0%,
        rgba(0, 0, 0, 0.18) 100%
    );

    z-index: -2;
}

#foreground-artwork {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    z-index: -1;

    background-image: var(--bg-image);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;

    transition: background-image 0.7s ease-in-out;
}/* --- Header --- */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem;
    width: 100%;

    position: relative;
    z-index: 1;
}

.song-info-header {
    text-align: left;
}

.song-info-header.updating {
    animation: fadeUp 1s ease-out;
}

#song-title {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(3rem, 6vw, 4rem);
    text-transform: uppercase;
    text-shadow: var(--text-shadow);
}

#song-artist {
    font-size: clamp(2rem, 5vw, 3rem);
    text-shadow: var(--text-shadow);
    opacity: 0.8;
}

.logo-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
}

.logo-container img {
    height: clamp(50px, 20vw, 120px);
    width: auto;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.logo-container img:hover {
    opacity: 1;
}

/* --- Main Content --- */

.content-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: justify;
    padding: 1rem;

    position: relative;
    z-index: 1;
}

.player-controls {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.player-controls.visible {
    opacity: 1;
}

.player-controls button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.player-controls button:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.player-controls svg {
    fill: currentColor;
    width: 50px;
    height: 50px;
}

.song-details-container {
    margin-top: 2rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 10px;
    max-width: 800px;
    width: 100%;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.song-details-container:empty {
    padding: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
}

/* --- Footer niet zichtbaar --- */

.page-footer {
    display: none;
}

/* --- Next Songs Container desktop --- */

#next-songs-container {
    position: fixed;
    top: 70%;
    left: 0;
    transform: translateY(-50%);
    opacity: 0.8;
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    justify-content: center;
    align-items: flex-start;
    padding: 1.2rem;
    background: transparent;
    z-index: 10;
    animation: slideFadeIn 0.8s ease-out;
}

.next-song-item {
    background: rgba(0, 0, 0, 0.4);
    padding: 1.4rem;
    border-radius: 8px;
    text-align: left;
    width: 200px;
    transform: scale(1.15);
    transition: transform 0.8s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.next-song-item:hover {
    transform: scale(1);
}

.next-song-item .time {
    font-size: 0.9rem;
    font-weight: bold;
    opacity: 0.7;
    text-align: left !important;
    width: 100%;
    margin-left: 0 !important;
}

.next-song-item .title {
    font-weight: bold;
    margin-top: 0.5rem;
}

.next-song-item .artist {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* --- Artwork Source --- */

.artwork-source {
    font-size: 0.8rem;
    font-weight: 400;
    color: #ffffff;
    opacity: 0.6;
    text-shadow: 0px 1px 4px rgba(0, 0, 0, 0.7);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Animaties --- */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideFadeIn {
    from {
        opacity: 0;
        transform: translate(-30px, -50%);
    }

    to {
        opacity: 1;
        transform: translate(0, -50%);
    }
}

@keyframes slideUpFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Mobile Optimization --- */

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

    .song-info-header {
        order: 1;
        text-align: left;
    }

    #song-title {
        font-size: 2rem;
    }

    #song-artist {
        font-size: 1.6rem;
    }

    .logo-container {
        order: 2;
        position: fixed;
        bottom: 1rem;
        right: 1rem;
        align-items: flex-end;
        justify-content: flex-end;
        transform: none;
        z-index: 1000;
    }

    .logo-container img {
        height: 60px;
    }

    .content-container {
        padding: 1rem;
        justify-content: flex-start;
        margin-top: 2rem;
    }

    .player-controls {
        transform: scale(0.9);
    }

    .song-details-container {
        margin-top: 1rem;
        padding: 1rem;
    }

    #next-songs-container {
        top: auto;
        bottom: 1rem;
        left: 0;
        transform: none;
        flex-direction: column;
        gap: 1.4rem;
        justify-content: flex-start;
        align-items: flex-start;
        overflow-x: auto;
        padding: 0.5rem 1rem;
        width: 100%;
        animation: slideUpFadeIn 0.6s ease-out;
    }

    .next-song-item {
        width: 120px;
        padding: 0.6rem;
        flex-shrink: 0.7;
        text-align: left;
        font-size: 0.7rem;
        align-items: flex-start;
    }

    .next-song-item .time {
        text-align: left !important;
        width: 100%;
        margin-left: 0 !important;
    }
}