body {
    margin: 0;       
    padding: 0;
}
.navbar{
    display:flex;
    height:54px;
    align-items: center;
    justify-content: center;
    top:0;
    left:0;
    position: fixed;
    width:100%;
    z-index: 2000;
    background-color: white;
}
.navbar-container{
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
}
.left{
    flex:none;
    width:200px;
    font-weight: bold;
    color:#448899;
    font-size:30px;
}
.right{
    display:flex;
    justify-content:flex-end;
    flex:auto;
    align-items: center;
    width: 86;
    height: 34;
    padding: 10px;
}
.item{
    margin-left: 10px;
}
.title{
    background-image: url("[orig] welcome image.png");
    margin-top: 54px;
    left: 0;
    width: 100%;
    height: 320px;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 1500;  
    display: flex;
    align-items: center;
}

.title-container{
    max-width: 1200px; 
    margin: auto; 
    width: 100%;
}
.title-content{
    color: white;
    margin-top: 10px;
    font-weight: bold;
    
}

.select-btn{
    width: 460px;
    height: 46px;
    max-width: 460px;
    display:flex;
    align-items:center;
    margin-top: 20px;
}

.select-cat{
    height: 46px;
    width:100px;
    display:flex;
    justify-content: center;
    align-items: center;
    border:none;
    border-bottom-left-radius: 5px;
    border-top-left-radius: 5px;
    font-size:15px;
    font-weight: bold;

}
.search-bar{
    height: 46px;
    border:none;
    width:300px;
    outline: none; 
    padding: 0 15px;  
    font-size: 15px;
}
.item{ 
    margin-right: 10px;
}

.search-btn{
    height:46px;
    width:60px;
    background-color:#448899;
    border:none;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom-right-radius: 5px ;
    border-top-right-radius: 5px ;
    padding:10px 20px 10px 20px;

}
.select-cat-container {
    position: relative; 
}

.select-cat-options{
    display:none;
    position:absolute;
    grid-template-columns: 1fr 1fr 1fr;
    top:5px;
    height:auto;
    width:300px;
    z-index:3000;
    background-color: white;
    box-shadow:0px 4px 15px rgba(0,0,0,0.3);
    border-radius: 8px;
    justify-items: center; 
    align-items: center;

}

.category{
    width:100%;
    text-align: center;
    padding: 8px 0;
    font-size: 14px; 

}
.category:hover{
    background-color: #EEEEEE;
    border-radius: 8px;
}

.main {
    display: block; /* 移除 flex，改為 block */
    margin-top: 40px;
    width: 100%;
}
.main-container {
    max-width: 1200px;
    margin: 0 auto; /* 這是讓整個 1200px 區塊在頁面中央的關鍵 */
    width: 100%;
}

.list-bar {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    /* 將 center 改為 flex-start */
    justify-content: flex-start; 
    background-color: white;
    margin: 0 auto;
    box-sizing: border-box;
}

.list-bar-content {
    flex: 1;  
    min-width: 0;               
    overflow-x: auto;
    white-space: nowrap; 
    margin: 0px 10px;
    display: flex;
    align-items: center;
}


.list-bar-content::-webkit-scrollbar{
    display:none
}

.list-bar-left{
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background-color: white;
    background-repeat: no-repeat;
    background-size: contain;
    border:none;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('/static/States=Default-left.png');
    
}
.list-bar-left:hover{
    background-image: url('/static/States=Hovered-left.png');

}

.list-bar-right{
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background-image: url('/static/States=Default-right.png');
    background-color: white;
    background-repeat: no-repeat;
    background-size: contain;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;

}

.list-bar-right:hover{
    background-image: url('/static/States=Hovered-right.png');
}

.list-bar-mrt {
    margin: 0px 10px;
    color: gray;
    flex-shrink: 0;   /* 關鍵：強制文字不收縮，防止容器為了保護文字而拒絕縮小[cite: 9] */
    white-space: nowrap; /* 確保不換行[cite: 9] */
    cursor: pointer;
}

.list-bar-mrt:hover{
    color:black;
}


#main-pic {
    margin-top: 40px;
    max-width: 1200px;
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); 
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

.attraction-card{
    border: 2px solid #E8E8E8; 
    border-radius: 10px;

}
.img-container{
    position: relative;
    height:200px;

}
.pic {
    height: 200px;
    width: 100%;
    object-fit: cover; 
    border-radius: 10px 10px 0 0; 
}

