body {
    font-family: 'Roboto', Arial, sans-serif;
    background-size: cover;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
header {
    background: rgba(0,0,0,0.5);
    color: #fff;
    text-align: center;
    padding: 2rem 0 1rem 0;
}
main {
    flex: 1 0 auto;
    background: rgba(255,255,255,0.92);
    margin: 2vw 10vw;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(0,120,215,0.10);
    padding: 2rem 2vw;
}

.nav-btns {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.back-btn, .forward-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    color: #fff;
    border: none;
    padding: 0.6rem 1.5rem 0.6rem 1.2rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 12px rgba(0,120,215,0.13);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    font-size: 1.08rem;
    position: relative;
    cursor: pointer;
    outline: none;
    border: 2px solid transparent;
}
.back-btn {
    background: linear-gradient(90deg, #0078d7 60%, #00cfff 100%);
}
.forward-btn {
    background: linear-gradient(90deg, #00b86b 60%, #b6ffb6 100%);
}
.back-btn:hover {
    background: linear-gradient(90deg, #005fa3 60%, #00a6c9 100%);
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 4px 18px rgba(0,120,215,0.18);
    border-color: #00cfff;
}
.forward-btn:hover {
    background: linear-gradient(90deg, #009e5c 60%, #d6ffd6 100%);
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 4px 18px rgba(0,120,215,0.18);
    border-color: #b6ffb6;
}
.back-btn:active, .forward-btn:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0,120,215,0.10);
}
.back-btn .icon, .forward-btn .icon {
    display: inline-block;
    font-size: 1.2em;
    vertical-align: middle;
    opacity: 0.85;
}
.back-btn .icon {
    margin-right: 0.5em;
    margin-left: 0;
}
.forward-btn .icon {
    margin-left: 0.5em;
    margin-right: 0;
}
h2 {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 2.2rem;
    margin-top: 0;
}
.ny-img {
    width: 100%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    margin-bottom: 2rem;
}
.gallery-img {
    width: 180px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    transition: transform 0.2s;
}
.gallery-img:hover {
    transform: scale(1.04);
}
.gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}
figure.gallery-figure {
    max-width: 180px;
    text-align: center;
}
.desc .diary-entry{
    font-size: 1.15rem;
    line-height: 1.7;
    width: 100vw;
    height: auto;
    margin-left: auto;
    margin-right: auto;
}

/* Popup modal styles for gallery images */
.img-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}
.img-modal.active {
    display: flex;
}
.img-modal-content {
    position: relative;
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 0 20px #0008;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.img-modal-content img {
    width: auto;
    height: auto;
    max-width: 200vw;
    max-height: 180vh;
    margin-bottom: 1rem;
    display: block;
    object-fit: contain;
}
.img-modal-content button {
    padding: 0.5rem 1.5rem;
    font-size: 1.1rem;
    background: #0078d7;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 2x zoom support */
.img-modal .img-modal-content {
    cursor: zoom-in;
}
.img-modal.zoom-2x .img-modal-content {
    overflow: auto;          /* allow panning when zoomed */
    cursor: zoom-out;
}
.img-modal.zoom-2x .img-modal-content img {
    transform: scale(2);     /* 2x size */
    transform-origin: center center;
    max-width: none;         /* let transform control size */
    max-height: none;
    will-change: transform;
}
