* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#slideshow {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}

#media-container {
    position: absolute;
    width: 100%;
    height: 100%;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

/* UPDATED: Media now uses 'contain' to show full content without cropping or stretching */
#media-container img,
#media-container video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity var(--transition-duration) ease-in-out;
}

/* Rest of your CSS remains the same */
#progress-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255,255,255,0.2);
    z-index: 30;
}

#progress-bar {
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    width: 0%;
    transition: width 0ms linear;
}

#caption-container {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
    max-width: 85%;
    text-align: center;
    opacity: 0.7;
}

#caption {
    background: rgba(0, 0, 0, 0.65);
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 1.15rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.4s ease;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    font-size: 2.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 30;
    opacity: 0.75;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.1);
}

#prev-btn { left: 30px; }
#next-btn { right: 30px; }

#bottom-controls {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 30;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 8px;
    border-radius: 50px;
}

.control-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 5px 10px;
    opacity: 0.85;
}

.control-btn:hover {
    opacity: 1;
}

#dots {
    display: none;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: white;
    transform: scale(1.3);
}

.hidden {
    opacity: 0 !important;
    pointer-events: none;
}