.text{
    color:white;
    font-size: 20px; 
    background-color: rgba(0, 0, 0, 0.5);
    position: absolute;
    bottom:0px;  
    left:0px;
    right:0px;
    z-index: 1;
    overflow:hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: bold;
    padding: 8px 10px ;
    margin:0;
}

.card-info{
    display:flex;
    align-items: center;
    justify-content: space-between;
    color: gray;
    font-weight:bold;
    font-size:20px;
    margin: 10px;
    
}

footer div{
    width: 100%;
    height: 104px;
    background-color: #757575;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-top: 40px;
}
#js-detective {
    height: 10px; 
    width: 100%;
    background: transparent; 
}

.login-outer{
    position:fixed;
    background-color: rgba(0, 0, 0, 0.5);
    z-index:2500;
    width:100%;
    height:100%;
    top:0;
    left:0;
    display:none;
}

.login-container{
    position: absolute; 
    z-index: 3000;
}

.login{
    display:none;
    width:340px;
    height:auto;
    background-color:white;
    position:fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%); 
    box-shadow: 0px 4px 15px rgba(0,0,0,0.3);
    border-radius: 8px;
    flex-direction: column; 
    align-items: center;    
    gap:10px;
    
    padding-bottom: 20px;
}
.login-title{
    font-size: 24px;
    color:gray;
    font-weight:bold;
}
.login-email, .login-password, .login-account{
    width:300px;
    height:47px;
}

.login-account{
    border:none;
    background-color: #448899;
    color:white;
    border-radius:5px;
    font-size: 16px;
}
.signupbtn, .signinbtn{
    border:none;
    background-color: white;
}

.signup-container{
    position: relative; 
    z-index: 3000;
}

.signup{
    display:none;
    width:340px;
    height:auto;
    background-color:white;
    position:fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%); 
    box-shadow: 0px 4px 15px rgba(0,0,0,0.3);
    border-radius: 8px;
    flex-direction: column; 
    align-items: center;    
    gap:10px;
    padding-bottom: 20px;
}

.signup-title{
    font-size: 24px;
    color:gray;
    font-weight:bold;
}
.signup-name, .signup-email, .signup-password, .signup-account{
    width:300px;
    height:47px;
    
}

.signup-account{
    border:none;
    background-color: #448899;
    color:white;
    border-radius:5px;
    font-size: 16px;
}

.decoration-bar{
    width:100%;
    height:10px;
    top:0px;
    background: linear-gradient(to right, #66AABB,#337788);
    border-radius: 8px 8px 0px 0px;
}
.hide{
    position:absolute;
    right:10px;
    top:20px;
}


@media (min-width: 601px) and (max-width: 1200px) {
    
    .title-container{
        width: 90%;
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 15px;
    }

    .list-bar {
        max-width: 1200px;
        width: 100% !important; /* 強制覆寫為 100%[cite: 9] */
        padding: 0 50px;        /* 預留左右邊距，避免按鈕貼齊邊緣[cite: 9] */
    }

    #main-pic {
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px; 
    padding: 0 15px;
    max-width: 600px; 
    margin: 40px auto;
   }

    .img-container {
        width: 100%;
        height: 200px; 
        overflow: hidden;
    }

    .pic {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
}


@media (min-width: 360px) and (max-width: 600px) {
    .navbar-container {
        width: 90%;
        white-space: nowrap;
}

    .left, .right {
        flex: 1; 
        display: flex;
    }

    .title {
        display: flex;
        justify-content: center; 
        align-items: center;    
    }

    .title-container {
        width: 90%; 
        max-width: 400px;      
        display: flex;
        flex-direction: column;   
        align-items: flex-start; 
        text-align: left;        
        padding: 0; 
    }

    .title-content {
        width: 100%;           
        max-width: none; 
    }

    .search-bar{ 
        min-width: 0;      
        }
    
    .select-btn {
        width: 100%;           
        max-width: 400px;      
        margin-top: 25px;
    }
    
    .select-cat{
        display: inline-block;
        white-space: normal; 
        text-align: center;
        line-height: 1.2;
        white-space: nowrap;
    }

    .search-bar {
        flex: 1; 
        width: auto;
    }

    .list-bar {
        width: 90%;       
        margin: 0 auto;
    }

    .list-bar-content {
        margin: 0 5px;   
    }


   
    #main-pic {
    grid-template-columns: minmax(auto, 300px); 
    justify-content: center; /* 水平置中網格 */
    max-width: 400px;
    margin: 40px auto;
}
    
}