* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 20px;
}

.reel-container {
    width: 375px;
    height: 667px;
    border: 10px solid #000;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background: #000;
}

#slideshow {
    width: 100%;
    height: 100%;
    position: relative;
}

#slideshow figure {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
}

/* Background images with blur and overlay */
.slide-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(10px);
}

.slide-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

/* Foreground images with varied Ken Burns effects */
#slideshow figure img {
    position: absolute;
    width: 100%;
    height: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: contain;
}

/* Image 1: Zoom in */
#slideshow figure:nth-child(1) {
    animation: fade 18s infinite;
    animation-delay: 0s;
}

#slideshow figure:nth-child(1) img {
    animation: kenburns-zoom 18s infinite;
    animation-delay: 0s;
}

/* Image 2: Pan right */
#slideshow figure:nth-child(2) {
    animation: fade 18s infinite;
    animation-delay: 3s;
}

#slideshow figure:nth-child(2) img {
    animation: kenburns-pan-right 18s infinite;
    animation-delay: 3s;
}

/* Image 3: Zoom in */
#slideshow figure:nth-child(3) {
    animation: fade 18s infinite;
    animation-delay: 6s;
}

#slideshow figure:nth-child(3) img {
    animation: kenburns-zoom 18s infinite;
    animation-delay: 6s;
}

/* Image 4: Pan left */
#slideshow figure:nth-child(4) {
    animation: fade 18s infinite;
    animation-delay: 9s;
}

#slideshow figure:nth-child(4) img {
    animation: kenburns-pan-left 18s infinite;
    animation-delay: 9s;
}

/* Image 5: Zoom in */
#slideshow figure:nth-child(5) {
    animation: fade 18s infinite;
    animation-delay: 12s;
}

#slideshow figure:nth-child(5) img {
    animation: kenburns-zoom 18s infinite;
    animation-delay: 12s;
}

/* Image 6: Pan right */
#slideshow figure:nth-child(6) {
    animation: fade 18s infinite;
    animation-delay: 15s;
}

#slideshow figure:nth-child(6) img {
    animation: kenburns-pan-right 18s infinite;
    animation-delay: 15s;
}

/* Fade animation for figures */
@keyframes fade {
    0% { opacity: 0; }
    5% { opacity: 1; }
    16.67% { opacity: 1; }
    21.67% { opacity: 0; }
    100% { opacity: 0; }
}

/* Ken Burns: Zoom in */
@keyframes kenburns-zoom {
    0% { transform: translate(-50%, -50%) scale(1); }
    16.67% { transform: translate(-50%, -50%) scale(1.15); }
    100% { transform: translate(-50%, -50%) scale(1.15); }
}

/* Ken Burns: Pan right (zoom + move) */
@keyframes kenburns-pan-right {
    0% { transform: translate(-50%, -50%) scale(1); }
    16.67% { transform: translate(-45%, -50%) scale(1.15); }
    100% { transform: translate(-45%, -50%) scale(1.15); }
}

/* Ken Burns: Pan left (zoom + move) */
@keyframes kenburns-pan-left {
    0% { transform: translate(-50%, -50%) scale(1); }
    16.67% { transform: translate(-55%, -50%) scale(1.15); }
    100% { transform: translate(-55%, -50%) scale(1.15); }
}

/* Text overlay */
.info {
    position: absolute;
    top: 40px;
    left: 20px;
    right: 20px;
    color: white;
    z-index: 10;
    text-align: center;
}

.info h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.info p {
    font-size: 15px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

/* Play/Pause button */
.play-pause {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s;
}

.reel-container:hover .play-pause {
    opacity: 1;
}

.paused .play-pause {
    opacity: 1;
}

/* Paused state */
.paused #slideshow figure,
.paused #slideshow figure img {
    animation-play-state: paused;
}

.sound-toggle {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
}