header h1{
    text-align:center;
    font-size:100px;
    background-color: darkgrey;
    
}



.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    grid-auto-flow: row;
}

.container p {
    margin: 0; /* 移除段落預設的間距 */
    line-height: 1.6; /* 段落行高 */
}

.container a{
    text-align:center;
    font-size:30px;
}

.container-all{
    display: flex;
    align-items: stretch;
    justify-content: space-between; /* 將左右兩側元素均勻對齊 */
    flex-wrap: wrap; /* Allows items to wrap onto multiple lines */
    margin: 0; /* Reset margin */
    padding: 0; /* Reset padding */
}




#sidebar{
    width: 100%;
    height: 150vh;
    background-color: rgb(111, 130, 0);
    color: white;
}

.container-right{
    background-color: rgba(255, 255, 255, 0.7); /* Adjust alpha value as needed */
    color:white;
    height:150vh;
    background-image:url("https://cdn2.ettoday.net/images/2360/d2360803.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    padding: 20px; /* 增加內邊距 */
    overflow-y: scroll; /* 加入垂直滾動條 */
}

.container-right a{
    color: indigo;
    
}

.container-right h2{
    text-align:center;
    font-size:50px;
    color: black;
}

.container-right p{
    text-align:center;
    font-size:30px;
    color: black;
}


#sidebar ul li a {
    padding: 15px;
    font-size: 20px;
    display: block;
    text-decoration: none;
    color: aliceblue;
}

#sidebar ul li a:hover{
    color: cornflowerblue;
    background-color: darkkhaki;

}


#sidebar li details summary{
    padding: 15px;
    font-size: 20px;
}













details {
    background: none;
    border: none;
    margin: 0;
    padding: 0;
}

summary {
    cursor: pointer;
    font-weight: bold;
}

details ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

details ul li a {
    display: block;
    padding: 5px 0;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 18px; /* 與上方一致的字型大小 */
}

/* 滑鼠移過去時的效果 */
details ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    font-size: 20px; /* 變大的字型大小 */
}






.container-right::-webkit-scrollbar {
    width: 10px; /* 自訂滾動條寬度 */
}

.container-right::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2); /* 滾動條手柄顏色 */
}

.container a:hover {
    color: coral; /* 鏈接滑鼠移過時的顏色 */
}


.container h2 {
    margin-bottom: 20px; /* 標題底部間距 */
}

#sidebar ul li {
    margin-bottom: 10px; /* 側邊欄項目間距 */
}

#sublist a {
    font-size: 25px; /* 與其他連結相同的字體大小 */
}

#sublist a:hover {
    background-color: darkkhaki; /* 與其他連結相同的滑過底色 */
    color: cornflowerblue; /* 與其他連結相同的滑過文字顏色 */
}



#sidebar {
    flex: 0 0 13%; /* Adjust the sidebar width */
    height: 150vh;
    /* other styles */
}

.container-right {
    flex: 0 0 87%; /* Adjust the main content width */
    height: 150vh;
    /* other styles */
}

footer {
    background-color: khaki ;
    color: #fff;
    padding: 20px;
    text-align: center;
}

footer p {
    margin: 5px 0;
    color: black;
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Ensures padding and border are included in element's total width and height */
}



@media (max-width: 768px) {
    header h1 {
        font-size: 60px; /* Adjust the header font size for smaller screens */
    }
    
    .container-all {
        flex-direction: column; /* Stack containers vertically on smaller screens */
    }
    
    #sidebar {
        height: auto; /* Allow the sidebar to expand based on content */
    }
    
    .container-right {
        flex: 1; /* Allow the right container to take up remaining space */
        height: auto; /* Allow the height to adjust based on content */
        background-size: contain; /* Ensure background image remains visible */
        padding: 10px; /* Adjust padding for smaller screens */
    }
    
    .container-right h2 {
        font-size: 30px; /* Adjust heading size for smaller screens */
    }
    
    .container-right p {
        font-size: 18px; /* Adjust paragraph text size for smaller screens */
    }
    
    .container a {
        font-size: 20px; /* Adjust link text size for smaller screens */
    }
    
    footer {
        padding: 10px; /* Adjust footer padding for smaller screens */
    }
}

/* Tablet or larger screens */
@media (min-width: 769px) {
    header h1 {
        font-size: 80px; /* Increase header font size for tablets */
    }
    
    #sidebar {
        height: 100vh; /* Set a specific height for the sidebar on larger screens */
    }
    
    .container-right {
        flex: 1; /* Allow the right container to take up remaining space */
        height: 100vh; /* Set a specific height for the main content on larger screens */
        padding: 20px; /* Adjust padding for larger screens */
    }
    
    .container-right h2 {
        font-size: 40px; /* Adjust heading size for tablets */
    }
    
    .container-right p {
        font-size: 24px; /* Adjust paragraph text size for tablets */
    }
    
    .container a {
        font-size: 26px; /* Adjust link text size for tablets */
    }
    
    footer {
        padding: 20px; /* Adjust footer padding for larger screens */
    }
}





















