body {
    margin: 0;
    font-family: Roboto, Arial, sans-serif;
    background: #ffffff;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    overflow: hidden;
}

/* Control Panel */
.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    z-index: 1;
}

button, select {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    color: #333;
    font-size: 16px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

button:hover, select:hover {
    background: #e8e8e8;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

button:active {
    background: #dedede;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* Button States */
button[data-state="on"] {
    background: #007AFF;
    color: white;
    border: none;
}

button[data-state="on"]:hover {
    background: #0066d6;
}

/* Slideshow Container */
#fullscreen-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 80px);
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;  /* Default white background */
}

/* Add black background only when in fullscreen */
#fullscreen-container:fullscreen {
    background: #000000;
}

.slideshow {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 1s ease-in-out;
    background: #ffffff;  /* Ensure slideshow area is white by default */
}

/* Make slideshow background black only in fullscreen */
#fullscreen-container:fullscreen .slideshow {
    background: #000000;
}

.slideshow img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 12px;
}

/* Arrows */
.arrow {
    position: absolute;
    top: 50%;
    font-size: 36px;
    color: #000;  /* Dark color for normal view */
    background: rgba(255, 255, 255, 0.8);
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
    opacity: 0;
    border-radius: 50%;
}

/* Adjust arrow colors for fullscreen */
#fullscreen-container:fullscreen .arrow {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

#arrow-left {
    left: 10px;
}

#arrow-right {
    right: 10px;
}

#arrow-left:hover,
#arrow-right:hover {
    opacity: 1;
}

/* Progress Bar */
#progress-bar-container {
    position: absolute;
    bottom: 20px;
    width: 90%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    display: none;
}

/* Adjust progress bar for fullscreen */
#fullscreen-container:fullscreen #progress-bar-container {
    background: rgba(255, 255, 255, 0.2);
}

#progress-bar {
    height: 100%;
    width: 0;
    background: #007AFF;
    border-radius: 2px;
}

/* Media Queries */
@media (max-width: 768px) {
    .controls {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        padding: 15px;
        border-radius: 20px 20px 0 0;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        flex-wrap: wrap;
        justify-content: center;
        z-index: 1000;
        margin-bottom: 0;
    }

    button, select {
        padding: 8px 16px;
        font-size: 14px;
        min-width: 70px;
    }

    #fullscreen-container {
        height: calc(100vh - 140px);
        margin-bottom: 70px;
    }

    .slideshow img {
        border-radius: 8px;
        max-width: 95%;
    }

    .arrow {
        font-size: 24px;
        padding: 12px;
    }

    #arrow-left {
        left: 5px;
    }

    #arrow-right {
        right: 5px;
    }

    #progress-bar-container {
        bottom: 80px;
        width: 85%;
    }
}

/* Additional for very small screens */
@media (max-width: 480px) {
    .controls {
        gap: 6px;
        padding: 10px;
    }

    button, select {
        padding: 6px 12px;
        font-size: 12px;
        min-width: 60px;
    }

    #fullscreen-container {
        height: calc(100vh - 160px);
    }
}
