/* Reset CSS 通用的 CSS 重置，消除不同瀏覽器之間的默認樣式差異*/
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {
    
    background-color: rgba(31, 31, 31, 1); /*rgba(31, 31, 31, 1)*/
    color: wheat;
    margin: 0;
    /*padding: 0;*/
    min-height: 100vh; /* 這將確保 body 至少填滿整個視窗高度 */
    display: flex;
    flex-direction: column;
}

main {
    padding-top: 60px; /* 調整 body 的 padding-top 來留出空間給 <nav> */
    flex: 1; /* 讓 main 元素填滿剩餘的空間 */
}

/*上漸層*/
.overlay-top { 
    position: absolute;
    width: 100vw;
    height: 500px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
    z-index: 3;
}

/*下漸層*/
.overlay-down {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100vw;
    height: 500px;
    background: linear-gradient(to top, rgba(31, 31, 31, 1), rgba(31, 31, 31, 0));
    z-index: 3;
}

.image {
    /*max-width: 400px;*/
    /*height: auto;*/
}

/*圖片牆*/
.imageWall {
    position: relative;
    background-color: gray;
    display: flex;
    flex-wrap: wrap;
}

.container {
    flex-basis: calc(100% / 3);
    aspect-ratio: 1/1;
    line-height: 0;
}

    .container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }



.navbar {
    position: fixed;
    top: 0; /* 將 <nav> 定位在頁面頂部 */
    left: 0;
    width: 100%; /* 讓 <nav> 佔滿整個寬度 */
    background-color: black;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.navbar-logo {
    padding: 14px 16px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    align-items: center;
}

.navbar-links {
    display: flex;
}

    .navbar-links a {
        color: #ddd;
        text-decoration: none;
        padding: 14px 16px
    }

        .navbar-links a:hover {
            background-color: transparent;
            color: wheat;
        }

.navbar-buttons {
    display: flex;
    margin-left: auto;
}

    .navbar-buttons button {
        color: white;
        background-color: transparent;
        border: none;
        margin-right: 10px;
        cursor: pointer;
    }

.menu-button {
    display: none;
}

.footer {
    position: relative;
    width: 100%;
    bottom: 0;
    background-color: #000000;
    padding: 20px;
    text-align: center;
    z-index: 3;
}

.footer-content {
    color: #ddd;
    font-size: small;
}

/* 手機板網頁 */
@media (max-width: 1000px) {
    main {
        padding-top: 50px; /* 調整 body 的 padding-top 來留出空間給 <nav> */
        flex: 1; /* 讓 main 元素填滿剩餘的空間 */
    }
    .navbar-logo {
        font-size: 10px;
    }
    .container {
        flex-basis: calc(100% / 2); /* 將每個容器的寬度設置為一半 */
    }

    .navbar {
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
    }

    .navbar-links {
        display: none; /* 預設隱藏導航連結 */
        flex-direction: column;
        align-items: flex-start;
    }

        .navbar-links.open {
            display: flex; /* 點擊選單按鈕後顯示導航連結 */
            font-size: 20px;
        }

        .navbar-links a {
            margin: 5px 0;
        }

    .navbar-buttons {
        margin-left: auto;
        position: absolute; /*相對位置，該元素將從正常的文檔流中脫離，並且不會對其他元素造成影響。 top: 0;*/
        right: 0px;
        /*top: 28px;*/
    }

    .menu-button {
        display: block; /* 顯示選單按鈕*/
        cursor: pointer;
        width: 48px;
        height: 48px;
    }

        .menu-button img {
            width: 100%;
            height: 100%;
            filter: invert(100%);
        }
}
#loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5); /* 半透明黑色背景 */
    z-index: 9999; /* 確保遮罩層在最上層 */
}

#loading {
    background-color: #fff; /* 白色背景 */
    color: #000; /* 黑色字體 */
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    z-index: 10000; /* 確保訊息框在遮罩層上方 */
}

/* 將遮罩層的z-index設置為最小值，使其處於最底層 */
#loading-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
