* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #fafafa;
    color: #333;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
    height: 100vh;
    height: 100dvh;
}

.container {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    display: flex;
    flex-direction: row;
}

/* Slides */
.slide {
    min-width: 100vw;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
}

/* Intro slide */
.intro-slide {
    background-color: #fafafa;
}

.intro-content {
    text-align: center;
}

.intro-content h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 24px;
    line-height: 1.3;
}

.subtitle {
    font-size: 2.2rem;
    color: #333;
    font-weight: 600;
    line-height: 1.4;
}

.scroll-hint {
    margin-top: 48px;
    animation: bounce-horizontal 2s infinite;
}

.scroll-hint span {
    font-size: 3rem;
    color: #999;
}

@keyframes bounce-horizontal {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(0);
    }
    40% {
        transform: translateX(10px);
    }
    60% {
        transform: translateX(5px);
    }
}

/* Slide label */
.slide-label {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    margin-bottom: 16px;
    font-weight: 500;
}

/* Image container */
.image-container {
    position: relative;
    width: 92%;
    max-width: 420px;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.image-container:active {
    transform: scale(0.98);
}

.image-container img {
    width: 100%;
    height: auto;
    display: block;
}

/* Audio button */
.audio-button {
    margin-top: 16px;
    padding: 12px 24px;
    background: transparent;
    border: 1.5px solid #ccc;
    border-radius: 30px;
    font-size: 1rem;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.audio-button:hover,
.audio-button:focus,
.audio-button:focus-visible {
    outline: none;
    border-color: #ccc;
    color: #555;
}

.audio-button:active {
    transform: scale(0.97);
}

.audio-button.playing {
    border-color: #333;
    color: #333;
    background: rgba(0, 0, 0, 0.05);
}

.audio-button.playing .btn-text {
    animation: pulse 0.8s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Caption */
.caption {
    margin-top: 20px;
    font-size: 1.1rem;
    color: #555;
    text-align: center;
    max-width: 380px;
    line-height: 1.5;
    padding: 0 10px;
}

/* Bonus slide */
.bonus-slide .slide-label {
    color: #e67e22;
}

/* Outro slide */
.outro-slide {
    background-color: #fafafa;
}

.outro-content {
    text-align: center;
}

.outro-text {
    font-size: 2.8rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

/* Progress dots */
.progress-dots {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    padding: 8px 12px;
    border-radius: 20px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: #333;
    transform: scale(1.2);
}

.dot:hover {
    background-color: #999;
}

/* Hide scrollbar but allow scrolling */
.container::-webkit-scrollbar {
    display: none;
}

.container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Prevent vertical scroll on body */
html, body {
    overscroll-behavior: none;
}

/* Responsive adjustments */
@media screen and (max-height: 700px) {
    .subtitle {
        font-size: 1.8rem;
    }
    
    .scroll-hint {
        margin-top: 32px;
    }
    
    .image-container {
        max-width: 340px;
    }
    
    .caption {
        font-size: 0.95rem;
        margin-top: 14px;
    }
    
    .slide-label {
        margin-bottom: 12px;
    }
    
    .outro-text {
        font-size: 2rem;
    }
}

@media screen and (min-height: 800px) {
    .image-container {
        max-width: 450px;
    }
    
    .caption {
        font-size: 1.15rem;
        max-width: 400px;
    }
}

/* Safe area for notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .progress-dots {
        bottom: calc(20px + env(safe-area-inset-bottom));
    }
    
    .slide {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
}
