body {
    /* ... existing styles ... */
    transition: filter 5s ease-in-out; /* Smoothly transition the brightness */
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #000;
    overflow: hidden;
}

#slideshow-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

.slide {
    position: absolute; /* Ensures they stack on top of each other */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* Start invisible */
    transition: opacity 3s ease-in-out; /* Slightly longer fade for 'fancy' feel */
    z-index: 1;
}

    .slide.active {
        opacity: 1; /* Fade in */
        z-index: 2; /* Ensure the fading-in slide is on top */
    }

.bg-blur {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-size: cover;
    background-position: center;
    filter: blur(25px);
    z-index: 1;
}

    .bg-blur::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
    }

.fg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 2;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
}

#clock {
    position: absolute;
    bottom: 40px;
    right: 50px;
    color: white;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 80px;
    font-weight: 300; /* Light weight for a modern look */
    z-index: 100; /* Keep it above all slides */
    text-shadow: 2px 2px 15px rgba(0, 0, 0, 0.6);
    letter-spacing: -2px;
}

#status-indicator {
    position: absolute;
    bottom: 40px;
    left: 50px;
    display: none; /* Hidden by default */
    align-items: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Segoe UI', sans-serif;
    font-size: 18px;
    z-index: 101;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
}

/* A simple CSS spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Centered Start Button Overlay */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200; /* Above everything else */
    transition: opacity 0.5s ease;
}

#start-button {
    padding: 20px 40px;
    font-size: 24px;
    font-family: 'Segoe UI', sans-serif;
    background: transparent;
    color: white;
    border: 2px solid white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    #start-button:hover {
        background: white;
        color: black;
    }

#exit-button {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 5px;
    font-family: 'Segoe UI', sans-serif;
    cursor: pointer;
    z-index: 210; /* Above everything */
    display: none; /* Only shown when in fullscreen AND tapped */
    backdrop-filter: blur(5px);
}

    #exit-button:hover {
        background: rgba(255, 0, 0, 0.6); /* Red tint on hover/tap */
    }

.nav-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    font-size: 50px;
    cursor: pointer;
    z-index: 210;
    display: none; /* Hidden by default */
    backdrop-filter: blur(5px);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    transition: background 0.3s;
}

    .nav-arrow:hover {
        background: rgba(0, 0, 0, 0.6);
    }

#prev-arr {
    left: 30px;
}

#next-arr {
    right: 30px;
}

.slide.instant {
    transition: none !important;
}