/* 導航欄樣式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--primary-gradient);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 30px;
}

/* 網站標誌 */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
    transition: opacity 0.3s;
}

    .navbar-brand:hover {
        opacity: 0.9;
        color: white;
    }

    .navbar-brand i {
        font-size: 24px;
    }

/* 導航欄右側 */
.navbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* 語言切換器（在導航欄內） */
.navbar-language-switcher {
    position: relative;
    display: none; /* 隱藏多語系選單 */
}

    .navbar-language-switcher .form-select {
        width: auto;
        min-width: 140px;
        padding: 8px 35px 8px 15px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(10px);
        font-size: 14px;
        font-weight: 500;
        color: white;
        cursor: pointer;
        transition: all 0.3s ease;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
    }

        .navbar-language-switcher .form-select:hover {
            background: rgba(255, 255, 255, 0.25);
            border-color: rgba(255, 255, 255, 0.5);
        }

        .navbar-language-switcher .form-select:focus {
            outline: none;
            background: rgba(255, 255, 255, 0.3);
            border-color: white;
        }

        .navbar-language-switcher .form-select option {
            background: var(--primary-dark);
            color: white;
            padding: 10px;
        }

/* 登出按鈕（在導航欄內） */
.navbar-logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(244, 67, 54, 0.9);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid transparent;
}

    .navbar-logout-btn:hover {
        background: rgba(244, 67, 54, 1);
        color: white;
        border-color: rgba(255, 255, 255, 0.3);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

    .navbar-logout-btn i {
        font-size: 16px;
    }

/* 為頁面內容留出空間 */
.page-content {
   padding-top: 60px; /* navbar 高度 + 間距 */
}

/* 響應式設計 */
@media (max-width: 768px) {
    .navbar {
        padding: 0 15px;
        height: 56px;
    }

    .navbar-brand {
        font-size: 18px;
    }

        .navbar-brand i {
            font-size: 20px;
        }

    .navbar-right {
        gap: 12px;
    }

    .navbar-language-switcher .form-select {
        min-width: 110px;
        padding: 6px 30px 6px 12px;
        font-size: 13px;
    }

    .navbar-logout-btn {
        padding: 6px 14px;
        font-size: 13px;
    }

        .navbar-logout-btn span {
            display: none; /* 在手機上只顯示圖示 */
        }

        .navbar-logout-btn i {
            font-size: 18px;
        }

    .page-content {
        padding-top: 70px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0 10px;
    }

    .navbar-brand {
        font-size: 16px; /* 在小螢幕上縮小字體 */
    }

    .navbar-language-switcher .form-select {
        min-width: 90px;
        padding: 6px 28px 6px 10px;
        font-size: 12px;
    }
}

/* 動畫效果 */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.navbar {
    animation: slideDown 0.3s ease-out;
}

