
html {
    overflow-y: scroll;
}

/* --- WebKit 滾輪樣式 --- */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #9c9388; /* 範例：使用您主容器的米白背景色 */
    border-radius: 0;
}

::-webkit-scrollbar-thumb {
    background: #687b95; /* 範例：使用您 outline 的深灰色 */
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #526175; /* 範例：使用您文字的藍灰色，或更深的灰色 */
}

body {
    font-family: "New Tegomin", serif;
    margin: 0;
    padding: 20px;
    background-color: #5d4545;
    background-image: url("../images/BG_loop.webp");
    background-size: 100% auto;
    background-repeat: repeat-y;
    background-position: bottom center;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    box-sizing: border-box;
    color: #333333;
}

a:link{
    color:#4c6587;
    text-decoration: underline dashed;
    text-underline-offset: 4px;
}

a:visited{
    color:#723d52;
    text-decoration: underline dashed;
    text-underline-offset:4px;
}

a:hover{
    color:#263e61;
    text-decoration: none;
}


.main-container {
    width: 90%;
    max-width: 480px;
    background-color: rgba(191, 177, 171, 0.61);
    border-radius: 2px;
    padding: 20px;
    background-clip: padding-box;
    box-shadow: 0 4px 8px rgba(58, 35, 35, 0.57);
    display: flex;
    flex-direction: column;
    gap: 25px; /* 各主要區塊間的間距 */
    text-align: center;
    outline: 2px dashed #615555;
    outline-offset: -12px; 
}

.logo-area {
    margin-top: 24px;
    padding: 6px 24px;
}

.large-image-area {
    padding: 0 24px;
}

.grid-description {
    font-size: 0.9em;
    color: #405663;
    margin-bottom: 24px;
    text-align: center;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(3, 96px);
    gap: 48px;
    justify-content: center;
}

.link-item {
    background-color: rgba(188, 167, 156, 0.797);
    border-radius: 2px;
    box-shadow: 0 2px 6px rgba(58, 35, 35, 0.57);
    outline: 2px dashed #837575;
    outline-offset: -6px; 
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s ease-in-out;
}

a.link-item{
    text-decoration: none ;
}

.link-item img{
    width: 60%;
}

.link-item:hover {
    background-color: rgba(125, 113, 106, 0.317);
}

.text-box {
    background-color: rgba(88, 115, 148, 0.776);
    color: #e2e2df;
    outline: 2px dashed #b0aea2;
    box-shadow: 0 2px 6px rgba(58, 35, 35, 0.57);
    outline-offset: -6px; 
    border-radius: 2px;
    padding: 12px;
    margin: 0 48px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 120px);
    justify-content: center;
    gap: 10px;
}

.img-item {
    background-color: rgba(188, 167, 156, 0.797);
    border-radius: 2px;
    box-shadow: 0 2px 6px rgba(58, 35, 35, 0.57);
    outline: 2px dashed rgba(55, 44, 44, 0.584);
    outline-offset: -6px; 
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: background-color opacity 0.2s ease-in-out;
}

.img-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-item:hover {
    background-color: rgba(125, 113, 106, 0.317);
    opacity: 0.7;
}

.text-box a{
    color: #e2e2df;
    text-decoration: none;
}

.text-box a:hover{
    color: #beb6a4;
}

.small-text-box {
    font-family: Arial, sans-serif;
    font-size: small;
    text-align: left;
    letter-spacing: 1px;
    line-height: 1.5rem;
    background-color: rgba(217, 211, 200, 0.776);
    color: #4d3f36;
    outline: 2px dashed #a27e7e;
    box-shadow: 0 2px 6px rgba(58, 35, 35, 0.57);
    outline-offset: -6px; 
    border-radius: 2px;
    padding: 12px 18px;
    margin: 0 48px;
}

.small-text-box ul{
    padding: 0 24px;
}


.hr-line {
    border: none;
    border-top: 1px dotted #655a5a;
    margin: 12px 12px;
}


.site-footer {
    font-size: 0.85em;
    color: #47515e;
    text-align: center;
    width: 100%;
    margin-bottom: 24px;
}

@media (max-width: 480px) {
    body {
        padding: 10px; 
        background-attachment: scroll;
    }

    .main-container {
        width: 95%;
        padding: 15px;
        gap: 15px; 
    }

    .logo-area {
        margin-top: 15px;  
        padding: 6px 15px; 
    }

    .large-image-area {
        padding: 0 15px; 
    }

    .grid-description {
        font-size: 0.85em; 
        margin-bottom: 15px; 
    }

    .links-grid {
        grid-template-columns: repeat(3, 1fr); 
        gap: 36px; 
        margin: 0 24px;
    }

    .image-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 5px;
        margin: 0 auto; 
        width: calc(100% - 30px);
    }

    .text-box {
        padding: 10px;  
        margin: 0 8px; 
    }

    .small-text-box {
        padding: 10px;  
        margin: 0 8px; 
    }

    .hr-line {
        margin: 10px 24px; 
    }

    .site-footer {
        font-size: 0.8em;
        margin-bottom: 15px;
    }
}