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

html {
    font-size: 14px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale; 
    -webkit-text-size-adjust: none;
    padding: 0;
    margin: 0;
    font-family: "IBM Plex Mono", monospace;
    color: white;
    background-color: #573F3F;
}

a {
    color: white;
}

#container {
    font-size: 0.8rem;
    padding: 10px;
}

header {
    display: flex;
    border-top: 1px solid white;
    border-bottom: 1px solid white;
}

.header-item {
    flex: 1;
    padding: 10px 0;
}

.item-one p {
    text-align: left;
}

.item-two p {
    text-align: center;
}

.item-three p {
    text-align: right;
}

#img-container {
    width: 100%;
    margin: 20px auto 0px auto;
}

.grid-row {
    display: flex;
    gap: 50px;
    justify-content: center;
    margin-bottom: 60px;
    padding: 0 80px;
}

.row-separator {
    height: 1px;
    background: white;
    width: 100%;
    margin: 30px 0; 
}


.thumbnail img {
    width: 170px;
    object-fit: contain;
    display: block;
}

.thumbnail p {
    margin-top: 8px;
    line-height: 1.3;
    text-align: center;
    font-size: 0.7rem;
    max-width: 170px;
}

#footer-container {
    background-color: #573F3F;
    z-index: 100;
    position: fixed;
    bottom: 0;
    width: calc(100% - 20px);
    font-size: 0.8rem;
}

#address-bar {
    width: 100%;
    border-top: 1px solid white;
}

#address-bar p {
    margin: 0 auto;
    text-align: center;
    padding: 10px 0px;
}

#time-bar {
    display: flex;
    width: 100%;
    border-top: 1px solid white;
}

.time {
    flex: 1;
}

.time p {
    padding: 10px 0px;
}

.activity-sl {
    text-align: left;
}

.date {
    text-align: center;
}

.activity-en {
    text-align: right;
}

#footer-toggle {
    text-align: center;
    cursor: pointer;
    font-size: 0.8rem;
    border-top: 1px solid white;
    user-select: none;
    padding: 10px 0;
}

/* Collapsible footer initially hidden */
#footer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

/* Footer when expanded */
#footer.open {
    max-height: 50vh;  /* same as your original height */
    padding-top: 10px; /* optional padding when expanded */
    display: flex;
}

.footer-text-a {
    text-align: left;
    padding-right: 10vw;

}

.footer-text-b {
    text-align: right;
    padding-left: 10vw;
}

.footer-text {
    vertical-align: top;
    flex: 1;
}

.footer-text p {
    margin-bottom: 10px;
    font-size: 0.8rem;
    padding-top: 15px;
}


@media (max-width: 600px) {
    header {
        display: block;
        border-top: none;
    }

    .header-item {
        width: 100%;
        border-top: 1px solid white
    }

    /* .header-item p {
        text-align: center;
    } */

    #footer.open {
        display: block;
        overflow-y: auto;  /* Make scrollable */
    }
    .grid-row {
        gap: 15px;   /* reduced gap for mobile */
        padding: 0 10px; /* less side padding */
    }

    .thumbnail img {
        width: 45vw; /* images take almost half the viewport width */
    }
}

