html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    font-family: -apple-system, Helvetica Neue, Helvetica, Arial, sans-serif;
    /* Prevent text selection and zoom on double tap */
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    cursor: pointer;
}

#slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Use contain so the full image is visible, or cover. Contains preserves aspect without cropping. */
    background-size: contain; 
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    
    /* Hardware accelerated transition */
    transition: opacity 2s ease-in-out;
    -webkit-transition: opacity 2s ease-in-out;
}

.slide.active {
    opacity: 1;
}

#overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 30px;
    box-sizing: border-box;
    z-index: 10;
    
    /* Default hidden, with slide/fade animation for showing */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    -webkit-transition: opacity 0.3s ease;
}

#overlay.visible {
    opacity: 1;
}

#caption {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 300;
}

#credit {
    margin: 0;
    font-size: 16px;
    opacity: 0.8;
}
