header {
    background: #F4A261;
    color: white;
    padding: 15px 0;
    text-align: center;
    border-radius: 0 0 20px 20px;
    position: fixed !important;
    /* ✅ 強制固定 */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    /* ✅ 確保在最上層 */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    /* ✅ 增加陰影提升辨識度 */
}

body {
    padding-top: 80px !important;
    /* ✅ 避免 header 蓋住內容 */
}


@media screen and (max-width: 768px) {
    .nav-links {
        top: 50px;
        /* ✅ 確保行動版選單不會被 header 擋住 */
    }
}


header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: auto;
    padding: 0 20px;
}

header .logo {
    font-size: 22px;
    font-weight: bold;
}

/* 導航選單 */
.nav-links {
    display: flex;
    align-items: center;
}

.nav-links ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.nav-links a:hover {
    text-decoration: underline;
}

/* 登入 / 註冊按鈕 */
.auth-buttons {
    display: flex;
    align-items: center;
}

.login-btn,
.register-btn {
    padding: 8px 15px;
    margin-left: 10px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 20px;
    transition: 0.3s;
}

.admin-btn {
    padding: 8px 15px;
    margin-left: 10px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 40px;
    transition: 0.3s;
}

.login-btn {
    background: #264653;
    color: white;
}

.login-btn:hover {
    background: #1E3A42;
}

.register-btn {
    background: #2A9D8F;
    color: white;
}

.register-btn:hover {
    background: #1E706D;
}

.admin-btn {
    background: #2A9D8F;
    color: white;
}

.admin-btn :hover {
    background: #1E706D;
}

/* 漢堡選單（手機版） */
.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger-menu .bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: 0.3s;
}

/* 行動版選單 */
@media screen and (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #F4A261;
        padding: 20px 0;
        text-align: center;
    }

    .nav-links ul {
        flex-direction: column;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .auth-buttons {
        flex-direction: column;
        margin-top: 10px;
    }

    .auth-buttons a {
        width: 80%;
        margin: 5px auto;
        display: block;
        text-align: center;
    }
}

/* 漢堡選單開啟時的動畫 */
.nav-active {
    display: flex !important;
}


/* Logo 超連結樣式 
.logo a {
    text-decoration: none;
    font-size: 22px;
    font-weight: bold;
    color: white;
    transition: 0.3s;
}

.logo a:hover {
    color: #F4D35E;
}

*/

/* ✅ 隱藏登入 / 註冊按鈕（當已登入時） */
.logged-in .login-btn,
.logged-in .register-btn {
    display: none;
}


.logo {
    text-align: center;
    /* 讓內容（文字與圖片）置中 */
}

.logo a {
    display: inline-flex;
    /* 讓圖片和文字對齊 */
    align-items: center;
    /* 讓圖片與文字垂直對齊 */
    text-decoration: none;
    font-size: 22px;
    font-weight: bold;
    color: white;
    transition: 0.3s;
}

.logo img {
    margin-right: 8px;
    /* 讓圖片與文字有點距離 */
}

.logo a:hover {
    color: #F4D35E;
}

@media (max-width: 768px) {

    /* 手機版 */
    .logo a {
        font-size: 24px;
        /* 手機版字體變大 */
    }
}