.navbar {
    overflow: hidden;
    position: fixed;
    top: 20px;
    left: 4dvw;
    transform: none;
    width: calc(92dvw - 40px);
    max-width: 100%;
    z-index: 1000;
    height: 40px;
    margin: 0;
    border-radius: 25px;
    box-shadow: 0 10px 16px 0 rgba(0, 0, 0, 0.15);
}
.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
    position: relative;
    white-space: nowrap;
}
.navbar-left {
    text-decoration: none;
    display: flex; /* 使用 Flexbox */
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中 */
    padding: 0 2dvw;
    width: 12dvw;
    position: relative; /* 為子元素提供定位參考 */
}
.navbar-middle {
    font-size: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0 20px;
    width: 60dvw;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
}  
.navbar-right {
    top: 100px; 
    right: 0;
    position: fixed;
    z-index: 1000;
    height: auto;
    border-radius: 10px 0 0 10px;
    padding: 20px;
    visibility: hidden;
    transform: translateX(260px);
    transition: transform 1s ease;
    box-shadow: 12px 12px 20px rgba(0, 0, 0, 0.35);
}
.navbar-right ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.navbar-right li {
    margin: 5px 0;
}
.navbar-right a {
    text-decoration: none;
    font-size: 20px;
    color: #000000;
    white-space: nowrap;
}
.navbar-login-container {
    overflow: hidden;
    position: fixed;
    top: 20px;
    right: 2dvw;
    width: calc(2dvw + 40px);
    height: 40px;
    max-width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible; /* 允許 box-shadow 展開 */
}
.navbar-login {
    background-image: url('../assets/account.png');
    background-size: cover;
    background-position: center;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: 40px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 2px 5px 6px rgba(0, 0, 0, 0.18);
}

    .login-popup {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: rgba(255, 255, 255, 0.15);
      backdrop-filter: blur(12px);
      border-radius: 20px;
      border: 1px solid rgba(255, 255, 255, 0.3);
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
      padding: 30px;
      width: 320px;
      display: none;
      flex-direction: column;
    }
    .login-popup h2 {
      text-align: center;
      color: #fff;
      margin-bottom: 20px;
    }
    .login-popup input {
      padding: 10px;
      margin: 10px 0;
      width: 100%;
      border-radius: 10px;
      border: none;
      background: rgba(255, 255, 255, 0.2);
      color: #000000;
    }
    .login-popup button {
      padding: 10px;
      margin-top: 10px;
      width: 100%;
      border-radius: 10px;
      background-color: #2196F3;
      color: white;
      border: none;
      cursor: pointer;
    }
    .close-btn {
      position: absolute;
      top: 10px;
      right: 15px;
      font-size: 20px;
      cursor: pointer;
      color: #000000;
    }

@media (max-device-width: 600px) {
    .navbar-middle {
        width: 52dvw;
    }
    .navbar-left, .navbar-label {
        width: 17dvw;
    }
}

.navbar-middle-text {
    display: flex;
    gap: 80dvw;
    width: auto;
    animation: scroll 20s linear infinite;
    will-change: transform;
    white-space: nowrap;
}

.navbar-middle-text a{
    text-decoration: none;
    color: #000000;
}

@keyframes scroll {
  0% {
    transform: translateX(50%);
  }
  100% {
    transform: translateX(-100%);
  }
}

.navbar-login, .navbar-container, .navbar-label, .navbar-right {
    background-color: #f0ece1;
}
.text-link:hover {
    color: #4f4b48;
}
.navbar-right a:hover {
    color: #4f4b48;
}
#menu {visibility: hidden;}
.navbar-label {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 12dvw;
    position: relative;
    height: 40px;
}
label {
    width: 14px;
    height: 2px;
    background: #918d8a;
    cursor: pointer;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: 0.4s ease; /* 平滑過渡 */
}
label:hover {
    background-color: #4f4b48;
}
label:before, label:after {
    content: "";
    width: 14px;
    height: 2px;
    background: #918d8a;
    position: absolute;
    left: 0; /* 保持和主線對齊 */
    transition: 0.4s ease;
}
label:before {
    transform: translateY(-4px); /* 上方位置 */
}
label:after {
    transform: translateY(4px); /* 下方位置 */
}
label:hover:before, label:hover:after {
    background-color: #4f4b48;
}
#menu:checked + label {
    background-color: transparent; /* 隱藏中間的主線 */
}
#menu:checked + label:before {
    transform: rotate(45deg); /* 上線旋轉45度 */
}
#menu:checked + label:after {
    transform: rotate(-45deg); /* 下線旋轉-45度 */
}