body {
    font-family: 'Gowun Batang', serif;
    background-color: #fff8e1;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

nav {
    position: fixed;
    top: 20px;
    left: 20px;
    font-size: 16px;
    z-index: 1000;
}

nav a {
    text-decoration: none;
    color: #333;
    margin-right: 5px;
}

nav a.active {
    font-weight: bold;
}

h1 {
    margin-top: 50px;
    margin-bottom: 20px;
}

/* Styles for main page */
#image-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-height: 80vh;
    overflow-y: auto;
    padding-top: 20px;
}

.image-container {
    margin: 10px;
    width: 768px;
    height: 768px;
}

.image-container img {
    width: 100%;
    height: auto;
    transform: rotate(90deg);
    object-fit: cover;
}

.image-info {
    margin-bottom: 145px;
    text-align: left;
    font-size: 14px;
    color: #333;
}

.spinner {
    display: none;
    margin-top: 20px;
}


/* Styles for about page */
.about-content {
    max-width: 800px;
    margin: 70px auto 0;
    padding: 20px;
    line-height: 1.6;
    font-size: 18px;
}

.about-content p {
    margin-bottom: 20px;
}

/* Styles for the timelapse page */
#timelapse-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 600px;
    margin: 120px 0;
}

#timelapse-image {
    max-width: 100%;
    max-height: 75%;
    object-fit: cover;
    transform: rotate(90deg);
    clip-path: inset(0px 150px 0px 0px);
}

#controls-container {
    display: flex;
    justify-content: space-between; /* Space between controls and play/pause */
    align-items: center;
    margin-top: -150px;
    width: 28%;
}

#controls {
    display: flex;
    align-items: center;
}

#playPauseControl {
    display: flex;
    justify-content: flex-end;
}

.link-text {
    cursor: pointer;
    color: #126a14;
    text-decoration: underline;
    font-size: 16px;
}

#speed-slider {
    width: 200px;
    margin-left: 10px;
}

/* Adjustments for smaller screens */
@media (max-width: 800px) {
    .image-container {
        width: 90vw;
        height: 90vw;
    }

    .about-content {
        padding: 10px;
        font-size: 16px;
    }
    .image-info {
        display: none;
    }
    /* Adjust container margins and height on smaller screens */
    #timelapse-container {
        height: 400px;
        margin: 60px 0;
    }

    /* Resize the image and adjust cropping for mobile */
    #timelapse-image {
        transform: rotate(90deg); /* No rotation for better fit on smaller screens */
        clip-path: inset(0px 75px 0px 0px);
        max-height: 100%;
        width: auto;
    }

    /* Adjust controls width for mobile */
    #controls-container {
        width: 90%; /* Make controls take up most of the screen width */
        margin-top: 20px; /* Reduce the negative margin */
        flex-direction: column; /* Stack controls vertically on small screens */
        align-items: center; /* Center them */
    }

    /* Play/Pause controls aligned below speed slider on mobile */
    #playPauseControl {
        margin-top: 10px;
        justify-content: center;
    }

    /* Adjust text size for mobile */
    .link-text {
        font-size: 14px;
    }

    #speed-slider {
        width: 150px;
    }
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    nav {
        position: static;
        margin-bottom: 20px;
    }

    h1 {
        margin-top: 20px;
    }

    .highlights-gallery {
        margin-top: 20px;
    }

    .about-content {
        margin-top: 20px;
    }
}

@media (min-width: 1537px) {
    #image-gallery {
        max-width: 1536px;
        margin: 0 auto;
    }

    .image-container {
        width: 768px;
    }
}

