/* ===== Header ===== */
header {
    position: sticky;
    top: 0;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    background: linear-gradient(135deg, #1a0a2a 0%, #2d0a3a 50%, #3a1a4a 100%);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    height: 70px;
}

header .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

#logo {
    height: 48px;
    width: auto;
    filter: brightness(0) invert(1);
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
    font-family: 'Noto Sans TC', sans-serif;
}

.logo-text .highlight {
    color: #f5a0d0;
}

/* ===== 導航 ===== */
#nav_container {
    display: flex;
    align-items: center;
}

#menu-bar {
    display: none;
}

.menu-icon {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}
.menu-icon span {
    display: block;
    width: 28px;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: all 0.3s;
}

.navbar ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.navbar ul li {
    position: relative;
}

.navbar ul li a {
    display: block;
    padding: 8px 18px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.25s;
    font-family: 'Noto Sans TC', sans-serif;
    letter-spacing: 0.5px;
}

.navbar ul li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.navbar ul li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #2d0a3a;
    border-radius: 8px;
    padding: 6px 0;
    min-width: 180px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.navbar ul li:hover ul {
    display: block;
}

.navbar ul li ul li a {
    padding: 8px 20px;
    font-size: 14px;
    border-radius: 0;
    color: rgba(255, 255, 255, 0.7);
}

.navbar ul li ul li a:hover {
    background: rgba(245, 160, 208, 0.12);
    color: #f5a0d0;
}

/* ===== 響應式 ===== */
@media screen and (max-width: 820px) {
    header {
        padding: 0 16px;
        height: 60px;
    }

    #logo {
        height: 36px;
    }

    .logo-text {
        font-size: 18px;
    }
    .logo-text .highlight {
        display: none;
    }

    .menu-icon {
        display: flex;
    }

    .navbar {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #1a0a2a;
        padding: 12px 16px 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    }

    #menu-bar:checked ~ .navbar {
        display: block;
    }

    .navbar ul {
        flex-direction: column;
        gap: 0;
    }

    .navbar ul li a {
        padding: 10px 14px;
        font-size: 15px;
    }

    .navbar ul li ul {
        position: static;
        background: rgba(255, 255, 255, 0.04);
        border-radius: 6px;
        padding: 4px 0;
        margin: 2px 0 4px 12px;
        box-shadow: none;
        border: none;
        display: none;
    }

    .navbar ul li:hover ul {
        display: none;
    }

    .navbar ul li ul.show {
        display: block;
    }

    .navbar ul li ul li a {
        padding: 6px 16px;
        font-size: 14px;
    }
}