.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #102A5E;
    padding: 5px;
    display: flex;
    justify-content: space-between; /* space-between */
    align-items: center;
    z-index: 999;
    opacity: 90%;
}

.menu{
    padding-right: 10%;
}

/* computer_navbar */
.navbar a {
    font-family: "Noto Serif TC", "Noto Sans TC", sans-serif;
    color: burlywood;
    text-decoration: none;
    margin: 0 15px;
    font-size: 18px;
}
.navbar a:hover {
    text-decoration: none;
    color:white;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

.logo {
    width: 50px;
    height: auto;
    margin-left: 20px;
    padding-right: 250px;
    cursor: pointer;
}

.logo-text {
    font-size: 20px;
    color: white;
    font-family: "Noto Serif TC","Noto Sans TC", sans-serif;
    margin-left: -240px;
}

.logo-container:hover .logo-text {
    color: burlywood;
}

/* cellpone_navbar */
.menu-icon {
    z-index: 1000;
    display: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    position: relative;
    margin-left: auto;
    margin-right: 40px;
    right: 10px;
}
/* 列表圖示 ( ☰ ) */
.list-icon, .x-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s, transform 0.3s;
}

.list-icon span {
    display: block;
    width: 20px;
    height: 3px;
    margin: 4px 0;
    background-color: white;
    border-radius: 2px;
}

/* X 圖示 */
.x-icon {
    width: 20px;
    height: 20px;
    opacity: 0;
    transform: translate(-50%, -50%) rotate(45deg);
}

.x-icon span:first-child {
    position: absolute;
    width: 100%;
    height: 3px;
    top: 50%;
    background-color: white;
    transform: translateY(-50%);
}

.x-icon span:last-child {
    position: absolute;
    width: 3px;
    height: 100%;
    left: 50%;
    background-color: white;
    transform: translateX(-50%);
}

/* 點擊時切換 */
.menu-icon.active .list-icon {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
}

.menu-icon.active .x-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(45deg) scale(1);
}

.menu {
    display: flex;
    align-items: center;
    gap: 10px
}
.menu a {
    display: block;
    padding: 5px;
    text-align: center;
}
@media screen and (max-width: 850px) {
    .navbar{
        padding: 10px;
    }
    .logo{
        width: 40px;
        height: auto;
        margin-left: 10px;
    }
    .menu {
        display: flex;
        flex-direction: column;
        background: #102A5E;
        position: absolute;
        top: 50px;
        right: 15px;
        width: 200px;
        padding: 5px;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .menu.show {
        opacity: 1;
        visibility: visible;
    }
    .menu-icon {
        display: block;
        position: relative;
        right: -5px;
    }
}